Skip to content

Commit 6164ce0

Browse files
committed
Merge remote-tracking branch 'origin/master' into 3.0
2 parents 85352fc + 31dcd9b commit 6164ce0

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

CONTRIBUTORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ I'm really grateful to all the contributors. Following are the wonderful people
1111
| chris-rands | [chris-rands](https://github.com/chris-rands) | [#32](https:/github.com/satwikkansal/wtfpython/issues/32) |
1212
| sohaibfarooqi | [sohaibfarooqi](https://github.com/sohaibfarooqi) | [#63](https:/github.com/satwikkansal/wtfpython/issues/63) |
1313

14-
Thank you all for taking out time, and helping to make this project awesome! :smile:
14+
Thank you all for taking out the time to make this project more awesome! :smile:

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
[![WTFPL 2.0][license-image]][license-url]
66

7+
Translations: [Chinese 中文](https://github.com/leisurelicht/wtfpython-cn)
78

89
Python, being a beautifully designed high-level and interpreter-based programming language, provides us with many features for the programmer's comfort. But sometimes, the outcomes of a Python snippet may not seem obvious to a regular user at first sight.
910

@@ -13,7 +14,7 @@ While some of the examples you see below may not be WTFs in the truest sense, bu
1314

1415
If you're an experienced Python programmer, you can take it as a challenge to get most of them right in first attempt. You may be already familiar with some of these examples, and I might be able to revive sweet old memories of yours being bitten by these gotchas :sweat_smile:
1516

16-
If you're a returning reader, you can learn about the new modifications [here](https://github.com/satwikkansal/wtfpython/releases/).
17+
PS: If you're a returning reader, you can learn about the new modifications [here](https://github.com/satwikkansal/wtfpython/releases/).
1718

1819
So, here we go...
1920

@@ -649,7 +650,7 @@ for x in range(7):
649650
def some_func():
650651
return x
651652
funcs.append(some_func)
652-
results.append(some_func())
653+
results.append(some_func()) # note the function call here
653654
654655
funcs_results = [func() for func in funcs]
655656
```
@@ -885,10 +886,10 @@ for item in mixed_list:
885886
886887
**Output:**
887888
```py
888-
>>> booleans_found_so_far
889-
0
890889
>>> integers_found_so_far
891890
4
891+
>>> booleans_found_so_far
892+
0
892893
```
893894
894895
2\.
@@ -949,7 +950,7 @@ class C(A):
949950
pass
950951
```
951952
952-
**Ouptut:**
953+
**Output:**
953954
```py
954955
>>> A.x, B.x, C.x
955956
(1, 1, 1)
@@ -2016,7 +2017,7 @@ Sshh.. It's a super secret.
20162017
#### 💡 Explanation:
20172018
+ `antigravity` module is one of the few easter eggs released by Python developers.
20182019
+ `import antigravity` opens up a web browser pointing to the [classic XKCD comic](http://xkcd.com/353/) about Python.
2019-
+ Well, there's more to it. There's **another easter egg inside the easter egg**. If 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/).
2020+
+ 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/).
20202021
20212022
---
20222023
@@ -2537,7 +2538,7 @@ The idea and design for this collection were initially inspired by Denys Dovhan'
25372538
* https://stackoverflow.com/questions/530530/python-2-x-gotchas-and-landmines
25382539
* https://stackoverflow.com/questions/1011431/common-pitfalls-in-python
25392540
* https://www.python.org/doc/humor/
2540-
* https://www.satwikkansal.xyz/archives/posts/python/My-Python-archives/
2541+
* https://www.codementor.io/satwikkansal/python-practices-for-efficient-code-performance-memory-and-usability-aze6oiq65
25412542
25422543
# 🎓 License
25432544
@@ -2552,9 +2553,9 @@ The idea and design for this collection were initially inspired by Denys Dovhan'
25522553
25532554
If you have any wtfs, ideas or suggestions, please share.
25542555
2555-
## Want to surprise your geeky pythonist friends?
2556+
## Surprise your geeky pythonist friends?
25562557
2557-
You can recommend wtfpython to your friends on Twitter and Linkedin by using these quick links,
2558+
You can use these quick links to recommend wtfpython to your friends,
25582559
25592560
[Twitter](https://twitter.com/intent/tweet?url=https://github.com/satwikkansal/wtfpython&hastags=python,wtfpython)
25602561
| [Linkedin](https://www.linkedin.com/shareArticle?url=https://github.com/satwikkansal&title=What%20the%20f*ck%20Python!&summary=An%20interesting%20collection%20of%20subtle%20and%20tricky%20Python%20snippets.)

wtfpython-pypi/wtf_python/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
except ImportError:
77
from urllib import urlretrieve
88

9-
url = ("https://raw.githubusercontent.com/satwikkansal/"
9+
url = ("http://raw.githubusercontent.com/satwikkansal/"
1010
"wtfpython/master/README.md")
1111

1212
file_path = join(dirname(dirname(realpath(__file__))), "content.md")

0 commit comments

Comments
 (0)