Page 237 - think python 2
P. 237

Index
215
 sorted, 99, 106, 121 sqrt, 18, 53
str, 18
sum, 118, 185 tuple, 115
type, 153
zip, 118
function argument, 21
function call, 17, 26
function composition, 54 function definition, 19, 20, 25 function frame, 23, 26, 44, 56, 109 function object, 27
function parameter, 21
function syntax, 162
function type, 20
modifier, 157
pure, 156
function, fruitful, 24
function, math, 18
function, reasons for, 24
function, trigonometric, 18
function, tuple as return value, 117 function, void, 24
functional programming style, 158, 160
gamma function, 58
gather, 118, 123, 190
GCD (greatest common divisor), 61 generalization, 32, 36, 85, 159 generator expression, 185, 186, 191 generator object, 185
geometric resizing, 209
get method, 105
getattr function, 168
getcwd function, 139
global statement, 110, 112
global variable, 110, 112
update, 110
GNU Free Documentation License, v, vi greatest common divisor (GCD), 61 grid, 27
guardian pattern, 59, 60, 78
Hand class, 176
hanging, 195
HAS-A relationship, 177, 180 hasattr function, 153, 168 hash function, 108, 112, 207 hashable, 108, 112, 120
HashMap, 207 hashtable, 112, 206, 210 header, 19, 25, 194 Hello, World, 3 hexadecimal, 148 high-level language, 6 histogram, 105
random choice, 126, 130
word frequencies, 127 Holmes, Sherlock, 25 homophone, 113 hypotenuse, 54
identical, 100
identity, 96, 152
if statement, 41
immutability, 74, 79, 97, 108, 115, 121 implementation, 105, 112, 132, 169 import statement, 26, 144
in operator, 205
in operator, 76, 85, 90, 104 increment, 64, 69, 157, 163 incremental development, 60, 193 indentation, 19, 162, 194
index, 71, 78, 79, 90, 103, 197
looping with, 86, 91 negative, 72
slice, 73, 91
starting at zero, 71, 90
IndexError, 72, 78, 90, 197
indexing, 204
infinite loop, 65, 69, 195, 196
infinite recursion, 44, 47, 58, 195, 196 information hiding, 169
inheritance, 176, 178, 180, 190
init method, 164, 168, 172, 174, 176 initialization
variable, 69
initialization (before update), 64 input function, 45
instance, 148, 153
as argument, 149
as return value, 150
instance attribute, 148, 153, 172, 180 instantiate, 153
instantiation, 148
int function, 17
int type, 4
integer, 4, 7
interactive mode, 11, 14, 24

































   235   236   237   238   239