Skip to content

Commit de2ebec

Browse files
authored
Merge pull request #14 from YDX-2147483647/patch-1
refactor: Move notes to footnotes
2 parents a3b7202 + 3f5c96e commit de2ebec

1 file changed

Lines changed: 28 additions & 29 deletions

File tree

README.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
> Just when you thought, Python could not be more fun.
22
3-
### 1. Hello World
3+
### 1. Hello World[^hello-world]
44

55
```py
66
>>> import __hello__
@@ -20,7 +20,7 @@ Hello World!
2020
Hello World!
2121
```
2222

23-
### 2. The classic
23+
### 2. The classic[^the-classic]
2424
```
2525
>>> import this
2626
@@ -47,12 +47,12 @@ If the implementation is easy to explain, it may be a good idea.
4747
Namespaces are one honking great idea -- let's do more of those!
4848
```
4949

50-
### 3. The missing line from the classic
50+
### 3. The missing line from the classic[^missing-zen]
5151

5252
The Zen of Python was introduced in [PEP 20](https://www.python.org/dev/peps/pep-0020/#id2). It is supposed to be 20 aphorisms, but only 19 of which have been written down.
5353

5454

55-
### 4. A simple life lesson
55+
### 4. A simple life lesson[^import-this]
5656
```py
5757
>>> import this
5858
...
@@ -69,22 +69,22 @@ True
6969
True
7070
```
7171

72-
### 5. Comics, yeah.
72+
### 5. Comics, yeah.[^antigravity]
7373
```py
7474
>>> import antigravity
7575
```
7676

77-
### 6. It's not a choice, it defines who we are
77+
### 6. It's not a choice, it defines who we are[^braces]
7878
```py
7979
>>> from __future__ import braces
8080
File "<stdin>", line 1
8181
SyntaxError: not a chance
8282
```
8383

84-
### 7. Origins
84+
### 7. Origins[^origins]
8585
The name Python has nothing to do with the type of Snake.
8686

87-
### 8. The confuscation
87+
### 8. The confuscation[^this-py]
8888
This is how the `this.py` module looks, which prints the Zen of Python.
8989

9090
```py
@@ -122,13 +122,13 @@ The code for the Zen violates itself. It's not beautiful but ugly, not explicit
122122
This would probably be the *only* module to go against the spirit of what it says itself.
123123
.
124124

125-
### 9. C/C++ anyone?
125+
### 9. C/C++ anyone?[^c-c++]
126126
From the Zen again,
127127
```
128128
There should be one-- and preferably only one --obvious way to do it.
129129
```
130130

131-
### 10. Naming identifiers can be unspeakably cool
131+
### 10. Naming identifiers can be unspeakably cool[^identifiers]
132132
Just when you thought that working in Python couldn't possibly *be* any more fun,
133133
```py
134134
>>> from math import pi
@@ -140,7 +140,7 @@ Just when you thought that working in Python couldn't possibly *be* any more fun
140140
True
141141
```
142142

143-
### 11. Picking a place for meetup?
143+
### 11. Picking a place for meetup?[^geohash]
144144
```py
145145
>>> from antigravity import geohash
146146
>>> # Your location, a date and that date's (or most recent) DJIA opening.
@@ -150,7 +150,7 @@ True
150150
This can generate a GPS coordinate in a region which is 1 longitude long and 1
151151
latitude wide based on your location.
152152

153-
### 12. The FLUFL - Friendly Language Uncle For Life from [PEP 401 -- BDFL Retirement](https://www.python.org/dev/peps/pep-0401)
153+
### 12. The FLUFL - Friendly Language Uncle For Life from [PEP 401 -- BDFL Retirement](https://www.python.org/dev/peps/pep-0401)[^pep-401]
154154
```py
155155
>>> from __future__ import barry_as_FLUFL
156156
>>> 1 <> 2
@@ -163,7 +163,7 @@ SyntaxError: invalid syntax
163163
```
164164
Recognized that the != inequality operator in Python 3.0 was a horrible, finger pain inducing mistake, the FLUFL reinstates the <> diamond operator as the sole spelling.
165165

166-
### 13. InPynite?
166+
### 13. InPynite?[^inpynite]
167167
```py
168168
>>> infinity = float('infinity')
169169
>>> hash(infinity)
@@ -193,7 +193,7 @@ class code(object)
193193
...
194194
```
195195

196-
### 15. Python 3.9 PEG parser
196+
### 15. Python 3.9 PEG parser[^peg-parser]
197197
`__peg_parser__` is a keyword in python 3.9, will throw a syntax error if used
198198
```py
199199
>>> __peg_parser__
@@ -203,21 +203,20 @@ class code(object)
203203
SyntaxError: You found it!
204204
```
205205

206-
## Notes
207-
1. Easiest hello world program in a language without calling any function
208-
2. Each and every line is the philosophy of Python's design and is a supreme holy guide
209-
3. Maybe just to show that there always should be a new line at the end of a file!
210-
4. Not an easter egg, a joke in the interpreter
211-
5. It opens this [xkcd comic](https://xkcd.com/353) which demonstrates how easy it is to do stuff with modules
212-
6. This is to instantly close down any conversation about introducing curly braces to Python
213-
7. Guido van Rossum is a big fan of [Monty Python's Flying Circus](https://en.wikipedia.org/wiki/Monty_Python%27s_Flying_Circus)
214-
8. It's a substitution cipher called [ROT13](https://en.wikipedia.org/wiki/ROT13)
215-
9. In many languages there are two ways to do the same thing `--no` and `no--`. The message has a hidden example in itself
216-
10. Support for unicode character set for naming identifiers was added in Python3. Though, it is not explicitly preferred while writing code, it adds flavour to working with scientific formulas
217-
11. The original code is [here](https://github.com/python/cpython/blob/master/Lib/antigravity.py) with the [xkcd comic](https://xkcd.com/426/) referenced, and maybe that's why this is also in the `antigravity` module
218-
12. The [PEP 401](https://www.python.org/dev/peps/pep-0401/) is an April Fools' Joke - The PEP's number is 401, i.e. 4/01 or April 1st (April Fools' Day). The PEP states that Guido van Rossum is stepping down. The new title given to him would be pronounced "BDEVIL" (Benevolent Dictator Emeritus Vacationing Indefinitely from the Language) and Guido's successor will be Barry Warsaw, or as he is affectionately known, Uncle Barry. Uncle Barry's official title is "FLUFL" (Friendly Language Uncle For Life). There are in-jokes about the Parrot virtual machine and the "non-existent" Python Secret Underground (possibly a throw-back to ["TINC" on USENET](https://en.wikipedia.org/wiki/There_Is_No_Cabal)).
219-
13. [Source](https://www.reddit.com/r/Python/comments/6wrd8t/nice_lil_easter_egg_i_suppose/).
220-
14. See [this answer](https://stackoverflow.com/a/65487013/14362510)
206+
[^hello-world]: Easiest hello world program in a language without calling any function
207+
[^the-classic]: Each and every line is the philosophy of Python's design and is a supreme holy guide
208+
[^missing-zen]: Maybe just to show that there always should be a new line at the end of a file!
209+
[^import-this]: Not an easter egg, a joke in the interpreter
210+
[^antigravity]: It opens this [xkcd comic](https://xkcd.com/353) which demonstrates how easy it is to do stuff with modules
211+
[^braces]: This is to instantly close down any conversation about introducing curly braces to Python
212+
[^origins]: Guido van Rossum is a big fan of [Monty Python's Flying Circus](https://en.wikipedia.org/wiki/Monty_Python%27s_Flying_Circus)
213+
[^this-py]: It's a substitution cipher called [ROT13](https://en.wikipedia.org/wiki/ROT13)
214+
[^c-c++]: In many languages there are two ways to do the same thing `--no` and `no--`. The message has a hidden example in itself
215+
[^identifiers]: Support for unicode character set for naming identifiers was added in Python3. Though, it is not explicitly preferred while writing code, it adds flavour to working with scientific formulas
216+
[^geohash]: The original code is [here](https://github.com/python/cpython/blob/master/Lib/antigravity.py) with the [xkcd comic](https://xkcd.com/426/) referenced, and maybe that's why this is also in the `antigravity` module
217+
[^pep-401]: The [PEP 401](https://www.python.org/dev/peps/pep-0401/) is an April Fools' Joke - The PEP's number is 401, i.e. 4/01 or April 1st (April Fools' Day). The PEP states that Guido van Rossum is stepping down. The new title given to him would be pronounced "BDEVIL" (Benevolent Dictator Emeritus Vacationing Indefinitely from the Language) and Guido's successor will be Barry Warsaw, or as he is affectionately known, Uncle Barry. Uncle Barry's official title is "FLUFL" (Friendly Language Uncle For Life). There are in-jokes about the Parrot virtual machine and the "non-existent" Python Secret Underground (possibly a throw-back to ["TINC" on USENET](https://en.wikipedia.org/wiki/There_Is_No_Cabal)).
218+
[^inpynite]: [Source](https://www.reddit.com/r/Python/comments/6wrd8t/nice_lil_easter_egg_i_suppose/).
219+
[^peg-parser]: See [this answer](https://stackoverflow.com/a/65487013/14362510)
221220

222221
## Add more
223222

0 commit comments

Comments
 (0)