Page 234 - think python 2
P. 234

212
Index
 break statement, 66 bubble sort, 201 bug, 6, 7, 13
worst, 170 built-in function
any, 185, 186 bytes object, 141, 145
calculator, 8, 15
call graph, 109, 112
Car Talk, 88, 113, 124
Card class, 172
card, playing, 171
carrying, addition with, 68, 156, 158 catch, 145
chained conditional, 41, 47 character, 71
checksum, 143, 146
child class, 176, 180
choice function, 126
circle function, 31
circular definition, 55
class, 4, 147, 153
Card, 172 child, 176, 180 Deck, 174 Hand, 176 Kangaroo, 170 parent, 176 Point, 148, 165 Rectangle, 149 Time, 155
class attribute, 172, 180 class definition, 147
class diagram, 177, 181 class object, 148, 153, 190 close method, 138, 141, 143 __cmp__ method, 173 Collatz conjecture, 65 collections, 187, 188, 190 colon, 19, 194
comment, 13, 15 commutativity, 13, 167 compare function, 52 comparing algorithms, 201 comparison
string, 77
tuple, 116, 174 comparison sort, 205 composition, 19, 22, 26, 54, 174
compound statement, 41, 47 concatenation, 12, 14, 22, 73, 74, 95
list, 91, 97, 101 condition, 41, 47, 65, 196 conditional, 194
chained, 41, 47
nested, 42, 47
conditional execution, 41 conditional expression, 183, 191 conditional statement, 41, 47, 55, 184 consistency check, 111, 158
constant time, 208
contributors, vii
conversion
type, 17 copy
deep, 152
shallow, 152
slice, 74, 92
to avoid aliasing, 99
copy module, 151 copying objects, 151 count method, 79 Counter, 187
counter, 75, 79, 104, 111 counting and looping, 75 Creative Commons, vi crossover point, 202, 209 crosswords, 83 cumulative sum, 100
data encapsulation, 179, 181 data structure, 122, 123, 132 database, 141, 145
database object, 141 datetime module, 160
dbm module, 141
dead code, 52, 60, 198
debugger (pdb), 197
debugging, 6, 7, 13, 36, 46, 59, 77, 87, 98, 111,
122, 133, 144, 152, 159, 168, 178,
185, 193 by bisection, 68
emotional response, 6, 200 experimental, 25
rubber duck, 134 superstition, 200
deck, 171
Deck class, 174
deck, playing cards, 174















































   232   233   234   235   236