-
-
Notifications
You must be signed in to change notification settings - Fork 256
Add rest of python facts from github suggestion thread #1696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0e2400c
Add rest of facts from GitHub thread
greyblue9 e2561b5
Merge pull request #3 from greyblue9/add-pyfacts
greyblue9 3fd9495
Add Ned's last name
greyblue9 c25ed82
Update formatting for Ned's fact
greyblue9 337f804
Grammar fix
greyblue9 26754a9
Add a few more facts
greyblue9 eb4f749
Add bool fact
greyblue9 01ad5e6
Add object fact
greyblue9 e6f533d
Remove fact about Ned
greyblue9 dce7188
Update python_facts.txt
greyblue9 86a6230
Incorporate updates from wookie184's code review
greyblue9 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
Python was named after Monty Python, a British Comedy Troupe, which Guido van Rossum likes. | ||
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>) | ||
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. | ||
Python's first public release was in 1991, making it a few years older than Java! | ||
Python was invented by Guido van Rossum, affectionately known as the 'Benevolent Dictator For Life' (BDFL) of Python until he stepped down in 2018. | ||
If you type `from __future__ import braces` in the REPL, you’ll get an interesting `SyntaxError` about whether it will be implemented. | ||
Not only did Guido van Rossum name Python after Monty Python, the Python docs are riddled with Monty Python skit references. | ||
Python is a multi-paradigm programming language providing support for procedural, object-oriented, and even functional paradigms. | ||
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. | ||
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()`. | ||
When you do `hash(float('inf'))` or `hash(math.inf)`, you'll get the first few digits of pi but as an int: `314159`. | ||
The Python logo is based on Mayan representations of snakes! | ||
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). | ||
Dictionaries are guaranteed to preserve insertion order since Python 3.7. | ||
The canonical implementation of Python is written in C, known as CPython (available from [python.org](<https://python.org/>)! | ||
The assignment expression operator (`:=`), introduced in Python 3.8, is known as the "walrus operator" due to its shape! | ||
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`)! |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.