Skip to content

Commit 7fefc6a

Browse files
committed
* Add TOC
* Remove hell of an example TODO
1 parent 1f58359 commit 7fefc6a

File tree

1 file changed

+78
-8
lines changed

1 file changed

+78
-8
lines changed

generated.md

+78-8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,80 @@ If you're an experienced Python programmer, you can take it as a challenge to ge
1414

1515
So, here we go...
1616

17+
# Table of Contents
18+
19+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
20+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
21+
22+
23+
- [Structure of the Examples](#structure-of-the-examples)
24+
- [Usage](#usage)
25+
- [👀 Examples](#-examples)
26+
- [Section: Appearances are Deceptive!](#section-appearances-are-deceptive)
27+
- [▶ Skipping lines?](#%E2%96%B6-skipping-lines)
28+
- [▶ Teleportation *](#%E2%96%B6-teleportation-)
29+
- [▶ Well, something is fishy...](#%E2%96%B6-well-something-is-fishy)
30+
- [Section: The Hiddent treasures](#section-the-hiddent-treasures)
31+
- [▶ Okay Python, Can you make me fly? *](#%E2%96%B6-okay-python-can-you-make-me-fly-)
32+
- [`goto`, but why? *](#%E2%96%B6-goto-but-why-)
33+
- [▶ Brace yourself! *](#%E2%96%B6-brace-yourself-)
34+
- [▶ Let's meet Friendly Language Uncle For Life *](#%E2%96%B6-lets-meet-friendly-language-uncle-for-life-)
35+
- [▶ Even Python understands that love is complicated *](#%E2%96%B6-even-python-understands-that-love-is-complicated-)
36+
- [▶ Yes, it exists!](#%E2%96%B6-yes-it-exists)
37+
- [▶ Inpinity *](#%E2%96%B6-inpinity-)
38+
- [▶ Mangling time! *](#%E2%96%B6-mangling-time-)
39+
- [Section: Strain your Brain](#section-strain-your-brain)
40+
- [▶ Strings can be tricky sometimes *](#%E2%96%B6-strings-can-be-tricky-sometimes-)
41+
- [▶ Time for some hash brownies!](#%E2%96%B6-time-for-some-hash-brownies)
42+
- [▶ Return return everywhere!](#%E2%96%B6-return-return-everywhere)
43+
- [▶ Deep down, we're all the same. *](#%E2%96%B6-deep-down-were-all-the-same-)
44+
- [▶ For what?](#%E2%96%B6-for-what)
45+
- [▶ Evaluation time discrepancy](#%E2%96%B6-evaluation-time-discrepancy)
46+
- [`is` is not what it is!](#%E2%96%B6-is-is-not-what-it-is)
47+
- [▶ A tic-tac-toe where X wins in the first attempt!](#%E2%96%B6-a-tic-tac-toe-where-x-wins-in-the-first-attempt)
48+
- [▶ The sticky output function](#%E2%96%B6-the-sticky-output-function)
49+
- [`is not ...` is not `is (not ...)`](#%E2%96%B6-is-not--is-not-is-not-)
50+
- [▶ The surprising comma](#%E2%96%B6-the-surprising-comma)
51+
- [▶ Backslashes at the end of string](#%E2%96%B6-backslashes-at-the-end-of-string)
52+
- [▶ not knot!](#%E2%96%B6-not-knot)
53+
- [▶ Half triple-quoted strings](#%E2%96%B6-half-triple-quoted-strings)
54+
- [▶ Midnight time doesn't exist?](#%E2%96%B6-midnight-time-doesnt-exist)
55+
- [▶ What's wrong with booleans?](#%E2%96%B6-whats-wrong-with-booleans)
56+
- [▶ Class attributes and instance attributes](#%E2%96%B6-class-attributes-and-instance-attributes)
57+
- [▶ yielding None](#%E2%96%B6-yielding-none)
58+
- [▶ Mutating the immutable!](#%E2%96%B6-mutating-the-immutable)
59+
- [▶ The disappearing variable from outer scope](#%E2%96%B6-the-disappearing-variable-from-outer-scope)
60+
- [▶ When True is actually False](#%E2%96%B6-when-true-is-actually-false)
61+
- [▶ From filled to None in one instruction...](#%E2%96%B6-from-filled-to-none-in-one-instruction)
62+
- [▶ Subclass relationships *](#%E2%96%B6-subclass-relationships-)
63+
- [▶ Implicity key type conversion *](#%E2%96%B6-implicity-key-type-conversion-)
64+
- [▶ Let's see if you can guess this?](#%E2%96%B6-lets-see-if-you-can-guess-this)
65+
- [Section: Watchout for the landmines!](#section-watchout-for-the-landmines)
66+
- [▶ Modifying a dictionary while iterating over it](#%E2%96%B6-modifying-a-dictionary-while-iterating-over-it)
67+
- [▶ Stubborn `del` operator *](#%E2%96%B6-stubborn-del-operator-)
68+
- [▶ Deleting a list item while iterating over it](#%E2%96%B6-deleting-a-list-item-while-iterating-over-it)
69+
- [▶ Loop variables leaking out of local scope!](#%E2%96%B6-loop-variables-leaking-out-of-local-scope)
70+
- [▶ Beware of default mutable arguments!](#%E2%96%B6-beware-of-default-mutable-arguments)
71+
- [▶ Catching the Exceptions!](#%E2%96%B6-catching-the-exceptions)
72+
- [▶ Same operands, different story!](#%E2%96%B6-same-operands-different-story)
73+
- [▶ Using a variable not defined in scope](#%E2%96%B6-using-a-variable-not-defined-in-scope)
74+
- [▶ Be careful with chained operations](#%E2%96%B6-be-careful-with-chained-operations)
75+
- [▶ Name resolution ignoring class scope](#%E2%96%B6-name-resolution-ignoring-class-scope)
76+
- [▶ Needle in a Haystack](#%E2%96%B6-needle-in-a-haystack)
77+
- [Section: Miscallaneous](#section-miscallaneous)
78+
- [`+=` is faster](#%E2%96%B6--is-faster)
79+
- [▶ Let's make a giant string!](#%E2%96%B6-lets-make-a-giant-string)
80+
- [▶ Explicit typecast of strings](#%E2%96%B6-explicit-typecast-of-strings)
81+
- [▶ Minor Ones](#%E2%96%B6-minor-ones)
82+
- [Contributing](#contributing)
83+
- [Acknowledgements](#acknowledgements)
84+
- [🎓 License](#-license)
85+
- [Help](#help)
86+
- [Want to share wtfPython with friends?](#want-to-share-wtfpython-with-friends)
87+
- [Need a pdf version?](#need-a-pdf-version)
88+
89+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
90+
1791
# Structure of the Examples
1892

1993
All the examples are structured like below:
@@ -185,7 +259,7 @@ Shouldn't that be 100?
185259
186260
---
187261
188-
## The Hiddent treasures
262+
## Section: The Hiddent treasures
189263
190264
191265
### ▶ Okay Python, Can you make me fly? *
@@ -434,7 +508,7 @@ Why did `Yo()._Yo__honey` worked? Only Indian readers would understand.
434508
435509
---
436510
437-
## Strain your Brain
511+
## Section: Strain your Brain
438512
439513
### ▶ Strings can be tricky sometimes *
440514
@@ -1456,7 +1530,7 @@ a, b = a[b] = {}, 5
14561530
14571531
---
14581532
1459-
## Watchout for the landmines!
1533+
## Section: Watchout for the landmines!
14601534
14611535
14621536
### ▶ Modifying a dictionary while iterating over it
@@ -2008,7 +2082,7 @@ tuple()
20082082
20092083
---
20102084
2011-
## Miscallaneous
2085+
## Section: Miscallaneous
20122086
20132087
20142088
### ▶ `+=` is faster
@@ -2213,10 +2287,6 @@ nan
22132287
22142288
---
22152289
2216-
# TODO: Hell of an example!
2217-
2218-
Trying to come up with an example that combines multiple examples discussed above, making it difficult for the reader to guess the output correctly :sweat_smile:.
2219-
22202290
# Contributing
22212291
22222292
All patches are Welcome! Please see [CONTRIBUTING.md](/CONTRIBUTING.md) for further details.

0 commit comments

Comments
 (0)