2026-07-31 19:40 UTC
Replies (3)
-
@ubernostrum@infosec.exchange 2026-08-01 06:35
@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
-
@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.
-
@SubductionRheology@cyberplace.social 2026-08-01 18:47
@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.