Skip to content

Commit 1532382

Browse files
authored
Add rest of python facts from github suggestion thread (#1696)
* Add rest of facts from GitHub thread Source: python-discord/meta#93 Edited for grammar, formatting, and inline code. * Add Ned's last name * Update formatting for Ned's fact * Grammar fix * Add a few more facts * Add bool fact * Add object fact * Remove fact about Ned * Update python_facts.txt Remove last line * Incorporate updates from wookie184's code review
1 parent c8526d7 commit 1532382

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
Python was named after Monty Python, a British Comedy Troupe, which Guido van Rossum likes.
22
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>)
33
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

Comments
 (0)