C3 linearization, 238
careful_divide function, 142
CFFI module, 461
chain function, 102
child processes
class/es
clause.
code. See also statements
code points, 42
cold start, 475
combinations function, 108
combinations_with_replacement function, 108
commands, interactive debugger, 567
comma/s. See also syntax
communicate method, 321
comprehensions, 173
concurrency, 319
contains function, 37
converting
copy method, 136
CPU. See also concurrency; parallelism; performance; threads
cycle function, 103
Cython, 461
De Morgan’s laws, 101
debugging. See also exceptions/exception handling
decoupling, child process from parent, 321
dependency/ies, 212, 481. See also breaking circular dependencies
deterministic behavior, 203
development environment, 593
double-ended queue, 507
dropwhile function, 105
dynamic attributes, 265
empty sequence, looping over, 83
empty tuple, 16
encoding, open, 46
error/s. See also exceptions/exception handling
escaping, 63
explicit string concatenation, 66
extending tuples, 131
fan-in, 348
FIFO (first in, first out) queue, 504–509. See also producer–consumer queue; queue
file system cache, 477
files
filtering items from an iterator
first-class function, 202
format
formatting, 47
function/s, 175, 238–240, 315–317
animate, 187
asdict, 226
careful_divide, 142
chain, 102
combinations, 108
combinations_with_replacement, 108
contains, 37
cycle, 103
dropwhile, 105
filterfalse, 105
first-class, 202
generator, 87, 173, 182–184. See also generator/s
get_cause, 435
hash, 110
help, 168
helper, 8–11, 21, 42–43, 84, 126, 145–146, 168–169, 232, 251
isinstance, 206
islice, 104
kernel, 460
log_missing, 202
map, 174
my_print, 213
namedtuple, 259
None return value, 142
pairwise, 106
permutations, 107
product, 107
repeat, 103
tee, 103
utility, 451
wrapper, 168
if statements, 19
immutable objects
IndexError exception, 336
inheritance
inline negation, 5
I/O
isinstance function, 206
islice function, 104
islice method, 72
memory
method/s
metrics, 447
MRO (method resolution order), 238
my_print function, 213
Mypyc, 461
packages, 588
pairwise function, 106
parallelism, 319
parent class
parent process, decoupling child process from, 321
parentheses
PEP 8 (Python Enhancement Proposal #8), 3
performance. See also profiling
permutations function, 107
pretty method, 209
pretty print, 215
print_callers method, 452
producing combinations of items from iterators
product function, 107
profiling, 448
programs. See also code; performance
pylint, 6
PyPI (Python Package Index), 575
Python
Pythonic style, 1
tee function, 103
threading module, 332
thread/s, 319. See also concurrency; parallelism
versus coroutines, 364
title method, 50
tree walking, 206