Skip to content

Commit 615bc15

Browse files
committed
Categorize the snippets
1 parent e58700d commit 615bc15

File tree

1 file changed

+152
-0
lines changed

1 file changed

+152
-0
lines changed

add_categories

+152
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
Skipping lines?
2+
a
3+
4+
Well, something is fishy...
5+
a
6+
7+
Time for some hash brownies!
8+
f
9+
10+
Evaluation time discrepancy
11+
f
12+
13+
Modifying a dictionary while iterating over it
14+
c
15+
16+
Deleting a list item while iterating over it
17+
c
18+
19+
Backslashes at the end of string
20+
f
21+
22+
Brace yourself!
23+
t*
24+
25+
"this" is love :heart:
26+
t*
27+
28+
Okay Python, Can you make me fly?
29+
t*
30+
31+
`goto`, but why?
32+
t*
33+
34+
Let's meet Friendly Language Uncle For Life
35+
t*
36+
37+
Inpinity
38+
t*
39+
40+
Strings can be tricky sometimes
41+
f*
42+
43+
`+=` is faster
44+
m
45+
46+
Let's make a giant string!
47+
m
48+
49+
Yes, it exists!
50+
t
51+
52+
`is` is not what it is!
53+
f
54+
55+
`is not ...` is not `is (not ...)`
56+
f
57+
58+
The function inside loop sticks to the same output
59+
f
60+
61+
Loop variables leaking out of local scope!
62+
c
63+
64+
A tic-tac-toe where X wins in the first attempt!
65+
f
66+
67+
Beware of default mutable arguments!
68+
c
69+
70+
Same operands, different story!
71+
c
72+
73+
Mutating the immutable!
74+
f
75+
76+
Using a variable not defined in scope
77+
c
78+
79+
The disappearing variable from outer scope
80+
f
81+
82+
Return return everywhere!
83+
f
84+
85+
When True is actually False
86+
f
87+
88+
Be careful with chained operations
89+
c
90+
91+
Name resolution ignoring class scope
92+
c
93+
94+
From filled to None in one instruction...
95+
f
96+
97+
Explicit typecast of strings
98+
m
99+
100+
Class attributes and instance attributes
101+
f
102+
103+
Catching the Exceptions!
104+
f
105+
106+
Midnight time doesn't exist?
107+
f
108+
109+
What's wrong with booleans?
110+
f
111+
112+
Needle in a Haystack
113+
c
114+
115+
Teleportation
116+
a*
117+
118+
yielding None
119+
f
120+
121+
The surprising comma
122+
f
123+
124+
For what?
125+
f
126+
127+
not knot!
128+
f
129+
130+
Subclass relationships
131+
f*
132+
133+
Mangling time!
134+
t*
135+
136+
Deep down, we're all the same.
137+
f*
138+
139+
Half triple-quoted strings
140+
f
141+
142+
Implicity key type conversion
143+
f*
144+
145+
Stubborn `del` operator
146+
c*
147+
148+
Let's see if you can guess this?
149+
f
150+
151+
Minor Ones
152+
m

0 commit comments

Comments
 (0)