Functional Python Programming

(Wang) #1

complex multiprocessing architectures 248
concurrent.futures module, using 248 , 249
concurrent.futures thread pools, using 249
concurrent processing, designing 250 - 252
map_async(), using 247
queue module, using 250
starmap_async(), using 247
threading module, using 250
using 244 - 246
Multipurpose Internet Mail Extension
(MIME) 285
multy() function 40
myreduce() function 267


N


named attributes
obtaining, when using higher-order
functions 257 , 258
namedtuples
building, with functional constructors 145
using 42 , 43
ncycles function 178
nested generator expressions 14
Nginx 290
non-strict dictionary rules
exploiting 255
non-strict evaluation 27 - 29
nth function 178
null_wrapper() function 215
num variable 259


O


Object-Oriented Programming (OOP)
language 26
OCaml 16
operator module
named attributes, obtaining when using
higher-order functions 257 , 258
using 256 , 257
operators
reducing with 260 , 261
starmapping with 258 - 260


operators.truediv() function 259
optimization techniques
accuracy, optimizing 311 , 312
caching 306 , 307
memoization 305
storage, optimizing 311

P
padnone function 178
pairwise function 179
parallelism 149
parameterized decorator
about 221
abstract decorator 222
decorating wrapper 222
overall decorator 222
partial() function
about 197 , 205
used, for applying partial arguments 205
partial gamma value
computing 323 - 325
partition function 179
path_filter() function 241
PATH_INFO request 294
Peano axioms 118
permutations() function 181
point_roll() function 277
polymorphism pattern matching 153 - 158
powerset function 194
previous results
caching, lru_cache decorator used 198 - 200
procedural paradigm
functional hybrid, using 14 , 15
functional paradigm, using 12 - 14
object creation 15 , 16
stacks of abstractions 16 , 17
subdividing 11 , 12
product() function 181
product, reducing
about 182 , 183
all pixels and all colors,
enumerating 185 , 186
collection of values, permuting 190 , 191
Free download pdf