You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -1521,7 +1521,7 @@ def some_func(val):
1521
1521
#### 💡 Explanation:
1522
1522
- This is a bug in CPython's handling of `yield` in generators and comprehensions.
1523
1523
- Source and explanation can be found here: https://stackoverflow.com/questions/32139885/yield-in-list-comprehensions-and-generator-expressions
1524
-
- Related bug report: http://bugs.python.org/issue10544
1524
+
- Related bug report: https://bugs.python.org/issue10544
1525
1525
- Python 3.8+ no longer allows `yield` inside list comprehension and will throw a `SyntaxError`.
1526
1526
1527
1527
---
@@ -2061,7 +2061,7 @@ UnboundLocalError: local variable 'a' referenced before assignment
2061
2061
2
2062
2062
```
2063
2063
* The keywords `global` and `nonlocal` tell the python interpreter to not delcare new variables and look them up in the corresponding outer scopes.
2064
-
* Read [this](http://sebastianraschka.com/Articles/2014_python_scope_and_namespaces.html) short but an awesome guide to learn more about how namespaces and scope resolution works in Python.
2064
+
* Read [this](https://sebastianraschka.com/Articles/2014_python_scope_and_namespaces.html) short but an awesome guide to learn more about how namespaces and scope resolution works in Python.
2065
2065
2066
2066
---
2067
2067
@@ -2821,7 +2821,7 @@ Sshh... It's a super-secret.
2821
2821
2822
2822
#### 💡 Explanation:
2823
2823
+ `antigravity` module is one of the few easter eggs released by Python developers.
2824
-
+ `import antigravity` opens up a web browser pointing to the [classic XKCD comic](http://xkcd.com/353/) about Python.
2824
+
+ `import antigravity` opens up a web browser pointing to the [classic XKCD comic](https://xkcd.com/353/) about Python.
2825
2825
+ Well, there's more to it. There's **another easter egg inside the easter egg**. If you look at the [code](https://github.com/python/cpython/blob/master/Lib/antigravity.py#L7-L17), there's a function defined that purports to implement the [XKCD's geohashing algorithm](https://xkcd.com/426/).
2826
2826
2827
2827
---
@@ -3607,7 +3607,7 @@ What makes those dictionaries become bloated? And why are newly created objects
3607
3607
True
3608
3608
```
3609
3609
3610
-
* `int('١٢٣٤٥٦٧٨٩')` returns `123456789` in Python 3. In Python, Decimal characters include digit characters, and all characters that can be used to form decimal-radix numbers, e.g. U+0660, ARABIC-INDIC DIGIT ZERO. Here's an [interesting story](http://chris.improbable.org/2014/8/25/adventures-in-unicode-digits/) related to this behavior of Python.
3610
+
* `int('١٢٣٤٥٦٧٨٩')` returns `123456789` in Python 3. In Python, Decimal characters include digit characters, and all characters that can be used to form decimal-radix numbers, e.g. U+0660, ARABIC-INDIC DIGIT ZERO. Here's an [interesting story](https://chris.improbable.org/2014/8/25/adventures-in-unicode-digits/) related to this behavior of Python.
3611
3611
3612
3612
* You can separate numeric literals with underscores (for better readability) from Python 3 onwards.
0 commit comments