Index
-
abecedarian Chapter 15, Exercise 17.6
-
abs function §9.1
-
absolute path item absolute path:, §26.3
-
access §18.2
-
accumulator item accumulator:
-
add method §29.7
-
addition with carrying §13.1
-
algorithm Appendix B, §13.1, item algorithm:
-
aliasing Chapter 21, item aliasing:, §27.2, Exercise 29.1
-
all §30.4
-
alternative execution §8.1
-
anagram Exercise 21.6
-
anagram set Exercise 26.2
-
analysis of algorithms Appendix B, item analysis of algorithms:
-
analysis of primitives §B.2
-
and operator §7.1
-
any §30.4
-
append method §20.2, §21.1, Exercise 21.9
-
arc function item 5
-
Archimedian spiral Exercise 6.4
-
argument §21.1, §3.1, Chapter 4, §4.3, §4.3, item argument:
-
arithmetic operator §1.4
-
assert statement §28.5, item assert statement:
-
assignment Chapter 11, §18.1, item assignment:
-
assignment statement §2.1
-
attribute §27.6, §29.10
-
AttributeError item AttributeError:, §27.6
-
augmented assignment item augmented assignment:
-
average case 2nd item
-
Babylonian method Chapter 13
-
badness §B.1
-
Big-Oh notation item Big-Oh notation:
-
big-oh notation §B.1
-
big, hairy expression §A.3.2
-
binary search Exercise 21.10
-
birthday item 2
-
birthday paradox Exercise 21.8
-
bisect module Exercise 21.10
-
bisection search §B.3, Exercise 21.10
-
bisection, debugging by §13.2
-
bitwise operator §1.4
-
body Chapter 12, Chapter 4, item body:
-
bool type Chapter 7
-
boolean expression Chapter 7, item boolean expression:
-
boolean function §8.4
-
boolean operator Chapter 22
-
borrowing, subtraction with §13.1, §28.4
-
bracket
-
bracket operator §14.1, §18.2
-
branch §8.1, item branch:
-
bubble sort Appendix B
-
bug §1.6, item bug:, §2.7
-
built-in function
-
bytes object item bytes object:, §26.5
-
calculator item 3, Exercise 2.2
-
call graph Chapter 25, item call graph:
-
Car Talk Exercise 17.7, Exercise 17.8, Exercise 17.9, Exercise 25.5
-
carrying, addition with §13.1, §28.2, §28.4
-
catch item catch:
-
chained conditional §8.2, item chained conditional:
-
character §14.1
-
checksum item 1, §26.7
-
circle function item 4
-
class §1.5, §27.1, item class:
-
class definition §27.1
-
class object §27.1, item class object:, §30.8
-
close method §26.2, §26.5, §26.7
-
Collatz conjecture Chapter 12
-
collections §30.6, §30.7, §30.8
-
colon item 2, Chapter 4
-
commutativity §2.5, §29.8
-
compare function §9.1
-
comparing algorithms Appendix B
-
comparison
-
comparison sort item 1
-
compound statement Chapter 8, item compound statement:
-
concatenation Chapter 15, §15.1, §2.5, item concatenate:, §20.4, Chapter 5
-
condition §A.2.2, Chapter 12, Chapter 8, item condition:
-
conditional item 6
-
conditional execution Chapter 8
-
conditional expression §30.1, item conditional expression:
-
conditional statement §30.1, Chapter 8, §8.4, item conditional statement:
-
consistency check item Write self-checks:, §28.4
-
contributors Contributor List
-
conversion
-
copy
-
count method Exercise 16.2
-
Counter §30.6
-
counter §15.3, item counter:, §23.2, §25.1
-
counting and looping §15.3
-
Creative Commons Acknowledgments
-
crossover point §B.1, item crossover point:
-
crosswords §17.1
-
cumulative sum Exercise 21.2
-
database item database:, §26.5
-
database object §26.5
-
datetime module Exercise 28.2
-
dbm
module §26.5
-
dead code §A.2.4, item dead code:, §9.1
-
debugger (pdb) §A.2.3
-
debugging Appendix A, §1.6, §1.6, item debugging:, §10.1, §16.2, §17.5, §2.7, §21.2, §25.2, §26.9, §27.6, §28.5, §29.9, §30.2, §6.10, §8.5
-
declaration §25.1, item declaration:
-
decrement §11.1, item decrement:
-
deep copy item deep copy:
-
def keyword Chapter 4
-
default value §29.5
-
defaultdict §30.7
-
definition
-
deletion, element of list §20.3
-
delimiter §20.4, item delimiter:
-
designed development item designed development:
-
development plan item development plan:
-
diagram
-
call graph item call graph:
-
object §27.2, §27.3, item object diagram:, §28.1
-
stack §21.1, §5.1
-
state Chapter 11, §16.2, §18.2, §2.1, Chapter 21, §27.2, §27.3, §28.1
-
__dict__ attribute §29.9
-
dictionary item KeyError:, §23.1, item dictionary:
-
dictionary methods §B.2
-
dictionary subtraction §30.5
-
diff item 3
-
Dijkstra, Edsger §17.5
-
dir function item AttributeError:
-
directory item directory:, §26.3
-
dispatch, type-based §29.8
-
divisibility §1.4.1
-
division
-
divmod §28.4
-
docstring §27.1, item docstring:, §6.9
-
dot notation Chapter 16, §27.2, §29.2, §3.2, item dot notation:
-
Double Day item 4
-
double letters Exercise 17.7
-
Doyle, Arthur Conan §5.4
-
duplicate Exercise 21.7, Exercise 25.3, item 1, §30.5
-
element §18.1, item element:
-
element deletion §20.3
-
elif keyword §8.2
-
Elkner, Jeff The strange history of this book, Acknowledgments
-
else keyword §8.1
-
embedded object §27.3, item embedded object:, Exercise 29.1
-
emotional debugging 1st item, §1.6
-
empty list §18.1
-
empty string item empty string:, §20.4
-
encapsulation Exercise 13.1, §15.3, item encapsulation:, §6.4
-
end of line character §26.9
-
epsilon Chapter 13
-
equality and assignment Chapter 11
-
equivalent item equivalent:
-
error
-
error message §A.1, Exercise 1.1, item Syntax error:, item Semantic error:
-
evaluate §2.3
-
exception 2nd item, §A.2.3, item Runtime error:, item exception:
-
exception, catching §26.4
-
execute §2.3, item execute:
-
exists function §26.3
-
experimental debugging §5.4
-
exponent §B.1
-
exponential growth §B.1
-
expression §2.3, item expression:
-
extend method §20.2
-
factorial §30.1
-
factory item factory:
-
factory function §30.7, §30.7
-
False special value Chapter 7
-
fibonacci function Chapter 25
-
file §26.1
-
file object §17.1, item file object:
-
filename §26.3
-
FileNotFoundError §26.4
-
filter pattern §30.2
-
find function §15.2
-
flag §25.1, item flag:
-
float function §3.1
-
float type §1.5
-
floating-point §1.5, item floating-point:, Chapter 13, §30.1
-
floating-point division §1.4.1
-
floor division §1.4.1, item floor division:, §8.5
-
flow of execution §A.2.2, §10.1, Chapter 12, §4.2, item flow of execution:
-
flower Exercise 6.2
-
folder §26.3
-
for loop Chapter 15, Chapter 19, §30.2, §6.2
-
format operator 2nd item, item format operator:
-
format sequence item format sequence:
-
format string item format string:
-
frame Chapter 25, §5.1, item frame:
-
Free Documentation License, GNU The strange history of this book, Acknowledgments
-
frequency §23.2
-
fruitful function §5.2, item fruitful function:
-
frustration 1st item
-
function §1.3, §29.1, Chapter 3, Chapter 4, item function:
-
abs §9.1
-
arc item 5
-
circle item 4
-
compare §9.1
-
dir item AttributeError:
-
exists §26.3
-
factorial §30.1
-
fibonacci Chapter 25
-
find §15.2
-
float §3.1
-
fruitful §5.2
-
getattr §29.9
-
getcwd §26.3
-
hasattr §27.6, §29.9
-
int §3.1
-
isinstance §27.6, §29.8
-
len §14.2, §23.1, Exercise 5.1
-
list §20.4
-
log §3.2
-
math §3.2
-
open §17.1, §17.1, §26.2, §26.4, §26.5
-
polygon item 3
-
popen §26.7
-
programmer defined §4.3
-
randint Exercise 21.8
-
reasons for §5.3
-
reload 5th item, §26.8
-
repr §26.9
-
sorted item 2, Chapter 24
-
sqrt Chapter 10, §3.2
-
str §3.1
-
sum §30.3
-
trigonometric §3.2
-
void §5.2
-
function argument §4.3
-
function call §3.1, item function call:
-
function definition Chapter 4, §4.1, item function definition:, item function object:
-
function frame Chapter 25, §5.1, item frame:
-
function object Exercise 5.2
-
function parameter §4.3
-
function syntax §29.2
-
function type Chapter 4
-
functional programming style §28.3, item functional programming style:
-
gather §30.9
-
generalization §17.3, §28.4, item generalization:, §6.5
-
generator expression item generator expression:, §30.3, §30.4
-
generator object §30.3
-
getattr function §29.9
-
getcwd function §26.3
-
global statement §25.1, item global statement:
-
global variable §25.1, item global variable:
-
GNU Free Documentation License The strange history of this book, Acknowledgments
-
grid item 1
-
hanging §A.2.2
-
hasattr function §27.6, §29.9
-
hash function item hash function:
-
hashable item hashable:
-
hashtable item hashtable:, item hashtable:
-
Hello, World §1.3
-
hexadecimal §27.1
-
high-level language item high-level language:
-
histogram §23.2, §23.2
-
Holmes, Sherlock §5.4
-
homophone Exercise 25.5
-
hypotenuse Chapter 10
-
identical item identical:
-
if statement Chapter 8
-
immutability §15.1, §15.1, item immutable:, Chapter 21
-
implementation §23.2, item implementation:, §29.10
-
import statement §26.8, item import statement:
-
in operator §B.3
-
in operator §17.3, Chapter 22, §22.2, §23.1
-
in-place operator §11.1
-
increment §11.1, item increment:, §28.3, §29.3
-
incremental development §A.1, item incremental development:
-
indentation item 7, §29.2, Chapter 4
-
index 1st item, §14.1, §14.1, §16.2, item index:, §18.2, §23.1
-
IndexError item IndexError:, §14.2, §16.2, 2nd item
-
indexing §B.2
-
infinite loop §A.2.2, §A.2.2, Chapter 12, item infinite loop:
-
infinite recursion §A.2.2, §A.2.2
-
inheritance §30.8
-
init method §29.5, §29.9
-
initialization
-
initialization (before update) §11.1
-
instance §27.1, item instance:
-
instance attribute §27.2, item attribute:
-
instantiate item instantiate:
-
instantiation §27.1
-
int function §3.1
-
int type §1.5
-
integer §1.5, item integer:
-
interactive mode item interactive mode:, §5.2
-
interface §29.10, §6.10, item interface:, §6.6
-
interlocking words Exercise 21.12
-
interpret item interpreter:
-
invariant §28.5, item invariant:
-
invocation Chapter 16, item invocation:
-
isinstance function §27.6, §29.8
-
item §15.1, item item:, §18.1, §23.1
-
item assignment §15.1, §18.2
-
item update Chapter 19
-
iteration Chapter 12, item iteration:
-
iterator 2nd item
-
join §B.2
-
join method §20.4
-
Kangaroo class Exercise 29.1
-
key §23.1, item key:
-
key-value pair §23.1, item key-value pair:
-
KeyError item KeyError:, §23.1
-
keyword item 1, §2.2, item keyword:
-
keyword argument §30.9, item keyword argument:, §6.5
-
language
-
leading coefficient §B.1
-
leading term §B.1, item leading term:
-
len function §14.2, §23.1, Exercise 5.1
-
letter rotation Exercise 16.4, Exercise 25.4
-
linear item linear:
-
linear growth §B.1
-
linear search §B.3
-
Linux §5.4
-
lipogram Exercise 17.2
-
list §18.1, §20.4, item list:, §30.2
-
list comprehension item list comprehension:, §30.2
-
list methods §B.2
-
local variable Chapter 5, item local variable:
-
log function §3.2
-
logarithmic growth §B.1
-
logical operator Chapter 7, §7.1
-
lookup item lookup:
-
loop Chapter 12, item loop:, §6.2
-
loop variable §30.2
-
looping
-
looping and counting §15.3
-
low-level language item low-level language:
-
ls (Unix command) §26.7
-
machine model 1st item, item machine model:
-
main §25.1, §26.8, §5.1
-
maintainable §29.10
-
map pattern item map:
-
mapping item mapping:
-
math function §3.2
-
McCloskey, Robert Chapter 15
-
md5 §26.7
-
MD5 algorithm item 1
-
md5sum item 2
-
membership
-
memo Chapter 25, item memo:
-
mental model §A.3.1
-
metaphor, method invocation §29.2
-
method Chapter 16, §29.1, item method:, item method:
-
method syntax §29.2
-
method, list §20.2
-
Meyers, Chris Acknowledgments
-
Moby Project §17.1
-
model, mental §A.3.1
-
modifier §28.3, item modifier:
-
module §3.2, item module:, item module object:
-
module object §26.8, §3.2
-
module, writing §26.8
-
modulus operator §1.4.1, item modulus operator:
-
Monty Python and the Holy Grail §28.2
-
MP3 Exercise 26.3
-
multiline string item 4, §6.9
-
multiset §30.6
-
mutability §15.1, §18.2, Chapter 21, §25.1, §27.5
-
mutable object, as default value Exercise 29.1
-
name built-in variable §26.8
-
namedtuple §30.8
-
NameError item NameError:, Chapter 5
-
NaN §30.1
-
negative index §14.2
-
nested conditional §8.3, item nested conditional:
-
nested list §18.1, Chapter 19, item nested list:
-
None special value §20.2, §5.2, item None:, §9.1
-
NoneType type §5.2
-
not operator §7.1
-
Obama, Barack Appendix B
-
object §15.1, item object:, item object:
-
object diagram §27.2, §27.3, item object diagram:, §28.1
-
object-oriented design §29.10
-
object-oriented language item object-oriented language:
-
object-oriented programming Chapter 27, §29.1, item object-oriented programming:
-
odometer Exercise 17.8
-
Olin College The strange history of this book
-
open function §17.1, §17.1, §26.2, §26.4, §26.5
-
operand item operand:
-
operator item operator:
-
operator overloading §29.7
-
operators
-
optional argument Chapter 16, item optional argument:, Exercise 16.1, §20.4, §30.1
-
optional parameter §29.5
-
or operator §7.1
-
order of growth §B.1, item order of growth:
-
order of operations §A.3.2, §2.4, item order of operations:
-
os module §26.3
-
other (parameter name) §29.4
-
OverflowError §8.5
-
overloading item operator overloading:
-
override §29.5
-
palindrome §17.4, Exercise 17.8, Exercise 17.9
-
parameter §21.1, §4.3, Chapter 5, item parameter:
-
parentheses
-
pass statement Chapter 8
-
path item path:, §26.3
-
pattern
-
pdb (Python debugger) §A.2.3
-
PEMDAS §2.4
-
permission, file §26.4
-
persistence §26.1, item persistent:
-
pi Exercise 13.2, §3.2
-
pickle module §26.1, §26.6
-
pickling §26.6
-
pie Exercise 6.3
-
pipe §26.7
-
pipe object item pipe object:
-
plain text §17.1
-
planned development §28.4
-
Point class §27.1, §29.5
-
point, mathematical §27.1
-
polygon
function item 3
-
polymorphism item polymorphic:
-
pop method §20.3
-
popen function §26.7
-
portability item portability:
-
positional argument item positional argument:, §29.3, §30.9
-
postcondition §10.1, §6.10
-
pprint module item Format the output:
-
precedence §A.3.2
-
precondition §10.1, §6.10, item precondition:, item postcondition:
-
predicate §8.4
-
pretty print item Format the output:
-
print function §1.3
-
print statement §A.2.4, §1.3, item print statement:, §29.6
-
problem solving Chapter 1, item problem solving:
-
program §1.1, item program:
-
program testing §17.5
-
programmer-defined function §4.3
-
programmer-defined type §27.1, item class:, §28.1, §29.1, §29.7
-
prompt item prompt:
-
prototype and patch §28.2, §28.4, item prototype and patch:
-
pure function §28.2, item pure function:
-
Puzzler Exercise 17.7, Exercise 17.8, Exercise 17.9, Exercise 25.5
-
Pythagorean theorem Chapter 10
-
quadratic item quadratic:
-
quadratic growth §B.1
-
quotation mark item 3, §1.3, §1.5, §14.3, §6.9
-
radd method §29.8
-
radian §3.2
-
radix sort Appendix B
-
rage 1st item
-
raise statement item raise statement:, §28.5
-
Ramanujan, Srinivasa Exercise 13.2
-
randint function Exercise 21.8
-
random module Exercise 21.8
-
random walk programming 3rd item
-
read method §26.7
-
readline method §17.1, §26.7
-
reassignment Chapter 11, item reassignment:, §18.2, §25.1
-
Rectangle class §27.3
-
recursion
-
reduce pattern item reduce:
-
reducible word Exercise 25.5
-
reduction to a
previously solved problem §17.3
-
reduction to a previously solved problem §17.4, item reduction to a previously solved problem:
-
refactoring item refactoring:, §6.7, §6.7
-
reference Chapter 21, §21.1, item reference:
-
relational operator Chapter 7
-
relative path item relative path:, §26.3
-
reload function 5th item, §26.8
-
repetition §6.2
-
repr function §26.9
-
representation §27.1, §27.3
-
return statement §A.3.3, §9.1
-
return value §27.4, §3.1, item return value:, §9.1
-
reverse lookup item reverse lookup:
-
reverse word pair Exercise 21.11
-
rotation
-
rotation, letter Exercise 16.4
-
running pace item 3, item 3, Exercise 28.1
-
runtime error 2nd item, §A.2.3, item Runtime error:, §8.5
-
safe language item Runtime error:
-
sanity check item Write self-checks:
-
scaffolding Chapter 10, item scaffolding:, §25.2
-
scatter §30.9
-
Schmidt, Eric Appendix B
-
script item script:
-
script mode item script mode:, §5.2
-
search §B.3, item search:
-
search pattern §15.2, item search:, §17.3, §30.4
-
search, binary Exercise 21.10
-
search, bisection Exercise 21.10
-
self (parameter name) §29.2
-
semantic error 3rd item, §A.3, item Semantic error:, item semantic error:
-
semantics item semantics:, §29.1
-
sequence §1.5, Chapter 14, §14.1, item sequence:, §18.1, §20.4
-
set §30.5
-
set membership Exercise 25.1
-
set subtraction §30.5
-
setdefault §30.7
-
setdefault method Exercise 25.2
-
sexagesimal §28.4
-
shallow copy item shallow copy:
-
shell item shell:, §26.7
-
shelve module §26.6
-
sine function §3.2
-
singleton item singleton:
-
slice item slice:
-
slice operator §14.3, §20.1, §21.1
-
sort method item 1
-
sorted
-
sorting 3rd item, Exercise B.2
-
special case §17.5, item special case:, §28.3
-
special value
-
spiral Exercise 6.4
-
split method §20.4
-
sqrt Chapter 10
-
sqrt function §3.2
-
square root Chapter 13
-
squiggly bracket §23.1
-
stable sort item 4
-
stack diagram Exercise 10.1, §21.1, §5.1, §5.1, item stack diagram:, item 1
-
state diagram Chapter 11, §16.2, §18.2, §2.1, item state diagram:, Chapter 21, §27.2, §27.3, §28.1
-
statement §2.3, item statement:
-
assert §28.5, item assert statement:
-
assignment Chapter 11, §2.1
-
compound Chapter 8
-
conditional §30.1, Chapter 8, §8.4, item conditional statement:
-
for Chapter 15, Chapter 19, §6.2
-
global §25.1, item global statement:
-
if Chapter 8
-
import §26.8, item import statement:
-
pass Chapter 8
-
print §A.2.4, §1.3, item print statement:, §29.6
-
raise item raise statement:, §28.5
-
return §A.3.3, §9.1
-
try §26.4, §27.6
-
while Chapter 12
-
StopIteration §30.3
-
str function §3.1
-
__str__ method §29.6
-
string §1.5, item string:, §20.4
-
string concatenation §B.2
-
string method Exercise 16.1
-
string methods §B.2
-
string representation §26.9, §29.6
-
string type §1.5
-
strip method §17.1
-
subject item subject:, §29.2
-
subset §30.5
-
subtraction
-
subtraction with borrowing §28.4
-
sum §30.3
-
superstitious debugging 2nd item
-
syntax §A.1, item Syntax error:, §29.1
-
syntax error 1st item, item Syntax error:, item syntax error:
-
temporary variable §A.3.2, item temporary variable:, §9.1
-
test case, minimal §A.2.4
-
testing
-
text
-
text file item text file:
-
Time class §28.1
-
time module Exercise 21.9
-
traceback §A.2.3, §5.1, item traceback:, §8.5
-
traversal Chapter 15, §15.2, §16.2, item traverse:, §17.3, §17.3, item augmented assignment:, §23.2, Chapter 24
-
triangle Exercise 8.1
-
trigonometric function §3.2
-
triple-quoted string §6.9
-
True special value Chapter 7
-
try statement §26.4, §27.6
-
tuple methods §B.2
-
type §1.5, §1.5, item type:
-
type conversion §3.1
-
type-based dispatch item type-based dispatch:, §29.8
-
TypeError item TypeError:, §14.1, §15.1, §29.3
-
UnboundLocalError §25.1
-
underscore character §2.2
-
uniqueness Exercise 21.7
-
Unix command
-
update §11.1, Chapter 13, item update:
-
use before def §4.1
-
value §1.5, item value:, item value:
-
variable Chapter 2, §2.2, item variable:
-
void function §5.2, item void function:
-
void method §20.2
-
walk, directory §26.3
-
while loop Chapter 12
-
whitespace item 7, Exercise 17.1, §26.9, §8.5
-
word count §26.8
-
word, reducible Exercise 25.5
-
working directory §26.3
-
worst bug Exercise 29.1
-
worst case 2nd item, item worst case:
-
zero, index
starting at §14.1
-
zero, index starting at §18.2