|
1 | 1 | Python was named after Monty Python, a British Comedy Troupe, which Guido van Rossum likes.
|
2 | 2 | If you type `import this` in the Python REPL, you'll get a poem about the philosophies about Python. (check it out by doing !zen in <#267659945086812160>)
|
3 | 3 | If you type `import antigravity` in the Python REPL, you'll be directed to an [xkcd comic](https://xkcd.com/353/) about how easy Python is.
|
| 4 | +Python's first public release was in 1991, making it a few years older than Java! |
| 5 | +Python was invented by Guido van Rossum, affectionately known as the 'Benevolent Dictator For Life' (BDFL) of Python until he stepped down in 2018. |
| 6 | +If you type `from __future__ import braces` in the REPL, you’ll get an interesting `SyntaxError` about whether it will be implemented. |
| 7 | +Not only did Guido van Rossum name Python after Monty Python, the Python docs are riddled with Monty Python skit references. |
| 8 | +Python is a multi-paradigm programming language providing support for procedural, object-oriented, and even functional paradigms. |
| 9 | +There are many implementations of Python; like Jython, which runs on the Java Virtual Machine; IronPython, which runs on .NET; and pypy, which uses a just-in-time compiler. |
| 10 | +There is a module named `turtledemo` that animates and creates things with the `turtle` module. An example animation is `turtledemo.sorting_animate`, which can be tested using `from turtledemo.sorting_animate import main; main()`. |
| 11 | +When you do `hash(float('inf'))` or `hash(math.inf)`, you'll get the first few digits of pi but as an int: `314159`. |
| 12 | +The Python logo is based on Mayan representations of snakes! |
| 13 | +At the time of writing, small integers in Python (from -5 to 256) are cached and reused, so they will always compare identically (`a is b` will be `True` if `a` and `b` are the same number and in this range). |
| 14 | +Dictionaries are guaranteed to preserve insertion order since Python 3.7. |
| 15 | +The canonical implementation of Python is written in C, known as CPython (available from [python.org](<https://python.org/>)! |
| 16 | +The assignment expression operator (`:=`), introduced in Python 3.8, is known as the "walrus operator" due to its shape! |
| 17 | +In Python, `bool` is actually a subclass of `int` (and you can perform math with `True` and `False` just as though they were `1` and `0`)! |
0 commit comments