Elektrine lite

← Feed

@treyhunner@mastodon.social

2026-07-31 19:40 UTC

Know a good historical Python feature story arc? I want to hear it. For example, string formatting has had many iterations, generators weren't always coroutines, != and == used to be spelled <> and =, and zip predates enumerate. I want to hear about other Python feature history I should try looking up.

Replies (3)

  • @treyhunner@mastodon.social The history of Python’s boolean type is a bit weird. Also Guido’s old blog is a neat general resource. https://python-history.blogspot.com/2013/11/the-history-of-bool-true-and-false.html

    Open ##5019056

  • @ambv@mastodon.social 2026-08-01 06:46

    @treyhunner@mastodon.social exceptions used to be strings. You would do stuff like: raise "Bad argument" This was only disabled in Python 2.6. Built-in exceptions were simply interned strings, and so to this day you can raise classes, like: raise KeyError That's because it used to just be a variable with a string value.

    Open ##5019058

  • @treyhunner@mastodon.social Python was born when it was popularly believed that Lisp was the ultimate programming language - if you could just get past all those parentheses. There are a lot of lispy functions in the standard library that take a list as first param, many now living in intertools. The history of these would be interesting.

    Open ##5019066