@@ -1799,8 +1799,6 @@ tuple()
17991799
18001800# ## Teleportation
18011801
1802- Suggested in [this](https:// www.reddit.com/ r/ Python/ comments/ 6x6upn / wtfpython_a_collection_of_interesting_and_tricky/ dme96dq/ ) reddit thread.
1803-
18041802```py
18051803import numpy as np
18061804
@@ -1831,8 +1829,6 @@ Is it worth a Nobel Prize?
18311829
18321830# ## yielding None
18331831
1834- Suggested by @ chris- rands in [this](https:// github.com/ satwikkansal/ wtfpython/ issues/ 32 ) issue.
1835-
18361832```py
18371833some_iterable = (' a' , ' b' )
18381834
@@ -1863,8 +1859,6 @@ def some_func(val):
18631859
18641860# ## The surprising comma
18651861
1866- Suggested by @ MostAwesomeDude in [this](https:// github.com/ satwikkansal/ wtfPython/ issues/ 1 ) issue.
1867-
18681862** Output:**
18691863```py
18701864>> > def f(x, y,):
@@ -1895,8 +1889,6 @@ SyntaxError: invalid syntax
18951889
18961890# ## For what?
18971891
1898- Suggested by @ MittalAshok in [this](https:// github.com/ satwikkansal/ wtfpython/ issues/ 23 ) issue.
1899-
19001892```py
19011893some_string = " wtf"
19021894some_dict = {}
@@ -1917,7 +1909,7 @@ for i, some_dict[i] in enumerate(some_string):
19171909 for_stmt: ' for' exprlist ' in' testlist ' :' suite [' else' ' :' suite]
19181910 ```
19191911 Where `exprlist` is the assignment target. This means that the equivalent of `{exprlist} = {next_value}` is ** executed for each item** in the iterable.
1920- An interesting example suggested by @ tukkek in [this](https: // github.com / satwikkansal / wtfPython / issues / 11 ) issue illustrates this:
1912+ An interesting example that illustrates this:
19211913 ```py
19221914 for i in range (4 ):
19231915 print (i)
@@ -1950,8 +1942,6 @@ for i, some_dict[i] in enumerate(some_string):
19501942
19511943# ## not knot!
19521944
1953- Suggested by @ MostAwesomeDude in [this](https:// github.com/ satwikkansal/ wtfPython/ issues/ 1 ) issue.
1954-
19551945```py
19561946x = True
19571947y = False
@@ -1979,8 +1969,6 @@ SyntaxError: invalid syntax
19791969
19801970# ## Subclass relationships
19811971
1982- Suggested by @ Lucas- C in [this](https:// github.com/ satwikkansal/ wtfpython/ issues/ 36 ) issue.
1983-
19841972** Output:**
19851973```py
19861974>> > from collections import Hashable
@@ -2005,8 +1993,6 @@ The Subclass relationships were expected to be transitive, right? (i.e. if `A` i
20051993
20061994# ## Mangling time!
20071995
2008- Suggested by @ Lucas- C in [this](https:// github.com/ satwikkansal/ wtfpython/ issues/ 36 ) issue.
2009-
20101996
20111997```py
20121998class Yo(object ):
@@ -2037,9 +2023,6 @@ Why did `Yo()._Yo__honey` worked? Only Indian readers would understand.
20372023
20382024# ## Deep down, we're all the same.
20392025
2040- Suggested by @ Lucas- C in [this](https:// github.com/ satwikkansal/ wtfpython/ issues/ 36 ) issue.
2041-
2042-
20432026```py
20442027class WTF :
20452028 pass
@@ -2083,8 +2066,6 @@ True
20832066
20842067# ## Half triple-quoted strings
20852068
2086- Suggested by @ asottile in [this](https:// github.com/ satwikkansal/ wtfpython/ issues/ 40 ) issue.
2087-
20882069** Output:**
20892070```py
20902071>> > print (' wtfpython' ' ' )
@@ -2166,8 +2147,6 @@ str
21662147
21672148### Stubborn `del` operator
21682149
2169- Suggested by @tukkek in [this](https://github.com/satwikkansal/wtfpython/issues/26) issue.
2170-
21712150```py
21722151class SomeClass:
21732152 def __del__(self):
@@ -2211,8 +2190,6 @@ Okay, now it's deleted :confused:
22112190
22122191### Let's see if you can guess this?
22132192
2214- Suggested by @PiaFraus in [this](https://github.com/satwikkansal/wtfPython/issues/9) issue.
2215-
22162193```py
22172194a, b = a[b] = {}, 5
22182195```
0 commit comments