From d9a39e883062c2b1efe3867c8178280295e49273 Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Sun, 15 Nov 2015 12:04:49 -0200 Subject: [PATCH 01/28] translated README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3052b3f..a97516a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -ThinkPython -=========== +Pense Python 2 +============== -LaTeX source, code examples, and exercise solutions for Think Python, 2nd edition, by Allen Downey. +Tradução da 2ª edição de Think Python, de Allen Downey. + +Este repositório contém o código fonte do texto integral, exemplos e exercícios. From 928ad0f6b171e35b701f115d86769ec4e8a68df3 Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Sun, 15 Nov 2015 23:27:30 -0200 Subject: [PATCH 02/28] moved LateX files to deeper directory --- book/{ => latex}/Makefile | 0 book/{ => latex}/back.png | Bin book/{ => latex}/book.tex | 0 book/{ => latex}/figs/assign2.eps | 0 book/{ => latex}/figs/assign2.fig | 0 book/{ => latex}/figs/assign2.fig.bak | 0 book/{ => latex}/figs/assign2.pdf | Bin book/{ => latex}/figs/banana.eps | 0 book/{ => latex}/figs/banana.fig | 0 book/{ => latex}/figs/banana.pdf | Bin book/{ => latex}/figs/card1.eps | 0 book/{ => latex}/figs/card1.fig | 0 book/{ => latex}/figs/card1.pdf | Bin book/{ => latex}/figs/class1.eps | 0 book/{ => latex}/figs/class1.fig | 0 book/{ => latex}/figs/class1.pdf | Bin book/{ => latex}/figs/compile.eps | 0 book/{ => latex}/figs/compile.fig | 0 book/{ => latex}/figs/compile.pdf | Bin book/{ => latex}/figs/dict1.eps | 0 book/{ => latex}/figs/dict1.fig | 0 book/{ => latex}/figs/dict1.pdf | Bin book/{ => latex}/figs/dict2.eps | 0 book/{ => latex}/figs/dict2.fig | 0 book/{ => latex}/figs/dict2.pdf | Bin book/{ => latex}/figs/fibonacci.eps | 0 book/{ => latex}/figs/fibonacci.fig | 0 book/{ => latex}/figs/fibonacci.pdf | Bin book/{ => latex}/figs/flower.test.pdf | Bin book/{ => latex}/figs/flowers.eps | 0 book/{ => latex}/figs/flowers.pdf | Bin book/{ => latex}/figs/interpret.eps | 0 book/{ => latex}/figs/interpret.fig | 0 book/{ => latex}/figs/interpret.pdf | Bin book/{ => latex}/figs/koch.eps | 0 book/{ => latex}/figs/koch.pdf | Bin book/{ => latex}/figs/list1.eps | 0 book/{ => latex}/figs/list1.fig | 0 book/{ => latex}/figs/list1.pdf | Bin book/{ => latex}/figs/list2.eps | 0 book/{ => latex}/figs/list2.fig | 0 book/{ => latex}/figs/list2.pdf | Bin book/{ => latex}/figs/list3.eps | 0 book/{ => latex}/figs/list3.fig | 0 book/{ => latex}/figs/list3.pdf | Bin book/{ => latex}/figs/liststate.eps | 0 book/{ => latex}/figs/liststate.fig | 0 book/{ => latex}/figs/liststate.fig.bak | 0 book/{ => latex}/figs/liststate.pdf | Bin book/{ => latex}/figs/listsum1.eps | 0 book/{ => latex}/figs/listsum1.pdf | Bin book/{ => latex}/figs/listsum2.eps | 0 book/{ => latex}/figs/listsum2.pdf | Bin book/{ => latex}/figs/loop.py | 0 book/{ => latex}/figs/loop.py~ | 0 book/{ => latex}/figs/pies.eps | 0 book/{ => latex}/figs/pies.pdf | Bin book/{ => latex}/figs/point.eps | 0 book/{ => latex}/figs/point.fig | 0 book/{ => latex}/figs/point.pdf | Bin book/{ => latex}/figs/rectangle.eps | 0 book/{ => latex}/figs/rectangle.fig | 0 book/{ => latex}/figs/rectangle.pdf | Bin book/{ => latex}/figs/rectangle2.eps | 0 book/{ => latex}/figs/rectangle2.fig | 0 book/{ => latex}/figs/rectangle2.pdf | Bin book/{ => latex}/figs/stack.eps | 0 book/{ => latex}/figs/stack.fig | 0 book/{ => latex}/figs/stack.pdf | Bin book/{ => latex}/figs/stack2.eps | 0 book/{ => latex}/figs/stack2.fig | 0 book/{ => latex}/figs/stack2.pdf | Bin book/{ => latex}/figs/stack3.eps | 0 book/{ => latex}/figs/stack3.fig | 0 book/{ => latex}/figs/stack3.pdf | Bin book/{ => latex}/figs/stack4.eps | 0 book/{ => latex}/figs/stack4.fig | 0 book/{ => latex}/figs/stack4.pdf | Bin book/{ => latex}/figs/stack5.eps | 0 book/{ => latex}/figs/stack5.fig | 0 book/{ => latex}/figs/stack5.pdf | Bin book/{ => latex}/figs/state.eps | 0 book/{ => latex}/figs/state.fig | 0 book/{ => latex}/figs/state.pdf | Bin book/{ => latex}/figs/state2.eps | 0 book/{ => latex}/figs/state2.fig | 0 book/{ => latex}/figs/state2.pdf | Bin book/{ => latex}/figs/state3.eps | 0 book/{ => latex}/figs/state3.fig | 0 book/{ => latex}/figs/state3.pdf | Bin book/{ => latex}/figs/state4.eps | 0 book/{ => latex}/figs/state4.fig | 0 book/{ => latex}/figs/state4.pdf | Bin book/{ => latex}/figs/state5.eps | 0 book/{ => latex}/figs/state5.fig | 0 book/{ => latex}/figs/state5.pdf | Bin book/{ => latex}/figs/time.eps | 0 book/{ => latex}/figs/time.fig | 0 book/{ => latex}/figs/time.pdf | Bin book/{ => latex}/figs/towers.eps | 0 book/{ => latex}/figs/towers.fig | 0 book/{ => latex}/figs/towers.pdf | Bin book/{ => latex}/figs/tuple1.eps | 0 book/{ => latex}/figs/tuple1.fig | 0 book/{ => latex}/figs/tuple1.pdf | Bin book/{ => latex}/footer.html | 0 book/{ => latex}/header.html | 0 book/{ => latex}/htmlonly | 0 book/{ => latex}/latexonly | 0 book/{ => latex}/localdef.py | 0 book/{ => latex}/next.png | Bin book/{ => latex}/up.png | Bin 112 files changed, 0 insertions(+), 0 deletions(-) rename book/{ => latex}/Makefile (100%) rename book/{ => latex}/back.png (100%) rename book/{ => latex}/book.tex (100%) rename book/{ => latex}/figs/assign2.eps (100%) rename book/{ => latex}/figs/assign2.fig (100%) rename book/{ => latex}/figs/assign2.fig.bak (100%) rename book/{ => latex}/figs/assign2.pdf (100%) rename book/{ => latex}/figs/banana.eps (100%) rename book/{ => latex}/figs/banana.fig (100%) rename book/{ => latex}/figs/banana.pdf (100%) rename book/{ => latex}/figs/card1.eps (100%) rename book/{ => latex}/figs/card1.fig (100%) rename book/{ => latex}/figs/card1.pdf (100%) rename book/{ => latex}/figs/class1.eps (100%) rename book/{ => latex}/figs/class1.fig (100%) rename book/{ => latex}/figs/class1.pdf (100%) rename book/{ => latex}/figs/compile.eps (100%) rename book/{ => latex}/figs/compile.fig (100%) rename book/{ => latex}/figs/compile.pdf (100%) rename book/{ => latex}/figs/dict1.eps (100%) rename book/{ => latex}/figs/dict1.fig (100%) rename book/{ => latex}/figs/dict1.pdf (100%) rename book/{ => latex}/figs/dict2.eps (100%) rename book/{ => latex}/figs/dict2.fig (100%) rename book/{ => latex}/figs/dict2.pdf (100%) rename book/{ => latex}/figs/fibonacci.eps (100%) rename book/{ => latex}/figs/fibonacci.fig (100%) rename book/{ => latex}/figs/fibonacci.pdf (100%) rename book/{ => latex}/figs/flower.test.pdf (100%) rename book/{ => latex}/figs/flowers.eps (100%) rename book/{ => latex}/figs/flowers.pdf (100%) rename book/{ => latex}/figs/interpret.eps (100%) rename book/{ => latex}/figs/interpret.fig (100%) rename book/{ => latex}/figs/interpret.pdf (100%) rename book/{ => latex}/figs/koch.eps (100%) rename book/{ => latex}/figs/koch.pdf (100%) rename book/{ => latex}/figs/list1.eps (100%) rename book/{ => latex}/figs/list1.fig (100%) rename book/{ => latex}/figs/list1.pdf (100%) rename book/{ => latex}/figs/list2.eps (100%) rename book/{ => latex}/figs/list2.fig (100%) rename book/{ => latex}/figs/list2.pdf (100%) rename book/{ => latex}/figs/list3.eps (100%) rename book/{ => latex}/figs/list3.fig (100%) rename book/{ => latex}/figs/list3.pdf (100%) rename book/{ => latex}/figs/liststate.eps (100%) rename book/{ => latex}/figs/liststate.fig (100%) rename book/{ => latex}/figs/liststate.fig.bak (100%) rename book/{ => latex}/figs/liststate.pdf (100%) rename book/{ => latex}/figs/listsum1.eps (100%) rename book/{ => latex}/figs/listsum1.pdf (100%) rename book/{ => latex}/figs/listsum2.eps (100%) rename book/{ => latex}/figs/listsum2.pdf (100%) rename book/{ => latex}/figs/loop.py (100%) rename book/{ => latex}/figs/loop.py~ (100%) rename book/{ => latex}/figs/pies.eps (100%) rename book/{ => latex}/figs/pies.pdf (100%) rename book/{ => latex}/figs/point.eps (100%) rename book/{ => latex}/figs/point.fig (100%) rename book/{ => latex}/figs/point.pdf (100%) rename book/{ => latex}/figs/rectangle.eps (100%) rename book/{ => latex}/figs/rectangle.fig (100%) rename book/{ => latex}/figs/rectangle.pdf (100%) rename book/{ => latex}/figs/rectangle2.eps (100%) rename book/{ => latex}/figs/rectangle2.fig (100%) rename book/{ => latex}/figs/rectangle2.pdf (100%) rename book/{ => latex}/figs/stack.eps (100%) rename book/{ => latex}/figs/stack.fig (100%) rename book/{ => latex}/figs/stack.pdf (100%) rename book/{ => latex}/figs/stack2.eps (100%) rename book/{ => latex}/figs/stack2.fig (100%) rename book/{ => latex}/figs/stack2.pdf (100%) rename book/{ => latex}/figs/stack3.eps (100%) rename book/{ => latex}/figs/stack3.fig (100%) rename book/{ => latex}/figs/stack3.pdf (100%) rename book/{ => latex}/figs/stack4.eps (100%) rename book/{ => latex}/figs/stack4.fig (100%) rename book/{ => latex}/figs/stack4.pdf (100%) rename book/{ => latex}/figs/stack5.eps (100%) rename book/{ => latex}/figs/stack5.fig (100%) rename book/{ => latex}/figs/stack5.pdf (100%) rename book/{ => latex}/figs/state.eps (100%) rename book/{ => latex}/figs/state.fig (100%) rename book/{ => latex}/figs/state.pdf (100%) rename book/{ => latex}/figs/state2.eps (100%) rename book/{ => latex}/figs/state2.fig (100%) rename book/{ => latex}/figs/state2.pdf (100%) rename book/{ => latex}/figs/state3.eps (100%) rename book/{ => latex}/figs/state3.fig (100%) rename book/{ => latex}/figs/state3.pdf (100%) rename book/{ => latex}/figs/state4.eps (100%) rename book/{ => latex}/figs/state4.fig (100%) rename book/{ => latex}/figs/state4.pdf (100%) rename book/{ => latex}/figs/state5.eps (100%) rename book/{ => latex}/figs/state5.fig (100%) rename book/{ => latex}/figs/state5.pdf (100%) rename book/{ => latex}/figs/time.eps (100%) rename book/{ => latex}/figs/time.fig (100%) rename book/{ => latex}/figs/time.pdf (100%) rename book/{ => latex}/figs/towers.eps (100%) rename book/{ => latex}/figs/towers.fig (100%) rename book/{ => latex}/figs/towers.pdf (100%) rename book/{ => latex}/figs/tuple1.eps (100%) rename book/{ => latex}/figs/tuple1.fig (100%) rename book/{ => latex}/figs/tuple1.pdf (100%) rename book/{ => latex}/footer.html (100%) rename book/{ => latex}/header.html (100%) rename book/{ => latex}/htmlonly (100%) rename book/{ => latex}/latexonly (100%) rename book/{ => latex}/localdef.py (100%) rename book/{ => latex}/next.png (100%) rename book/{ => latex}/up.png (100%) diff --git a/book/Makefile b/book/latex/Makefile similarity index 100% rename from book/Makefile rename to book/latex/Makefile diff --git a/book/back.png b/book/latex/back.png similarity index 100% rename from book/back.png rename to book/latex/back.png diff --git a/book/book.tex b/book/latex/book.tex similarity index 100% rename from book/book.tex rename to book/latex/book.tex diff --git a/book/figs/assign2.eps b/book/latex/figs/assign2.eps similarity index 100% rename from book/figs/assign2.eps rename to book/latex/figs/assign2.eps diff --git a/book/figs/assign2.fig b/book/latex/figs/assign2.fig similarity index 100% rename from book/figs/assign2.fig rename to book/latex/figs/assign2.fig diff --git a/book/figs/assign2.fig.bak b/book/latex/figs/assign2.fig.bak similarity index 100% rename from book/figs/assign2.fig.bak rename to book/latex/figs/assign2.fig.bak diff --git a/book/figs/assign2.pdf b/book/latex/figs/assign2.pdf similarity index 100% rename from book/figs/assign2.pdf rename to book/latex/figs/assign2.pdf diff --git a/book/figs/banana.eps b/book/latex/figs/banana.eps similarity index 100% rename from book/figs/banana.eps rename to book/latex/figs/banana.eps diff --git a/book/figs/banana.fig b/book/latex/figs/banana.fig similarity index 100% rename from book/figs/banana.fig rename to book/latex/figs/banana.fig diff --git a/book/figs/banana.pdf b/book/latex/figs/banana.pdf similarity index 100% rename from book/figs/banana.pdf rename to book/latex/figs/banana.pdf diff --git a/book/figs/card1.eps b/book/latex/figs/card1.eps similarity index 100% rename from book/figs/card1.eps rename to book/latex/figs/card1.eps diff --git a/book/figs/card1.fig b/book/latex/figs/card1.fig similarity index 100% rename from book/figs/card1.fig rename to book/latex/figs/card1.fig diff --git a/book/figs/card1.pdf b/book/latex/figs/card1.pdf similarity index 100% rename from book/figs/card1.pdf rename to book/latex/figs/card1.pdf diff --git a/book/figs/class1.eps b/book/latex/figs/class1.eps similarity index 100% rename from book/figs/class1.eps rename to book/latex/figs/class1.eps diff --git a/book/figs/class1.fig b/book/latex/figs/class1.fig similarity index 100% rename from book/figs/class1.fig rename to book/latex/figs/class1.fig diff --git a/book/figs/class1.pdf b/book/latex/figs/class1.pdf similarity index 100% rename from book/figs/class1.pdf rename to book/latex/figs/class1.pdf diff --git a/book/figs/compile.eps b/book/latex/figs/compile.eps similarity index 100% rename from book/figs/compile.eps rename to book/latex/figs/compile.eps diff --git a/book/figs/compile.fig b/book/latex/figs/compile.fig similarity index 100% rename from book/figs/compile.fig rename to book/latex/figs/compile.fig diff --git a/book/figs/compile.pdf b/book/latex/figs/compile.pdf similarity index 100% rename from book/figs/compile.pdf rename to book/latex/figs/compile.pdf diff --git a/book/figs/dict1.eps b/book/latex/figs/dict1.eps similarity index 100% rename from book/figs/dict1.eps rename to book/latex/figs/dict1.eps diff --git a/book/figs/dict1.fig b/book/latex/figs/dict1.fig similarity index 100% rename from book/figs/dict1.fig rename to book/latex/figs/dict1.fig diff --git a/book/figs/dict1.pdf b/book/latex/figs/dict1.pdf similarity index 100% rename from book/figs/dict1.pdf rename to book/latex/figs/dict1.pdf diff --git a/book/figs/dict2.eps b/book/latex/figs/dict2.eps similarity index 100% rename from book/figs/dict2.eps rename to book/latex/figs/dict2.eps diff --git a/book/figs/dict2.fig b/book/latex/figs/dict2.fig similarity index 100% rename from book/figs/dict2.fig rename to book/latex/figs/dict2.fig diff --git a/book/figs/dict2.pdf b/book/latex/figs/dict2.pdf similarity index 100% rename from book/figs/dict2.pdf rename to book/latex/figs/dict2.pdf diff --git a/book/figs/fibonacci.eps b/book/latex/figs/fibonacci.eps similarity index 100% rename from book/figs/fibonacci.eps rename to book/latex/figs/fibonacci.eps diff --git a/book/figs/fibonacci.fig b/book/latex/figs/fibonacci.fig similarity index 100% rename from book/figs/fibonacci.fig rename to book/latex/figs/fibonacci.fig diff --git a/book/figs/fibonacci.pdf b/book/latex/figs/fibonacci.pdf similarity index 100% rename from book/figs/fibonacci.pdf rename to book/latex/figs/fibonacci.pdf diff --git a/book/figs/flower.test.pdf b/book/latex/figs/flower.test.pdf similarity index 100% rename from book/figs/flower.test.pdf rename to book/latex/figs/flower.test.pdf diff --git a/book/figs/flowers.eps b/book/latex/figs/flowers.eps similarity index 100% rename from book/figs/flowers.eps rename to book/latex/figs/flowers.eps diff --git a/book/figs/flowers.pdf b/book/latex/figs/flowers.pdf similarity index 100% rename from book/figs/flowers.pdf rename to book/latex/figs/flowers.pdf diff --git a/book/figs/interpret.eps b/book/latex/figs/interpret.eps similarity index 100% rename from book/figs/interpret.eps rename to book/latex/figs/interpret.eps diff --git a/book/figs/interpret.fig b/book/latex/figs/interpret.fig similarity index 100% rename from book/figs/interpret.fig rename to book/latex/figs/interpret.fig diff --git a/book/figs/interpret.pdf b/book/latex/figs/interpret.pdf similarity index 100% rename from book/figs/interpret.pdf rename to book/latex/figs/interpret.pdf diff --git a/book/figs/koch.eps b/book/latex/figs/koch.eps similarity index 100% rename from book/figs/koch.eps rename to book/latex/figs/koch.eps diff --git a/book/figs/koch.pdf b/book/latex/figs/koch.pdf similarity index 100% rename from book/figs/koch.pdf rename to book/latex/figs/koch.pdf diff --git a/book/figs/list1.eps b/book/latex/figs/list1.eps similarity index 100% rename from book/figs/list1.eps rename to book/latex/figs/list1.eps diff --git a/book/figs/list1.fig b/book/latex/figs/list1.fig similarity index 100% rename from book/figs/list1.fig rename to book/latex/figs/list1.fig diff --git a/book/figs/list1.pdf b/book/latex/figs/list1.pdf similarity index 100% rename from book/figs/list1.pdf rename to book/latex/figs/list1.pdf diff --git a/book/figs/list2.eps b/book/latex/figs/list2.eps similarity index 100% rename from book/figs/list2.eps rename to book/latex/figs/list2.eps diff --git a/book/figs/list2.fig b/book/latex/figs/list2.fig similarity index 100% rename from book/figs/list2.fig rename to book/latex/figs/list2.fig diff --git a/book/figs/list2.pdf b/book/latex/figs/list2.pdf similarity index 100% rename from book/figs/list2.pdf rename to book/latex/figs/list2.pdf diff --git a/book/figs/list3.eps b/book/latex/figs/list3.eps similarity index 100% rename from book/figs/list3.eps rename to book/latex/figs/list3.eps diff --git a/book/figs/list3.fig b/book/latex/figs/list3.fig similarity index 100% rename from book/figs/list3.fig rename to book/latex/figs/list3.fig diff --git a/book/figs/list3.pdf b/book/latex/figs/list3.pdf similarity index 100% rename from book/figs/list3.pdf rename to book/latex/figs/list3.pdf diff --git a/book/figs/liststate.eps b/book/latex/figs/liststate.eps similarity index 100% rename from book/figs/liststate.eps rename to book/latex/figs/liststate.eps diff --git a/book/figs/liststate.fig b/book/latex/figs/liststate.fig similarity index 100% rename from book/figs/liststate.fig rename to book/latex/figs/liststate.fig diff --git a/book/figs/liststate.fig.bak b/book/latex/figs/liststate.fig.bak similarity index 100% rename from book/figs/liststate.fig.bak rename to book/latex/figs/liststate.fig.bak diff --git a/book/figs/liststate.pdf b/book/latex/figs/liststate.pdf similarity index 100% rename from book/figs/liststate.pdf rename to book/latex/figs/liststate.pdf diff --git a/book/figs/listsum1.eps b/book/latex/figs/listsum1.eps similarity index 100% rename from book/figs/listsum1.eps rename to book/latex/figs/listsum1.eps diff --git a/book/figs/listsum1.pdf b/book/latex/figs/listsum1.pdf similarity index 100% rename from book/figs/listsum1.pdf rename to book/latex/figs/listsum1.pdf diff --git a/book/figs/listsum2.eps b/book/latex/figs/listsum2.eps similarity index 100% rename from book/figs/listsum2.eps rename to book/latex/figs/listsum2.eps diff --git a/book/figs/listsum2.pdf b/book/latex/figs/listsum2.pdf similarity index 100% rename from book/figs/listsum2.pdf rename to book/latex/figs/listsum2.pdf diff --git a/book/figs/loop.py b/book/latex/figs/loop.py similarity index 100% rename from book/figs/loop.py rename to book/latex/figs/loop.py diff --git a/book/figs/loop.py~ b/book/latex/figs/loop.py~ similarity index 100% rename from book/figs/loop.py~ rename to book/latex/figs/loop.py~ diff --git a/book/figs/pies.eps b/book/latex/figs/pies.eps similarity index 100% rename from book/figs/pies.eps rename to book/latex/figs/pies.eps diff --git a/book/figs/pies.pdf b/book/latex/figs/pies.pdf similarity index 100% rename from book/figs/pies.pdf rename to book/latex/figs/pies.pdf diff --git a/book/figs/point.eps b/book/latex/figs/point.eps similarity index 100% rename from book/figs/point.eps rename to book/latex/figs/point.eps diff --git a/book/figs/point.fig b/book/latex/figs/point.fig similarity index 100% rename from book/figs/point.fig rename to book/latex/figs/point.fig diff --git a/book/figs/point.pdf b/book/latex/figs/point.pdf similarity index 100% rename from book/figs/point.pdf rename to book/latex/figs/point.pdf diff --git a/book/figs/rectangle.eps b/book/latex/figs/rectangle.eps similarity index 100% rename from book/figs/rectangle.eps rename to book/latex/figs/rectangle.eps diff --git a/book/figs/rectangle.fig b/book/latex/figs/rectangle.fig similarity index 100% rename from book/figs/rectangle.fig rename to book/latex/figs/rectangle.fig diff --git a/book/figs/rectangle.pdf b/book/latex/figs/rectangle.pdf similarity index 100% rename from book/figs/rectangle.pdf rename to book/latex/figs/rectangle.pdf diff --git a/book/figs/rectangle2.eps b/book/latex/figs/rectangle2.eps similarity index 100% rename from book/figs/rectangle2.eps rename to book/latex/figs/rectangle2.eps diff --git a/book/figs/rectangle2.fig b/book/latex/figs/rectangle2.fig similarity index 100% rename from book/figs/rectangle2.fig rename to book/latex/figs/rectangle2.fig diff --git a/book/figs/rectangle2.pdf b/book/latex/figs/rectangle2.pdf similarity index 100% rename from book/figs/rectangle2.pdf rename to book/latex/figs/rectangle2.pdf diff --git a/book/figs/stack.eps b/book/latex/figs/stack.eps similarity index 100% rename from book/figs/stack.eps rename to book/latex/figs/stack.eps diff --git a/book/figs/stack.fig b/book/latex/figs/stack.fig similarity index 100% rename from book/figs/stack.fig rename to book/latex/figs/stack.fig diff --git a/book/figs/stack.pdf b/book/latex/figs/stack.pdf similarity index 100% rename from book/figs/stack.pdf rename to book/latex/figs/stack.pdf diff --git a/book/figs/stack2.eps b/book/latex/figs/stack2.eps similarity index 100% rename from book/figs/stack2.eps rename to book/latex/figs/stack2.eps diff --git a/book/figs/stack2.fig b/book/latex/figs/stack2.fig similarity index 100% rename from book/figs/stack2.fig rename to book/latex/figs/stack2.fig diff --git a/book/figs/stack2.pdf b/book/latex/figs/stack2.pdf similarity index 100% rename from book/figs/stack2.pdf rename to book/latex/figs/stack2.pdf diff --git a/book/figs/stack3.eps b/book/latex/figs/stack3.eps similarity index 100% rename from book/figs/stack3.eps rename to book/latex/figs/stack3.eps diff --git a/book/figs/stack3.fig b/book/latex/figs/stack3.fig similarity index 100% rename from book/figs/stack3.fig rename to book/latex/figs/stack3.fig diff --git a/book/figs/stack3.pdf b/book/latex/figs/stack3.pdf similarity index 100% rename from book/figs/stack3.pdf rename to book/latex/figs/stack3.pdf diff --git a/book/figs/stack4.eps b/book/latex/figs/stack4.eps similarity index 100% rename from book/figs/stack4.eps rename to book/latex/figs/stack4.eps diff --git a/book/figs/stack4.fig b/book/latex/figs/stack4.fig similarity index 100% rename from book/figs/stack4.fig rename to book/latex/figs/stack4.fig diff --git a/book/figs/stack4.pdf b/book/latex/figs/stack4.pdf similarity index 100% rename from book/figs/stack4.pdf rename to book/latex/figs/stack4.pdf diff --git a/book/figs/stack5.eps b/book/latex/figs/stack5.eps similarity index 100% rename from book/figs/stack5.eps rename to book/latex/figs/stack5.eps diff --git a/book/figs/stack5.fig b/book/latex/figs/stack5.fig similarity index 100% rename from book/figs/stack5.fig rename to book/latex/figs/stack5.fig diff --git a/book/figs/stack5.pdf b/book/latex/figs/stack5.pdf similarity index 100% rename from book/figs/stack5.pdf rename to book/latex/figs/stack5.pdf diff --git a/book/figs/state.eps b/book/latex/figs/state.eps similarity index 100% rename from book/figs/state.eps rename to book/latex/figs/state.eps diff --git a/book/figs/state.fig b/book/latex/figs/state.fig similarity index 100% rename from book/figs/state.fig rename to book/latex/figs/state.fig diff --git a/book/figs/state.pdf b/book/latex/figs/state.pdf similarity index 100% rename from book/figs/state.pdf rename to book/latex/figs/state.pdf diff --git a/book/figs/state2.eps b/book/latex/figs/state2.eps similarity index 100% rename from book/figs/state2.eps rename to book/latex/figs/state2.eps diff --git a/book/figs/state2.fig b/book/latex/figs/state2.fig similarity index 100% rename from book/figs/state2.fig rename to book/latex/figs/state2.fig diff --git a/book/figs/state2.pdf b/book/latex/figs/state2.pdf similarity index 100% rename from book/figs/state2.pdf rename to book/latex/figs/state2.pdf diff --git a/book/figs/state3.eps b/book/latex/figs/state3.eps similarity index 100% rename from book/figs/state3.eps rename to book/latex/figs/state3.eps diff --git a/book/figs/state3.fig b/book/latex/figs/state3.fig similarity index 100% rename from book/figs/state3.fig rename to book/latex/figs/state3.fig diff --git a/book/figs/state3.pdf b/book/latex/figs/state3.pdf similarity index 100% rename from book/figs/state3.pdf rename to book/latex/figs/state3.pdf diff --git a/book/figs/state4.eps b/book/latex/figs/state4.eps similarity index 100% rename from book/figs/state4.eps rename to book/latex/figs/state4.eps diff --git a/book/figs/state4.fig b/book/latex/figs/state4.fig similarity index 100% rename from book/figs/state4.fig rename to book/latex/figs/state4.fig diff --git a/book/figs/state4.pdf b/book/latex/figs/state4.pdf similarity index 100% rename from book/figs/state4.pdf rename to book/latex/figs/state4.pdf diff --git a/book/figs/state5.eps b/book/latex/figs/state5.eps similarity index 100% rename from book/figs/state5.eps rename to book/latex/figs/state5.eps diff --git a/book/figs/state5.fig b/book/latex/figs/state5.fig similarity index 100% rename from book/figs/state5.fig rename to book/latex/figs/state5.fig diff --git a/book/figs/state5.pdf b/book/latex/figs/state5.pdf similarity index 100% rename from book/figs/state5.pdf rename to book/latex/figs/state5.pdf diff --git a/book/figs/time.eps b/book/latex/figs/time.eps similarity index 100% rename from book/figs/time.eps rename to book/latex/figs/time.eps diff --git a/book/figs/time.fig b/book/latex/figs/time.fig similarity index 100% rename from book/figs/time.fig rename to book/latex/figs/time.fig diff --git a/book/figs/time.pdf b/book/latex/figs/time.pdf similarity index 100% rename from book/figs/time.pdf rename to book/latex/figs/time.pdf diff --git a/book/figs/towers.eps b/book/latex/figs/towers.eps similarity index 100% rename from book/figs/towers.eps rename to book/latex/figs/towers.eps diff --git a/book/figs/towers.fig b/book/latex/figs/towers.fig similarity index 100% rename from book/figs/towers.fig rename to book/latex/figs/towers.fig diff --git a/book/figs/towers.pdf b/book/latex/figs/towers.pdf similarity index 100% rename from book/figs/towers.pdf rename to book/latex/figs/towers.pdf diff --git a/book/figs/tuple1.eps b/book/latex/figs/tuple1.eps similarity index 100% rename from book/figs/tuple1.eps rename to book/latex/figs/tuple1.eps diff --git a/book/figs/tuple1.fig b/book/latex/figs/tuple1.fig similarity index 100% rename from book/figs/tuple1.fig rename to book/latex/figs/tuple1.fig diff --git a/book/figs/tuple1.pdf b/book/latex/figs/tuple1.pdf similarity index 100% rename from book/figs/tuple1.pdf rename to book/latex/figs/tuple1.pdf diff --git a/book/footer.html b/book/latex/footer.html similarity index 100% rename from book/footer.html rename to book/latex/footer.html diff --git a/book/header.html b/book/latex/header.html similarity index 100% rename from book/header.html rename to book/latex/header.html diff --git a/book/htmlonly b/book/latex/htmlonly similarity index 100% rename from book/htmlonly rename to book/latex/htmlonly diff --git a/book/latexonly b/book/latex/latexonly similarity index 100% rename from book/latexonly rename to book/latex/latexonly diff --git a/book/localdef.py b/book/latex/localdef.py similarity index 100% rename from book/localdef.py rename to book/latex/localdef.py diff --git a/book/next.png b/book/latex/next.png similarity index 100% rename from book/next.png rename to book/latex/next.png diff --git a/book/up.png b/book/latex/up.png similarity index 100% rename from book/up.png rename to book/latex/up.png From ba3cf7f3b57bfd712c03a79be6382ac9a166ef1f Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Sun, 15 Nov 2015 23:43:56 -0200 Subject: [PATCH 03/28] converted book.tex to book.rst using Pandoc; created basic Sphinx project --- book/.gitignore | 1 + book/Makefile | 192 + book/book.rst | 13666 ++++++++++++++++++++++++++++++++++ book/conf.py | 359 + book/figs/assign2.eps | 141 + book/figs/assign2.fig | 23 + book/figs/assign2.fig.bak | 25 + book/figs/assign2.pdf | Bin 0 -> 3893 bytes book/figs/banana.eps | 194 + book/figs/banana.fig | 45 + book/figs/banana.pdf | Bin 0 -> 5443 bytes book/figs/card1.eps | 213 + book/figs/card1.fig | 47 + book/figs/card1.pdf | Bin 0 -> 5371 bytes book/figs/class1.eps | 142 + book/figs/class1.fig | 25 + book/figs/class1.pdf | Bin 0 -> 4630 bytes book/figs/compile.eps | 222 + book/figs/compile.fig | 54 + book/figs/compile.pdf | Bin 0 -> 5098 bytes book/figs/dict1.eps | 321 + book/figs/dict1.fig | 91 + book/figs/dict1.pdf | Bin 0 -> 5915 bytes book/figs/dict2.eps | 195 + book/figs/dict2.fig | 42 + book/figs/dict2.pdf | Bin 0 -> 6487 bytes book/figs/fibonacci.eps | 356 + book/figs/fibonacci.fig | 107 + book/figs/fibonacci.pdf | Bin 0 -> 5525 bytes book/figs/flower.test.pdf | Bin 0 -> 17297 bytes book/figs/flowers.eps | 9835 ++++++++++++++++++++++++ book/figs/flowers.pdf | Bin 0 -> 12440 bytes book/figs/interpret.eps | 173 + book/figs/interpret.fig | 37 + book/figs/interpret.pdf | Bin 0 -> 4565 bytes book/figs/koch.eps | 10575 ++++++++++++++++++++++++++ book/figs/koch.pdf | Bin 0 -> 8732 bytes book/figs/list1.eps | 166 + book/figs/list1.fig | 32 + book/figs/list1.pdf | Bin 0 -> 4292 bytes book/figs/list2.eps | 128 + book/figs/list2.fig | 21 + book/figs/list2.pdf | Bin 0 -> 4373 bytes book/figs/list3.eps | 140 + book/figs/list3.fig | 20 + book/figs/list3.pdf | Bin 0 -> 4399 bytes book/figs/liststate.eps | 255 + book/figs/liststate.fig | 64 + book/figs/liststate.fig.bak | 64 + book/figs/liststate.pdf | Bin 0 -> 6467 bytes book/figs/listsum1.eps | 1740 +++++ book/figs/listsum1.pdf | Bin 0 -> 11055 bytes book/figs/listsum2.eps | 2086 ++++++ book/figs/listsum2.pdf | Bin 0 -> 9928 bytes book/figs/loop.py | 20 + book/figs/pies.eps | 875 +++ book/figs/pies.pdf | Bin 0 -> 2835 bytes book/figs/point.eps | 147 + book/figs/point.fig | 26 + book/figs/point.pdf | Bin 0 -> 4841 bytes book/figs/rectangle.eps | 206 + book/figs/rectangle.fig | 45 + book/figs/rectangle.pdf | Bin 0 -> 5697 bytes book/figs/rectangle2.eps | 257 + book/figs/rectangle2.fig | 67 + book/figs/rectangle2.pdf | Bin 0 -> 5505 bytes book/figs/stack.eps | 219 + book/figs/stack.fig | 51 + book/figs/stack.pdf | Bin 0 -> 5805 bytes book/figs/stack2.eps | 200 + book/figs/stack2.fig | 44 + book/figs/stack2.pdf | Bin 0 -> 5056 bytes book/figs/stack3.eps | 342 + book/figs/stack3.fig | 96 + book/figs/stack3.pdf | Bin 0 -> 5999 bytes book/figs/stack4.eps | 173 + book/figs/stack4.fig | 41 + book/figs/stack4.pdf | Bin 0 -> 5098 bytes book/figs/stack5.eps | 197 + book/figs/stack5.fig | 41 + book/figs/stack5.pdf | Bin 0 -> 5449 bytes book/figs/state.eps | 143 + book/figs/state.fig | 60 + book/figs/state.pdf | Bin 0 -> 6236 bytes book/figs/state2.eps | 158 + book/figs/state2.fig | 28 + book/figs/state2.pdf | Bin 0 -> 6352 bytes book/figs/state3.eps | 162 + book/figs/state3.fig | 31 + book/figs/state3.pdf | Bin 0 -> 5005 bytes book/figs/state4.eps | 170 + book/figs/state4.fig | 39 + book/figs/state4.pdf | Bin 0 -> 5056 bytes book/figs/state5.eps | 321 + book/figs/state5.fig | 91 + book/figs/state5.pdf | Bin 0 -> 5917 bytes book/figs/time.eps | 173 + book/figs/time.fig | 31 + book/figs/time.pdf | Bin 0 -> 5226 bytes book/figs/towers.eps | 317 + book/figs/towers.fig | 178 + book/figs/towers.pdf | Bin 0 -> 2998 bytes book/figs/tuple1.eps | 135 + book/figs/tuple1.fig | 22 + book/figs/tuple1.pdf | Bin 0 -> 4825 bytes book/index.rst | 22 + book/make.bat | 263 + 107 files changed, 47188 insertions(+) create mode 100644 book/.gitignore create mode 100644 book/Makefile create mode 100644 book/book.rst create mode 100644 book/conf.py create mode 100644 book/figs/assign2.eps create mode 100644 book/figs/assign2.fig create mode 100644 book/figs/assign2.fig.bak create mode 100644 book/figs/assign2.pdf create mode 100644 book/figs/banana.eps create mode 100644 book/figs/banana.fig create mode 100644 book/figs/banana.pdf create mode 100644 book/figs/card1.eps create mode 100644 book/figs/card1.fig create mode 100644 book/figs/card1.pdf create mode 100644 book/figs/class1.eps create mode 100644 book/figs/class1.fig create mode 100644 book/figs/class1.pdf create mode 100644 book/figs/compile.eps create mode 100644 book/figs/compile.fig create mode 100644 book/figs/compile.pdf create mode 100644 book/figs/dict1.eps create mode 100644 book/figs/dict1.fig create mode 100644 book/figs/dict1.pdf create mode 100644 book/figs/dict2.eps create mode 100644 book/figs/dict2.fig create mode 100644 book/figs/dict2.pdf create mode 100644 book/figs/fibonacci.eps create mode 100644 book/figs/fibonacci.fig create mode 100644 book/figs/fibonacci.pdf create mode 100644 book/figs/flower.test.pdf create mode 100644 book/figs/flowers.eps create mode 100644 book/figs/flowers.pdf create mode 100644 book/figs/interpret.eps create mode 100644 book/figs/interpret.fig create mode 100644 book/figs/interpret.pdf create mode 100644 book/figs/koch.eps create mode 100644 book/figs/koch.pdf create mode 100644 book/figs/list1.eps create mode 100644 book/figs/list1.fig create mode 100644 book/figs/list1.pdf create mode 100644 book/figs/list2.eps create mode 100644 book/figs/list2.fig create mode 100644 book/figs/list2.pdf create mode 100644 book/figs/list3.eps create mode 100644 book/figs/list3.fig create mode 100644 book/figs/list3.pdf create mode 100644 book/figs/liststate.eps create mode 100644 book/figs/liststate.fig create mode 100644 book/figs/liststate.fig.bak create mode 100644 book/figs/liststate.pdf create mode 100644 book/figs/listsum1.eps create mode 100644 book/figs/listsum1.pdf create mode 100644 book/figs/listsum2.eps create mode 100644 book/figs/listsum2.pdf create mode 100644 book/figs/loop.py create mode 100644 book/figs/pies.eps create mode 100644 book/figs/pies.pdf create mode 100644 book/figs/point.eps create mode 100644 book/figs/point.fig create mode 100644 book/figs/point.pdf create mode 100644 book/figs/rectangle.eps create mode 100644 book/figs/rectangle.fig create mode 100644 book/figs/rectangle.pdf create mode 100644 book/figs/rectangle2.eps create mode 100644 book/figs/rectangle2.fig create mode 100644 book/figs/rectangle2.pdf create mode 100644 book/figs/stack.eps create mode 100644 book/figs/stack.fig create mode 100644 book/figs/stack.pdf create mode 100644 book/figs/stack2.eps create mode 100644 book/figs/stack2.fig create mode 100644 book/figs/stack2.pdf create mode 100644 book/figs/stack3.eps create mode 100644 book/figs/stack3.fig create mode 100644 book/figs/stack3.pdf create mode 100644 book/figs/stack4.eps create mode 100644 book/figs/stack4.fig create mode 100644 book/figs/stack4.pdf create mode 100644 book/figs/stack5.eps create mode 100644 book/figs/stack5.fig create mode 100644 book/figs/stack5.pdf create mode 100644 book/figs/state.eps create mode 100644 book/figs/state.fig create mode 100644 book/figs/state.pdf create mode 100644 book/figs/state2.eps create mode 100644 book/figs/state2.fig create mode 100644 book/figs/state2.pdf create mode 100644 book/figs/state3.eps create mode 100644 book/figs/state3.fig create mode 100644 book/figs/state3.pdf create mode 100644 book/figs/state4.eps create mode 100644 book/figs/state4.fig create mode 100644 book/figs/state4.pdf create mode 100644 book/figs/state5.eps create mode 100644 book/figs/state5.fig create mode 100644 book/figs/state5.pdf create mode 100644 book/figs/time.eps create mode 100644 book/figs/time.fig create mode 100644 book/figs/time.pdf create mode 100644 book/figs/towers.eps create mode 100644 book/figs/towers.fig create mode 100644 book/figs/towers.pdf create mode 100644 book/figs/tuple1.eps create mode 100644 book/figs/tuple1.fig create mode 100644 book/figs/tuple1.pdf create mode 100644 book/index.rst create mode 100644 book/make.bat diff --git a/book/.gitignore b/book/.gitignore new file mode 100644 index 0000000..69fa449 --- /dev/null +++ b/book/.gitignore @@ -0,0 +1 @@ +_build/ diff --git a/book/Makefile b/book/Makefile new file mode 100644 index 0000000..92475e5 --- /dev/null +++ b/book/Makefile @@ -0,0 +1,192 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PensePython.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PensePython.qhc" + +applehelp: + $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp + @echo + @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." + @echo "N.B. You won't be able to view it unless you put it in" \ + "~/Library/Documentation/Help or install it in your application" \ + "bundle." + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/PensePython" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PensePython" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +coverage: + $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage + @echo "Testing of coverage in the sources finished, look at the " \ + "results in $(BUILDDIR)/coverage/python.txt." + +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/book/book.rst b/book/book.rst new file mode 100644 index 0000000..e1e8a01 --- /dev/null +++ b/book/book.rst @@ -0,0 +1,13666 @@ +[chapter] + +| 3 Think Python +| How to Think Like a Computer Scientist + +2nd Edition, Version 2.2.14 + +| 3 Think Python +| How to Think Like a Computer Scientist + +2nd Edition, Version 2.2.14 + +Allen Downey + +Green Tea Press + +Needham, Massachusetts + +Copyright © 2015 Allen Downey. + +| Green Tea Press +| 9 Washburn Ave +| Needham MA 02492 + +Permission is granted to copy, distribute, and/or modify this document +under the terms of the Creative Commons Attribution-NonCommercial 3.0 +Unported License, which is available at +http://creativecommons.org/licenses/by-nc/3.0/. + +The original form of this book is LaTeX source code. Compiling this +LaTeX source has the effect of generating a device-independent +representation of a textbook, which can be converted to other formats +and printed. + +The LaTeX source for this book is available from +http://www.thinkpython2.com + +Think Python: How to Think Like a Computer Scientist + +Allen B. Downey + +2nd Edition, Version 2.2.14 + +Preface +======= + +The strange history of this book +-------------------------------- + +In January 1999 I was preparing to teach an introductory programming +class in Java. I had taught it three times and I was getting frustrated. +The failure rate in the class was too high and, even for students who +succeeded, the overall level of achievement was too low. + +One of the problems I saw was the books. They were too big, with too +much unnecessary detail about Java, and not enough high-level guidance +about how to program. And they all suffered from the trap door effect: +they would start out easy, proceed gradually, and then somewhere around +Chapter 5 the bottom would fall out. The students would get too much new +material, too fast, and I would spend the rest of the semester picking +up the pieces. + +Two weeks before the first day of classes, I decided to write my own +book. My goals were: + +- Keep it short. It is better for students to read 10 pages than not + read 50 pages. + +- Be careful with vocabulary. I tried to minimize jargon and define + each term at first use. + +- Build gradually. To avoid trap doors, I took the most difficult + topics and split them into a series of small steps. + +- Focus on programming, not the programming language. I included the + minimum useful subset of Java and left out the rest. + +I needed a title, so on a whim I chose *How to Think Like a Computer +Scientist*. + +My first version was rough, but it worked. Students did the reading, and +they understood enough that I could spend class time on the hard topics, +the interesting topics and (most important) letting the students +practice. + +I released the book under the GNU Free Documentation License, which +allows users to copy, modify, and distribute the book. + +What happened next is the cool part. Jeff Elkner, a high school teacher +in Virginia, adopted my book and translated it into Python. He sent me a +copy of his translation, and I had the unusual experience of learning +Python by reading my own book. As Green Tea Press, I published the first +Python version in 2001. + +In 2003 I started teaching at Olin College and I got to teach Python for +the first time. The contrast with Java was striking. Students struggled +less, learned more, worked on more interesting projects, and generally +had a lot more fun. + +Since then I’ve continued to develop the book, correcting errors, +improving some of the examples and adding material, especially +exercises. + +The result is this book, now with the less grandiose title *Think +Python*. Some of the changes are: + +- I added a section about debugging at the end of each chapter. These + sections present general techniques for finding and avoiding bugs, + and warnings about Python pitfalls. + +- I added more exercises, ranging from short tests of understanding to + a few substantial projects. Most exercises include a link to my + solution. + +- I added a series of case studies—longer examples with exercises, + solutions, and discussion. + +- I expanded the discussion of program development plans and basic + design patterns. + +- I added appendices about debugging and analysis of algorithms. + +The second edition of *Think Python* has these new features: + +- The book and all supporting code have been updated to Python 3. + +- I added a few sections, and more details on the web, to help + beginners get started running Python in a browser, so you don’t have + to deal with installing Python until you want to. + +- For Chapter [turtle] I switched from my own turtle graphics package, + called Swampy, to a more standard Python module, turtle, which is + easier to install and more powerful. + +- I added a new chapter called “The Goodies”, which introduces some + additional Python features that are not strictly necessary, but + sometimes handy. + +I hope you enjoy working with this book, and that it helps you learn to +program and think like a computer scientist, at least a little bit. + +| Allen B. Downey +| Olin College + +Acknowledgments +--------------- + +Many thanks to Jeff Elkner, who translated my Java book into Python, +which got this project started and introduced me to what has turned out +to be my favorite language. + +Thanks also to Chris Meyers, who contributed several sections to *How to +Think Like a Computer Scientist*. + +Thanks to the Free Software Foundation for developing the GNU Free +Documentation License, which helped make my collaboration with Jeff and +Chris possible, and Creative Commons for the license I am using now. + +Thanks to the editors at Lulu who worked on *How to Think Like a +Computer Scientist*. + +Thanks to the editors at O’Reilly Media who worked on *Think Python*. + +Thanks to all the students who worked with earlier versions of this book +and all the contributors (listed below) who sent in corrections and +suggestions. + +Contributor List +---------------- + +More than 100 sharp-eyed and thoughtful readers have sent in suggestions +and corrections over the past few years. Their contributions, and +enthusiasm for this project, have been a huge help. + +If you have a suggestion or correction, please send email to +feedback@thinkpython.com. If I make a change based on your feedback, I +will add you to the contributor list (unless you ask to be omitted). + +If you include at least part of the sentence the error appears in, that +makes it easy for me to search. Page and section numbers are fine, too, +but not quite as easy to work with. Thanks! + +- Lloyd Hugh Allen sent in a correction to Section 8.4. + +- Yvon Boulianne sent in a correction of a semantic error in Chapter 5. + +- Fred Bremmer submitted a correction in Section 2.1. + +- Jonah Cohen wrote the Perl scripts to convert the LaTeX source for + this book into beautiful HTML. + +- Michael Conlon sent in a grammar correction in Chapter 2 and an + improvement in style in Chapter 1, and he initiated discussion on the + technical aspects of interpreters. + +- Benoit Girard sent in a correction to a humorous mistake in Section + 5.6. + +- Courtney Gleason and Katherine Smith wrote horsebet.py, which was + used as a case study in an earlier version of the book. Their program + can now be found on the website. + +- Lee Harr submitted more corrections than we have room to list here, + and indeed he should be listed as one of the principal editors of the + text. + +- James Kaylin is a student using the text. He has submitted numerous + corrections. + +- David Kershaw fixed the broken catTwice function in Section 3.10. + +- Eddie Lam has sent in numerous corrections to Chapters 1, 2, and 3. + He also fixed the Makefile so that it creates an index the first time + it is run and helped us set up a versioning scheme. + +- Man-Yong Lee sent in a correction to the example code in Section 2.4. + +- David Mayo pointed out that the word \`\`unconsciously“ in Chapter 1 + needed to be changed to \`\`subconsciously”. + +- Chris McAloon sent in several corrections to Sections 3.9 and 3.10. + +- Matthew J. Moelter has been a long-time contributor who sent in + numerous corrections and suggestions to the book. + +- Simon Dicon Montford reported a missing function definition and + several typos in Chapter 3. He also found errors in the increment + function in Chapter 13. + +- John Ouzts corrected the definition of \`\`return value" in Chapter + 3. + +- Kevin Parks sent in valuable comments and suggestions as to how to + improve the distribution of the book. + +- David Pool sent in a typo in the glossary of Chapter 1, as well as + kind words of encouragement. + +- Michael Schmitt sent in a correction to the chapter on files and + exceptions. + +- Robin Shaw pointed out an error in Section 13.1, where the printTime + function was used in an example without being defined. + +- Paul Sleigh found an error in Chapter 7 and a bug in Jonah Cohen’s + Perl script that generates HTML from LaTeX. + +- Craig T. Snydal is testing the text in a course at Drew University. + He has contributed several valuable suggestions and corrections. + +- Ian Thomas and his students are using the text in a programming + course. They are the first ones to test the chapters in the latter + half of the book, and they have made numerous corrections and + suggestions. + +- Keith Verheyden sent in a correction in Chapter 3. + +- Peter Winstanley let us know about a longstanding error in our Latin + in Chapter 3. + +- Chris Wrobel made corrections to the code in the chapter on file I/O + and exceptions. + +- Moshe Zadka has made invaluable contributions to this project. In + addition to writing the first draft of the chapter on Dictionaries, + he provided continual guidance in the early stages of the book. + +- Christoph Zwerschke sent several corrections and pedagogic + suggestions, and explained the difference between *gleich* and + *selbe*. + +- James Mayer sent us a whole slew of spelling and typographical + errors, including two in the contributor list. + +- Hayden McAfee caught a potentially confusing inconsistency between + two examples. + +- Angel Arnal is part of an international team of translators working + on the Spanish version of the text. He has also found several errors + in the English version. + +- Tauhidul Hoque and Lex Berezhny created the illustrations in Chapter + 1 and improved many of the other illustrations. + +- Dr. Michele Alzetta caught an error in Chapter 8 and sent some + interesting pedagogic comments and suggestions about Fibonacci and + Old Maid. + +- Andy Mitchell caught a typo in Chapter 1 and a broken example in + Chapter 2. + +- Kalin Harvey suggested a clarification in Chapter 7 and caught some + typos. + +- Christopher P. Smith caught several typos and helped us update the + book for Python 2.2. + +- David Hutchins caught a typo in the Foreword. + +- Gregor Lingl is teaching Python at a high school in Vienna, Austria. + He is working on a German translation of the book, and he caught a + couple of bad errors in Chapter 5. + +- Julie Peters caught a typo in the Preface. + +- Florin Oprina sent in an improvement in makeTime, a correction in + printTime, and a nice typo. + +- D. J. Webre suggested a clarification in Chapter 3. + +- Ken found a fistful of errors in Chapters 8, 9 and 11. + +- Ivo Wever caught a typo in Chapter 5 and suggested a clarification in + Chapter 3. + +- Curtis Yanko suggested a clarification in Chapter 2. + +- Ben Logan sent in a number of typos and problems with translating the + book into HTML. + +- Jason Armstrong saw the missing word in Chapter 2. + +- Louis Cordier noticed a spot in Chapter 16 where the code didn’t + match the text. + +- Brian Cain suggested several clarifications in Chapters 2 and 3. + +- Rob Black sent in a passel of corrections, including some changes for + Python 2.2. + +- Jean-Philippe Rey at Ecole Centrale Paris sent a number of patches, + including some updates for Python 2.2 and other thoughtful + improvements. + +- Jason Mader at George Washington University made a number of useful + suggestions and corrections. + +- Jan Gundtofte-Bruun reminded us that “a error” is an error. + +- Abel David and Alexis Dinno reminded us that the plural of “matrix” + is “matrices”, not “matrixes”. This error was in the book for years, + but two readers with the same initials reported it on the same day. + Weird. + +- Charles Thayer encouraged us to get rid of the semi-colons we had put + at the ends of some statements and to clean up our use of “argument” + and “parameter”. + +- Roger Sperberg pointed out a twisted piece of logic in Chapter 3. + +- Sam Bull pointed out a confusing paragraph in Chapter 2. + +- Andrew Cheung pointed out two instances of “use before def”. + +- C. Corey Capel spotted the missing word in the Third Theorem of + Debugging and a typo in Chapter 4. + +- Alessandra helped clear up some Turtle confusion. + +- Wim Champagne found a brain-o in a dictionary example. + +- Douglas Wright pointed out a problem with floor division in arc. + +- Jared Spindor found some jetsam at the end of a sentence. + +- Lin Peiheng sent a number of very helpful suggestions. + +- Ray Hagtvedt sent in two errors and a not-quite-error. + +- Torsten Hübsch pointed out an inconsistency in Swampy. + +- Inga Petuhhov corrected an example in Chapter 14. + +- Arne Babenhauserheide sent several helpful corrections. + +- Mark E. Casida is is good at spotting repeated words. + +- Scott Tyler filled in a that was missing. And then sent in a heap of + corrections. + +- Gordon Shephard sent in several corrections, all in separate emails. + +- Andrew Turner spotted an error in Chapter 8. + +- Adam Hobart fixed a problem with floor division in arc. + +- Daryl Hammond and Sarah Zimmerman pointed out that I served up + math.pi too early. And Zim spotted a typo. + +- George Sass found a bug in a Debugging section. + +- Brian Bingham suggested Exercise [exrotatepairs]. + +- Leah Engelbert-Fenton pointed out that I used tuple as a variable + name, contrary to my own advice. And then found a bunch of typos and + a “use before def”. + +- Joe Funke spotted a typo. + +- Chao-chao Chen found an inconsistency in the Fibonacci example. + +- Jeff Paine knows the difference between space and spam. + +- Lubos Pintes sent in a typo. + +- Gregg Lind and Abigail Heithoff suggested Exercise [checksum]. + +- Max Hailperin has sent in a number of corrections and suggestions. + Max is one of the authors of the extraordinary *Concrete + Abstractions*, which you might want to read when you are done with + this book. + +- Chotipat Pornavalai found an error in an error message. + +- Stanislaw Antol sent a list of very helpful suggestions. + +- Eric Pashman sent a number of corrections for Chapters 4–11. + +- Miguel Azevedo found some typos. + +- Jianhua Liu sent in a long list of corrections. + +- Nick King found a missing word. + +- Martin Zuther sent a long list of suggestions. + +- Adam Zimmerman found an inconsistency in my instance of an “instance” + and several other errors. + +- Ratnakar Tiwari suggested a footnote explaining degenerate triangles. + +- Anurag Goel suggested another solution for ``is_abecedarian`` and + sent some additional corrections. And he knows how to spell Jane + Austen. + +- Kelli Kratzer spotted one of the typos. + +- Mark Griffiths pointed out a confusing example in Chapter 3. + +- Roydan Ongie found an error in my Newton’s method. + +- Patryk Wolowiec helped me with a problem in the HTML version. + +- Mark Chonofsky told me about a new keyword in Python 3. + +- Russell Coleman helped me with my geometry. + +- Wei Huang spotted several typographical errors. + +- Karen Barber spotted the the oldest typo in the book. + +- Nam Nguyen found a typo and pointed out that I used the Decorator + pattern but didn’t mention it by name. + +- Stéphane Morin sent in several corrections and suggestions. + +- Paul Stoop corrected a typo in ``uses_only``. + +- Eric Bronner pointed out a confusion in the discussion of the order + of operations. + +- Alexandros Gezerlis set a new standard for the number and quality of + suggestions he submitted. We are deeply grateful! + +- Gray Thomas knows his right from his left. + +- Giovanni Escobar Sosa sent a long list of corrections and + suggestions. + +- Alix Etienne fixed one of the URLs. + +- Kuang He found a typo. + +- Daniel Neilson corrected an error about the order of operations. + +- Will McGinnis pointed out that polyline was defined differently in + two places. + +- Swarup Sahoo spotted a missing semi-colon. + +- Frank Hecker pointed out an exercise that was under-specified, and + some broken links. + +- Animesh B helped me clean up a confusing example. + +- Martin Caspersen found two round-off errors. + +- Gregor Ulm sent several corrections and suggestions. + +- Dimitrios Tsirigkas suggested I clarify an exercise. + +- Carlos Tafur sent a page of corrections and suggestions. + +- Martin Nordsletten found a bug in an exercise solution. + +- Lars O.D. Christensen found a broken reference. + +- Victor Simeone found a typo. + +- Sven Hoexter pointed out that a variable named input shadows a + build-in function. + +- Viet Le found a typo. + +- Stephen Gregory pointed out the problem with cmp in Python 3. + +- Matthew Shultz let me know about a broken link. + +- Lokesh Kumar Makani let me know about some broken links and some + changes in error messages. + +- Ishwar Bhat corrected my statement of Fermat’s last theorem. + +- Brian McGhie suggested a clarification. + +- Andrea Zanella translated the book into Italian, and sent a number of + corrections along the way. + +- Many, many thanks to Melissa Lewis and Luciano Ramalho for excellent + comments and suggestions on the second edition. + +- Thanks to Harry Percival from PythonAnywhere for his help getting + people started running Python in a browser. + +- Xavier Van Aubel made several useful corrections in the second + edition. + +The way of the program +====================== + +The goal of this book is to teach you to think like a computer +scientist. This way of thinking combines some of the best features of +mathematics, engineering, and natural science. Like mathematicians, +computer scientists use formal languages to denote ideas (specifically +computations). Like engineers, they design things, assembling components +into systems and evaluating tradeoffs among alternatives. Like +scientists, they observe the behavior of complex systems, form +hypotheses, and test predictions. + +The single most important skill for a computer scientist is **problem +solving**. Problem solving means the ability to formulate problems, +think creatively about solutions, and express a solution clearly and +accurately. As it turns out, the process of learning to program is an +excellent opportunity to practice problem-solving skills. That’s why +this chapter is called, “The way of the program”. + +On one level, you will be learning to program, a useful skill by itself. +On another level, you will use programming as a means to an end. As we +go along, that end will become clearer. + +What is a program? +------------------ + +A **program** is a sequence of instructions that specifies how to +perform a computation. The computation might be something mathematical, +such as solving a system of equations or finding the roots of a +polynomial, but it can also be a symbolic computation, such as searching +and replacing text in a document or something graphical, like processing +an image or playing a video. + +The details look different in different languages, but a few basic +instructions appear in just about every language: + +input: + Get data from the keyboard, a file, the network, or some other + device. + +output: + Display data on the screen, save it in a file, send it over the + network, etc. + +math: + Perform basic mathematical operations like addition and + multiplication. + +conditional execution: + Check for certain conditions and run the appropriate code. + +repetition: + Perform some action repeatedly, usually with some variation. + +Believe it or not, that’s pretty much all there is to it. Every program +you’ve ever used, no matter how complicated, is made up of instructions +that look pretty much like these. So you can think of programming as the +process of breaking a large, complex task into smaller and smaller +subtasks until the subtasks are simple enough to be performed with one +of these basic instructions. + +Running Python +-------------- + +One of the challenges of getting started with Python is that you might +have to install Python and related software on your computer. If you are +familiar with your operating system, and especially if you are +comfortable with the command-line interface, you will have no trouble +installing Python. But for beginners, it can be painful to learn about +system administration and programming at the same time. + +To avoid that problem, I recommend that you start out running Python in +a browser. Later, when you are comfortable with Python, I’ll make +suggestions for installing Python on your computer. + +There are a number of web pages you can use to run Python. If you +already have a favorite, go ahead and use it. Otherwise I recommend +PythonAnywhere. I provide detailed instructions for getting started at +http://tinyurl.com/thinkpython2e. + +There are two versions of Python, called Python 2 and Python 3. They are +very similar, so if you learn one, it is easy to switch to the other. In +fact, there are only a few differences you will encounter as a beginner. +This book is written for Python 3, but I include some notes about Python +2. + +The Python **interpreter** is a program that reads and executes Python +code. Depending on your environment, you might start the interpreter by +clicking on an icon, or by typing python on a command line. When it +starts, you should see output like this: + +:: + + Python 3.4.0 (default, Jun 19 2015, 14:20:21) + [GCC 4.8.2] on linux + Type "help", "copyright", "credits" or "license" for more information. + >>> + +The first three lines contain information about the interpreter and the +operating system it’s running on, so it might be different for you. But +you should check that the version number, which is 3.4.0 in this +example, begins with 3, which indicates that you are running Python 3. +If it begins with 2, you are running (you guessed it) Python 2. + +The last line is a **prompt** that indicates that the interpreter is +ready for you to enter code. If you type a line of code and hit Enter, +the interpreter displays the result: + +:: + + >>> 1 + 1 + 2 + +Now you’re ready to get started. From here on, I assume that you know +how to start the Python interpreter and run code. + +The first program +----------------- + +Traditionally, the first program you write in a new language is called +“Hello, World!” because all it does is display the words “Hello, +World!”. In Python, it looks like this: + +:: + + >>> print('Hello, World!') + +This is an example of a **print statement**, although it doesn’t +actually print anything on paper. It displays a result on the screen. In +this case, the result is the words + +:: + + Hello, World! + +The quotation marks in the program mark the beginning and end of the +text to be displayed; they don’t appear in the result. + +The parentheses indicate that print is a function. We’ll get to +functions in Chapter [funcchap]. + +In Python 2, the print statement is slightly different; it is not a +function, so it doesn’t use parentheses. + +:: + + >>> print 'Hello, World!' + +This distinction will make more sense soon, but that’s enough to get +started. + +Arithmetic operators +-------------------- + +After “Hello, World”, the next step is arithmetic. Python provides +**operators**, which are special symbols that represent computations +like addition and multiplication. + +The operators +, -, and perform addition, subtraction, and +multiplication, as in the following examples: + +:: + + >>> 40 + 2 + 42 + >>> 43 - 1 + 42 + >>> 6 * 7 + 42 + +The operator / performs division: + +:: + + >>> 84 / 2 + 42.0 + +You might wonder why the result is 42.0 instead of 42. I’ll explain in +the next section. + +Finally, the operator \* performs exponentiation; that is, it raises a +number to a power: + +:: + + >>> 6**2 + 6 + 42 + +In some other languages, ``^`` is used for exponentiation, but in Python +it is a bitwise operator called XOR. If you are not familiar with +bitwise operators, the result will surprise you: + +:: + + >>> 6 ^ 2 + 4 + +I won’t cover bitwise operators in this book, but you can read about +them at http://wiki.python.org/moin/BitwiseOperators. + +Values and types +---------------- + +A **value** is one of the basic things a program works with, like a +letter or a number. Some values we have seen so far are 2, 42.0, and +``'Hello, World!'``. + +These values belong to different **types**: 2 is an **integer**, 42.0 is +a **floating-point number**, and ``'Hello, World!'`` is a **string**, +so-called because the letters it contains are strung together. + +If you are not sure what type a value has, the interpreter can tell you: + +:: + + >>> type(2) + + >>> type(42.0) + + >>> type('Hello, World!') + + +In these results, the word “class” is used in the sense of a category; a +type is a category of values. + +Not surprisingly, integers belong to the type int, strings belong to str +and floating-point numbers belong to float. + +What about values like ``'2'`` and ``'42.0'``? They look like numbers, +but they are in quotation marks like strings. + +:: + + >>> type('2') + + >>> type('42.0') + + +They’re strings. + +When you type a large integer, you might be tempted to use commas +between groups of digits, as in 1,000,000. This is not a legal *integer* +in Python, but it is legal: + +:: + + >>> 1,000,000 + (1, 0, 0) + +That’s not what we expected at all! Python interprets 1,000,000 as a +comma-separated sequence of integers. We’ll learn more about this kind +of sequence later. + +Formal and natural languages +---------------------------- + +**Natural languages** are the languages people speak, such as English, +Spanish, and French. They were not designed by people (although people +try to impose some order on them); they evolved naturally. + +**Formal languages** are languages that are designed by people for +specific applications. For example, the notation that mathematicians use +is a formal language that is particularly good at denoting relationships +among numbers and symbols. Chemists use a formal language to represent +the chemical structure of molecules. And most importantly: + + **Programming languages are formal languages that have been designed + to express computations.** + +Formal languages tend to have strict **syntax** rules that govern the +structure of statements. For example, in mathematics the statement +:math:`3 + 3 = 6` has correct syntax, but :math:`3 + = 3 \$ 6` does not. +In chemistry :math:`H_2O` is a syntactically correct formula, but +:math:`_2Zz` is not. + +Syntax rules come in two flavors, pertaining to **tokens** and +structure. Tokens are the basic elements of the language, such as words, +numbers, and chemical elements. One of the problems with +:math:`3 += 3 \$ 6` is that :math:` \$ ` is not a legal token in +mathematics (at least as far as I know). Similarly, :math:`_2Zz` is not +legal because there is no element with the abbreviation :math:`Zz`. + +The second type of syntax rule pertains to the way tokens are combined. +The equation :math:`3 += 3` is illegal because even though :math:`+` and +:math:`=` are legal tokens, you can’t have one right after the other. +Similarly, in a chemical formula the subscript comes after the element +name, not before. + +This is @ well-structured Engli$h sentence with invalid t\*kens in it. +This sentence all valid tokens has, but invalid structure with. + +When you read a sentence in English or a statement in a formal language, +you have to figure out the structure (although in a natural language you +do this subconsciously). This process is called **parsing**. + +Although formal and natural languages have many features in +common—tokens, structure, and syntax—there are some differences: + +ambiguity: + Natural languages are full of ambiguity, which people deal with by + using contextual clues and other information. Formal languages are + designed to be nearly or completely unambiguous, which means that + any statement has exactly one meaning, regardless of context. + +redundancy: + In order to make up for ambiguity and reduce misunderstandings, + natural languages employ lots of redundancy. As a result, they are + often verbose. Formal languages are less redundant and more concise. + +literalness: + Natural languages are full of idiom and metaphor. If I say, “The + penny dropped”, there is probably no penny and nothing dropping + (this idiom means that someone understood something after a period + of confusion). Formal languages mean exactly what they say. + +Because we all grow up speaking natural languages, it is sometimes hard +to adjust to formal languages. The difference between formal and natural +language is like the difference between poetry and prose, but more so: + +Poetry: + Words are used for their sounds as well as for their meaning, and + the whole poem together creates an effect or emotional response. + Ambiguity is not only common but often deliberate. + +Prose: + The literal meaning of words is more important, and the structure + contributes more meaning. Prose is more amenable to analysis than + poetry but still often ambiguous. + +Programs: + The meaning of a computer program is unambiguous and literal, and + can be understood entirely by analysis of the tokens and structure. + +Formal languages are more dense than natural languages, so it takes +longer to read them. Also, the structure is important, so it is not +always best to read from top to bottom, left to right. Instead, learn to +parse the program in your head, identifying the tokens and interpreting +the structure. Finally, the details matter. Small errors in spelling and +punctuation, which you can get away with in natural languages, can make +a big difference in a formal language. + +Debugging +--------- + +Programmers make mistakes. For whimsical reasons, programming errors are +called **bugs** and the process of tracking them down is called +**debugging**. + +Programming, and especially debugging, sometimes brings out strong +emotions. If you are struggling with a difficult bug, you might feel +angry, despondent, or embarrassed. + +There is evidence that people naturally respond to computers as if they +were people. When they work well, we think of them as teammates, and +when they are obstinate or rude, we respond to them the same way we +respond to rude, obstinate people (Reeves and Nass, *The Media Equation: +How People Treat Computers, Television, and New Media Like Real People +and Places*). + +Preparing for these reactions might help you deal with them. One +approach is to think of the computer as an employee with certain +strengths, like speed and precision, and particular weaknesses, like +lack of empathy and inability to grasp the big picture. + +Your job is to be a good manager: find ways to take advantage of the +strengths and mitigate the weaknesses. And find ways to use your +emotions to engage with the problem, without letting your reactions +interfere with your ability to work effectively. + +Learning to debug can be frustrating, but it is a valuable skill that is +useful for many activities beyond programming. At the end of each +chapter there is a section, like this one, with my suggestions for +debugging. I hope they help! + +Glossary +-------- + +problem solving: + The process of formulating a problem, finding a solution, and + expressing it. + +high-level language: + A programming language like Python that is designed to be easy for + humans to read and write. + +low-level language: + A programming language that is designed to be easy for a computer to + run; also called “machine language” or “assembly language”. + +portability: + A property of a program that can run on more than one kind of + computer. + +interpreter: + A program that reads another program and executes it + +prompt: + Characters displayed by the interpreter to indicate that it is ready + to take input from the user. + +program: + A set of instructions that specifies a computation. + +print statement: + An instruction that causes the Python interpreter to display a value + on the screen. + +operator: + A special symbol that represents a simple computation like addition, + multiplication, or string concatenation. + +value: + One of the basic units of data, like a number or string, that a + program manipulates. + +type: + A category of values. The types we have seen so far are integers + (type int), floating-point numbers (type float), and strings (type + str). + +integer: + A type that represents whole numbers. + +floating-point: + A type that represents numbers with fractional parts. + +string: + A type that represents sequences of characters. + +natural language: + Any one of the languages that people speak that evolved naturally. + +formal language: + Any one of the languages that people have designed for specific + purposes, such as representing mathematical ideas or computer + programs; all programming languages are formal languages. + +token: + One of the basic elements of the syntactic structure of a program, + analogous to a word in a natural language. + +syntax: + The rules that govern the structure of a program. + +parse: + To examine a program and analyze the syntactic structure. + +bug: + An error in a program. + +debugging: + The process of finding and correcting bugs. + +Exercises +--------- + +It is a good idea to read this book in front of a computer so you can +try out the examples as you go. + +Whenever you are experimenting with a new feature, you should try to +make mistakes. For example, in the “Hello, world!” program, what happens +if you leave out one of the quotation marks? What if you leave out both? +What if you spell print wrong? + +This kind of experiment helps you remember what you read; it also helps +when you are programming, because you get to know what the error +messages mean. It is better to make mistakes now and on purpose than +later and accidentally. + +#. In a print statement, what happens if you leave out one of the + parentheses, or both? + +#. If you are trying to print a string, what happens if you leave out + one of the quotation marks, or both? + +#. You can use a minus sign to make a negative number like -2. What + happens if you put a plus sign before a number? What about 2++2? + +#. In math notation, leading zeros are ok, as in 02. What happens if you + try this in Python? + +#. What happens if you have two values with no operator between them? + +Start the Python interpreter and use it as a calculator. + +#. How many seconds are there in 42 minutes 42 seconds? + +#. How many miles are there in 10 kilometers? Hint: there are 1.61 + kilometers in a mile. + +#. If you run a 10 kilometer race in 42 minutes 42 seconds, what is your + average pace (time per mile in minutes and seconds)? What is your + average speed in miles per hour? + +Variables, expressions and statements +===================================== + +One of the most powerful features of a programming language is the +ability to manipulate **variables**. A variable is a name that refers to +a value. + +Assignment statements +--------------------- + +An **assignment statement** creates a new variable and gives it a value: + +:: + + >>> message = 'And now for something completely different' + >>> n = 17 + >>> pi = 3.141592653589793 + +This example makes three assignments. The first assigns a string to a +new variable named message; the second gives the integer 17 to n; the +third assigns the (approximate) value of :math:`\pi` to pi. + +A common way to represent variables on paper is to write the name with +an arrow pointing to its value. This kind of figure is called a **state +diagram** because it shows what state each of the variables is in (think +of it as the variable’s state of mind). Figure [fig.state2] shows the +result of the previous example. + +.. figure:: figs/state2.pdf + :alt: State diagram. + + State diagram. + +Variable names +-------------- + +Programmers generally choose names for their variables that are +meaningful—they document what the variable is used for. + +Variable names can be as long as you like. They can contain both letters +and numbers, but they can’t begin with a number. It is legal to use +uppercase letters, but it is conventional to use only lower case for +variables names. + +The underscore character, ``_``, can appear in a name. It is often used +in names with multiple words, such as ``your_name`` or +``airspeed_of_unladen_swallow``. + +If you give a variable an illegal name, you get a syntax error: + +:: + + >>> 76trombones = 'big parade' + SyntaxError: invalid syntax + >>> more@ = 1000000 + SyntaxError: invalid syntax + >>> class = 'Advanced Theoretical Zymurgy' + SyntaxError: invalid syntax + +76trombones is illegal because it begins with a number. more@ is illegal +because it contains an illegal character, @. But what’s wrong with +class? + +It turns out that class is one of Python’s **keywords**. The interpreter +uses keywords to recognize the structure of the program, and they cannot +be used as variable names. + +Python 3 has these keywords: + +:: + + False class finally is return + None continue for lambda try + True def from nonlocal while + and del global not with + as elif if or yield + assert else import pass + break except in raise + +You don’t have to memorize this list. In most development environments, +keywords are displayed in a different color; if you try to use one as a +variable name, you’ll know. + +Expressions and statements +-------------------------- + +An **expression** is a combination of values, variables, and operators. +A value all by itself is considered an expression, and so is a variable, +so the following are all legal expressions: + +:: + + >>> 42 + 42 + >>> n + 17 + >>> n + 25 + 42 + +When you type an expression at the prompt, the interpreter **evaluates** +it, which means that it finds the value of the expression. In this +example, n has the value 17 and n + 25 has the value 42. + +A **statement** is a unit of code that has an effect, like creating a +variable or displaying a value. + +:: + + >>> n = 17 + >>> print(n) + +The first line is an assignment statement that gives a value to n. The +second line is a print statement that displays the value of n. + +When you type a statement, the interpreter **executes** it, which means +that it does whatever the statement says. In general, statements don’t +have values. + +Script mode +----------- + +So far we have run Python in **interactive mode**, which means that you +interact directly with the interpreter. Interactive mode is a good way +to get started, but if you are working with more than a few lines of +code, it can be clumsy. + +The alternative is to save code in a file called a **script** and then +run the interpreter in **script mode** to execute the script. By +convention, Python scripts have names that end with .py. + +If you know how to create and run a script on your computer, you are +ready to go. Otherwise I recommend using PythonAnywhere again. I have +posted instructions for running in script mode at +http://tinyurl.com/thinkpython2e. + +Because Python provides both modes, you can test bits of code in +interactive mode before you put them in a script. But there are +differences between interactive mode and script mode that can be +confusing. + +For example, if you are using Python as a calculator, you might type + +:: + + >>> miles = 26.2 + >>> miles * 1.61 + 42.182 + +The first line assigns a value to miles, but it has no visible effect. +The second line is an expression, so the interpreter evaluates it and +displays the result. It turns out that a marathon is about 42 +kilometers. + +But if you type the same code into a script and run it, you get no +output at all. In script mode an expression, all by itself, has no +visible effect. Python actually evaluates the expression, but it doesn’t +display the value unless you tell it to: + +:: + + miles = 26.2 + print(miles * 1.61) + +This behavior can be confusing at first. + +A script usually contains a sequence of statements. If there is more +than one statement, the results appear one at a time as the statements +execute. + +For example, the script + +:: + + print(1) + x = 2 + print(x) + +produces the output + +:: + + 1 + 2 + +The assignment statement produces no output. + +To check your understanding, type the following statements in the Python +interpreter and see what they do: + +:: + + 5 + x = 5 + x + 1 + +Now put the same statements in a script and run it. What is the output? +Modify the script by transforming each expression into a print statement +and then run it again. + +Order of operations +------------------- + +When an expression contains more than one operator, the order of +evaluation depends on the **order of operations**. For mathematical +operators, Python follows mathematical convention. The acronym +**PEMDAS** is a useful way to remember the rules: + +- **P**\ arentheses have the highest precedence and can be used to + force an expression to evaluate in the order you want. Since + expressions in parentheses are evaluated first, 2 \* (3-1) is 4, and + (1+1)\*\*(5-2) is 8. You can also use parentheses to make an + expression easier to read, as in (minute \* 100) / 60, even if it + doesn’t change the result. + +- **E**\ xponentiation has the next highest precedence, so 1 + 2\*\*3 + is 9, not 27, and 2 \* 3\*\*2 is 18, not 36. + +- **M**\ ultiplication and **D**\ ivision have higher precedence than + **A**\ ddition and **S**\ ubtraction. So 2\*3-1 is 5, not 4, and + 6+4/2 is 8, not 5. + +- Operators with the same precedence are evaluated from left to right + (except exponentiation). So in the expression degrees / 2 \* pi, the + division happens first and the result is multiplied by pi. To divide + by :math:`2 \pi`, you can use parentheses or write degrees / 2 / pi. + +I don’t work very hard to remember the precedence of operators. If I +can’t tell by looking at the expression, I use parentheses to make it +obvious. + +String operations +----------------- + +In general, you can’t perform mathematical operations on strings, even +if the strings look like numbers, so the following are illegal: + +:: + + '2'-'1' 'eggs'/'easy' 'third'*'a charm' + +But there are two exceptions, + and . + +The + operator performs **string concatenation**, which means it joins +the strings by linking them end-to-end. For example: + +:: + + >>> first = 'throat' + >>> second = 'warbler' + >>> first + second + throatwarbler + +The operator also works on strings; it performs repetition. For example, +``'Spam'*3`` is ``'SpamSpamSpam'``. If one of the values is a string, +the other has to be an integer. + +This use of + and makes sense by analogy with addition and +multiplication. Just as 4\*3 is equivalent to 4+4+4, we expect +``'Spam'*3`` to be the same as ``'Spam'+'Spam'+'Spam'``, and it is. On +the other hand, there is a significant way in which string concatenation +and repetition are different from integer addition and multiplication. +Can you think of a property that addition has that string concatenation +does not? + +Comments +-------- + +As programs get bigger and more complicated, they get more difficult to +read. Formal languages are dense, and it is often difficult to look at a +piece of code and figure out what it is doing, or why. + +For this reason, it is a good idea to add notes to your programs to +explain in natural language what the program is doing. These notes are +called **comments**, and they start with the ``#`` symbol: + +:: + + # compute the percentage of the hour that has elapsed + percentage = (minute * 100) / 60 + +In this case, the comment appears on a line by itself. You can also put +comments at the end of a line: + +:: + + percentage = (minute * 100) / 60 # percentage of an hour + +Everything from the # to the end of the line is ignored—it has no effect +on the execution of the program. + +Comments are most useful when they document non-obvious features of the +code. It is reasonable to assume that the reader can figure out *what* +the code does; it is more useful to explain *why*. + +This comment is redundant with the code and useless: + +:: + + v = 5 # assign 5 to v + +This comment contains useful information that is not in the code: + +:: + + v = 5 # velocity in meters/second. + +Good variable names can reduce the need for comments, but long names can +make complex expressions hard to read, so there is a tradeoff. + +Debugging +--------- + +Three kinds of errors can occur in a program: syntax errors, runtime +errors, and semantic errors. It is useful to distinguish between them in +order to track them down more quickly. + +Syntax error: + “Syntax” refers to the structure of a program and the rules about + that structure. For example, parentheses have to come in matching + pairs, so (1 + 2) is legal, but 8) is a **syntax error**. + + If there is a syntax error anywhere in your program, Python displays + an error message and quits, and you will not be able to run the + program. During the first few weeks of your programming career, you + might spend a lot of time tracking down syntax errors. As you gain + experience, you will make fewer errors and find them faster. + +Runtime error: + The second type of error is a runtime error, so called because the + error does not appear until after the program has started running. + These errors are also called **exceptions** because they usually + indicate that something exceptional (and bad) has happened. + + Runtime errors are rare in the simple programs you will see in the + first few chapters, so it might be a while before you encounter one. + +Semantic error: + The third type of error is “semantic”, which means related to + meaning. If there is a semantic error in your program, it will run + without generating error messages, but it will not do the right + thing. It will do something else. Specifically, it will do what you + told it to do. + + Identifying semantic errors can be tricky because it requires you to + work backward by looking at the output of the program and trying to + figure out what it is doing. + +Glossary +-------- + +variable: + A name that refers to a value. + +assignment: + A statement that assigns a value to a variable. + +state diagram: + A graphical representation of a set of variables and the values they + refer to. + +keyword: + A reserved word that is used to parse a program; you cannot use + keywords like if, def, and while as variable names. + +operand: + One of the values on which an operator operates. + +expression: + A combination of variables, operators, and values that represents a + single result. + +evaluate: + To simplify an expression by performing the operations in order to + yield a single value. + +statement: + A section of code that represents a command or action. So far, the + statements we have seen are assignments and print statements. + +execute: + To run a statement and do what it says. + +interactive mode: + A way of using the Python interpreter by typing code at the prompt. + +script mode: + A way of using the Python interpreter to read code from a script and + run it. + +script: + A program stored in a file. + +order of operations: + Rules governing the order in which expressions involving multiple + operators and operands are evaluated. + +concatenate: + To join two operands end-to-end. + +comment: + Information in a program that is meant for other programmers (or + anyone reading the source code) and has no effect on the execution + of the program. + +syntax error: + An error in a program that makes it impossible to parse (and + therefore impossible to interpret). + +exception: + An error that is detected while the program is running. + +semantics: + The meaning of a program. + +semantic error: + An error in a program that makes it do something other than what the + programmer intended. + +Exercises +--------- + +Repeating my advice from the previous chapter, whenever you learn a new +feature, you should try it out in interactive mode and make errors on +purpose to see what goes wrong. + +- We’ve seen that n = 42 is legal. What about 42 = n? + +- How about x = y = 1? + +- In some languages every statement ends with a semi-colon, ;. What + happens if you put a semi-colon at the end of a Python statement? + +- What if you put a period at the end of a statement? + +- In math notation you can multiply :math:`x` and :math:`y` like this: + :math:`x y`. What happens if you try that in Python? + +Practice using the Python interpreter as a calculator: + +#. The volume of a sphere with radius :math:`r` is + :math:`\frac{4}{3} \pi r^3`. What is the volume of a sphere with + radius 5? + +#. Suppose the cover price of a book is $24.95, but bookstores get a 40% + discount. Shipping costs $3 for the first copy and 75 cents for each + additional copy. What is the total wholesale cost for 60 copies? + +#. If I leave my house at 6:52 am and run 1 mile at an easy pace (8:15 + per mile), then 3 miles at tempo (7:12 per mile) and 1 mile at easy + pace again, what time do I get home for breakfast? + +Functions +========= + +In the context of programming, a **function** is a named sequence of +statements that performs a computation. When you define a function, you +specify the name and the sequence of statements. Later, you can “call” +the function by name. + +Function calls +-------------- + +We have already seen one example of a **function call**: + +:: + + >>> type(42) + + +The name of the function is type. The expression in parentheses is +called the **argument** of the function. The result, for this function, +is the type of the argument. + +It is common to say that a function “takes” an argument and “returns” a +result. The result is also called the **return value**. + +Python provides functions that convert values from one type to another. +The int function takes any value and converts it to an integer, if it +can, or complains otherwise: + +:: + + >>> int('32') + 32 + >>> int('Hello') + ValueError: invalid literal for int(): Hello + +int can convert floating-point values to integers, but it doesn’t round +off; it chops off the fraction part: + +:: + + >>> int(3.99999) + 3 + >>> int(-2.3) + -2 + +float converts integers and strings to floating-point numbers: + +:: + + >>> float(32) + 32.0 + >>> float('3.14159') + 3.14159 + +Finally, str converts its argument to a string: + +:: + + >>> str(32) + '32' + >>> str(3.14159) + '3.14159' + +Math functions +-------------- + +Python has a math module that provides most of the familiar mathematical +functions. A **module** is a file that contains a collection of related +functions. + +Before we can use the functions in a module, we have to import it with +an **import statement**: + +:: + + >>> import math + +This statement creates a **module object** named math. If you display +the module object, you get some information about it: + +:: + + >>> math + + +The module object contains the functions and variables defined in the +module. To access one of the functions, you have to specify the name of +the module and the name of the function, separated by a dot (also known +as a period). This format is called **dot notation**. + +:: + + >>> ratio = signal_power / noise_power + >>> decibels = 10 * math.log10(ratio) + + >>> radians = 0.7 + >>> height = math.sin(radians) + +The first example uses ``math.log10`` to compute a signal-to-noise ratio +in decibels (assuming that ``signal_power`` and ``noise_power`` are +defined). The math module also provides log, which computes logarithms +base e. + +The second example finds the sine of radians. The name of the variable +is a hint that sin and the other trigonometric functions (cos, tan, +etc.) take arguments in radians. To convert from degrees to radians, +divide by 180 and multiply by :math:`\pi`: + +:: + + >>> degrees = 45 + >>> radians = degrees / 180.0 * math.pi + >>> math.sin(radians) + 0.707106781187 + +The expression math.pi gets the variable pi from the math module. Its +value is a floating-point approximation of :math:`\pi`, accurate to +about 15 digits. + +If you know trigonometry, you can check the previous result by comparing +it to the square root of two divided by two: + +:: + + >>> math.sqrt(2) / 2.0 + 0.707106781187 + +Composition +----------- + +So far, we have looked at the elements of a program—variables, +expressions, and statements—in isolation, without talking about how to +combine them. + +One of the most useful features of programming languages is their +ability to take small building blocks and **compose** them. For example, +the argument of a function can be any kind of expression, including +arithmetic operators: + +:: + + x = math.sin(degrees / 360.0 * 2 * math.pi) + +And even function calls: + +:: + + x = math.exp(math.log(x+1)) + +Almost anywhere you can put a value, you can put an arbitrary +expression, with one exception: the left side of an assignment statement +has to be a variable name. Any other expression on the left side is a +syntax error (we will see exceptions to this rule later). + +:: + + >>> minutes = hours * 60 # right + >>> hours * 60 = minutes # wrong! + SyntaxError: can't assign to operator + +Adding new functions +-------------------- + +So far, we have only been using the functions that come with Python, but +it is also possible to add new functions. A **function definition** +specifies the name of a new function and the sequence of statements that +run when the function is called. + +Here is an example: + +:: + + def print_lyrics(): + print("I'm a lumberjack, and I'm okay.") + print("I sleep all night and I work all day.") + +def is a keyword that indicates that this is a function definition. The +name of the function is ``print_lyrics``. The rules for function names +are the same as for variable names: letters, numbers and underscore are +legal, but the first character can’t be a number. You can’t use a +keyword as the name of a function, and you should avoid having a +variable and a function with the same name. + +The empty parentheses after the name indicate that this function doesn’t +take any arguments. + +The first line of the function definition is called the **header**; the +rest is called the **body**. The header has to end with a colon and the +body has to be indented. By convention, indentation is always four +spaces. The body can contain any number of statements. + +The strings in the print statements are enclosed in double quotes. +Single quotes and double quotes do the same thing; most people use +single quotes except in cases like this where a single quote (which is +also an apostrophe) appears in the string. + +All quotation marks (single and double) must be “straight quotes”, +usually located next to Enter on the keyboard. “Curly quotes”, like the +ones in this sentence, are not legal in Python. + +If you type a function definition in interactive mode, the interpreter +prints dots (...) to let you know that the definition isn’t complete: + +:: + + >>> def print_lyrics(): + ... print("I'm a lumberjack, and I'm okay.") + ... print("I sleep all night and I work all day.") + ... + +To end the function, you have to enter an empty line. + +Defining a function creates a **function object**, which has type +``function``: + +:: + + >>> print(print_lyrics) + + >>> type(print_lyrics) + + +The syntax for calling the new function is the same as for built-in +functions: + +:: + + >>> print_lyrics() + I'm a lumberjack, and I'm okay. + I sleep all night and I work all day. + +Once you have defined a function, you can use it inside another +function. For example, to repeat the previous refrain, we could write a +function called ``repeat_lyrics``: + +:: + + def repeat_lyrics(): + print_lyrics() + print_lyrics() + +And then call ``repeat_lyrics``: + +:: + + >>> repeat_lyrics() + I'm a lumberjack, and I'm okay. + I sleep all night and I work all day. + I'm a lumberjack, and I'm okay. + I sleep all night and I work all day. + +But that’s not really how the song goes. + +Definitions and uses +-------------------- + +Pulling together the code fragments from the previous section, the whole +program looks like this: + +:: + + def print_lyrics(): + print("I'm a lumberjack, and I'm okay.") + print("I sleep all night and I work all day.") + + def repeat_lyrics(): + print_lyrics() + print_lyrics() + + repeat_lyrics() + +This program contains two function definitions: ``print_lyrics`` and +``repeat_lyrics``. Function definitions get executed just like other +statements, but the effect is to create function objects. The statements +inside the function do not run until the function is called, and the +function definition generates no output. + +As you might expect, you have to create a function before you can run +it. In other words, the function definition has to run before the +function gets called. + +As an exercise, move the last line of this program to the top, so the +function call appears before the definitions. Run the program and see +what error message you get. + +Now move the function call back to the bottom and move the definition of +``print_lyrics`` after the definition of ``repeat_lyrics``. What happens +when you run this program? + +Flow of execution +----------------- + +To ensure that a function is defined before its first use, you have to +know the order statements run in, which is called the **flow of +execution**. + +Execution always begins at the first statement of the program. +Statements are run one at a time, in order from top to bottom. + +Function definitions do not alter the flow of execution of the program, +but remember that statements inside the function don’t run until the +function is called. + +A function call is like a detour in the flow of execution. Instead of +going to the next statement, the flow jumps to the body of the function, +runs the statements there, and then comes back to pick up where it left +off. + +That sounds simple enough, until you remember that one function can call +another. While in the middle of one function, the program might have to +run the statements in another function. Then, while running that new +function, the program might have to run yet another function! + +Fortunately, Python is good at keeping track of where it is, so each +time a function completes, the program picks up where it left off in the +function that called it. When it gets to the end of the program, it +terminates. + +In summary, when you read a program, you don’t always want to read from +top to bottom. Sometimes it makes more sense if you follow the flow of +execution. + +Parameters and arguments +------------------------ + +Some of the functions we have seen require arguments. For example, when +you call math.sin you pass a number as an argument. Some functions take +more than one argument: math.pow takes two, the base and the exponent. + +Inside the function, the arguments are assigned to variables called +**parameters**. Here is a definition for a function that takes an +argument: + +:: + + def print_twice(bruce): + print(bruce) + print(bruce) + +This function assigns the argument to a parameter named bruce. When the +function is called, it prints the value of the parameter (whatever it +is) twice. + +This function works with any value that can be printed. + +:: + + >>> print_twice('Spam') + Spam + Spam + >>> print_twice(42) + 42 + 42 + >>> print_twice(math.pi) + 3.14159265359 + 3.14159265359 + +The same rules of composition that apply to built-in functions also +apply to programmer-defined functions, so we can use any kind of +expression as an argument for ``print_twice``: + +:: + + >>> print_twice('Spam '*4) + Spam Spam Spam Spam + Spam Spam Spam Spam + >>> print_twice(math.cos(math.pi)) + -1.0 + -1.0 + +The argument is evaluated before the function is called, so in the +examples the expressions ``'Spam '*4`` and math.cos(math.pi) are only +evaluated once. + +You can also use a variable as an argument: + +:: + + >>> michael = 'Eric, the half a bee.' + >>> print_twice(michael) + Eric, the half a bee. + Eric, the half a bee. + +The name of the variable we pass as an argument (michael) has nothing to +do with the name of the parameter (bruce). It doesn’t matter what the +value was called back home (in the caller); here in ``print_twice``, we +call everybody bruce. + +Variables and parameters are local +---------------------------------- + +When you create a variable inside a function, it is **local**, which +means that it only exists inside the function. For example: + +:: + + def cat_twice(part1, part2): + cat = part1 + part2 + print_twice(cat) + +This function takes two arguments, concatenates them, and prints the +result twice. Here is an example that uses it: + +:: + + >>> line1 = 'Bing tiddle ' + >>> line2 = 'tiddle bang.' + >>> cat_twice(line1, line2) + Bing tiddle tiddle bang. + Bing tiddle tiddle bang. + +When ``cat_twice`` terminates, the variable cat is destroyed. If we try +to print it, we get an exception: + +:: + + >>> print(cat) + NameError: name 'cat' is not defined + +Parameters are also local. For example, outside ``print_twice``, there +is no such thing as bruce. + +Stack diagrams +-------------- + +To keep track of which variables can be used where, it is sometimes +useful to draw a **stack diagram**. Like state diagrams, stack diagrams +show the value of each variable, but they also show the function each +variable belongs to. + +Each function is represented by a **frame**. A frame is a box with the +name of a function beside it and the parameters and variables of the +function inside it. The stack diagram for the previous example is shown +in Figure [fig.stack]. + +.. figure:: figs/stack.pdf + :alt: Stack diagram. + + Stack diagram. + +The frames are arranged in a stack that indicates which function called +which, and so on. In this example, ``print_twice`` was called by +``cat_twice``, and ``cat_twice`` was called by ``__main__``, which is a +special name for the topmost frame. When you create a variable outside +of any function, it belongs to ``__main__``. + +Each parameter refers to the same value as its corresponding argument. +So, part1 has the same value as line1, part2 has the same value as +line2, and bruce has the same value as cat. + +If an error occurs during a function call, Python prints the name of the +function, the name of the function that called it, and the name of the +function that called *that*, all the way back to ``__main__``. + +For example, if you try to access cat from within ``print_twice``, you +get a NameError: + +:: + + Traceback (innermost last): + File "test.py", line 13, in __main__ + cat_twice(line1, line2) + File "test.py", line 5, in cat_twice + print_twice(cat) + File "test.py", line 9, in print_twice + print(cat) + NameError: name 'cat' is not defined + +This list of functions is called a **traceback**. It tells you what +program file the error occurred in, and what line, and what functions +were executing at the time. It also shows the line of code that caused +the error. + +The order of the functions in the traceback is the same as the order of +the frames in the stack diagram. The function that is currently running +is at the bottom. + +Fruitful functions and void functions +------------------------------------- + +Some of the functions we have used, such as the math functions, return +results; for lack of a better name, I call them **fruitful functions**. +Other functions, like ``print_twice``, perform an action but don’t +return a value. They are called **void functions**. + +When you call a fruitful function, you almost always want to do +something with the result; for example, you might assign it to a +variable or use it as part of an expression: + +:: + + x = math.cos(radians) + golden = (math.sqrt(5) + 1) / 2 + +When you call a function in interactive mode, Python displays the +result: + +:: + + >>> math.sqrt(5) + 2.2360679774997898 + +But in a script, if you call a fruitful function all by itself, the +return value is lost forever! + +:: + + math.sqrt(5) + +This script computes the square root of 5, but since it doesn’t store or +display the result, it is not very useful. + +Void functions might display something on the screen or have some other +effect, but they don’t have a return value. If you assign the result to +a variable, you get a special value called None. + +:: + + >>> result = print_twice('Bing') + Bing + Bing + >>> print(result) + None + +The value None is not the same as the string ``'None'``. It is a special +value that has its own type: + +:: + + >>> print(type(None)) + + +The functions we have written so far are all void. We will start writing +fruitful functions in a few chapters. + +Why functions? +-------------- + +It may not be clear why it is worth the trouble to divide a program into +functions. There are several reasons: + +- Creating a new function gives you an opportunity to name a group of + statements, which makes your program easier to read and debug. + +- Functions can make a program smaller by eliminating repetitive code. + Later, if you make a change, you only have to make it in one place. + +- Dividing a long program into functions allows you to debug the parts + one at a time and then assemble them into a working whole. + +- Well-designed functions are often useful for many programs. Once you + write and debug one, you can reuse it. + +Debugging +--------- + +One of the most important skills you will acquire is debugging. Although +it can be frustrating, debugging is one of the most intellectually rich, +challenging, and interesting parts of programming. + +In some ways debugging is like detective work. You are confronted with +clues and you have to infer the processes and events that led to the +results you see. + +Debugging is also like an experimental science. Once you have an idea +about what is going wrong, you modify your program and try again. If +your hypothesis was correct, you can predict the result of the +modification, and you take a step closer to a working program. If your +hypothesis was wrong, you have to come up with a new one. As Sherlock +Holmes pointed out, “When you have eliminated the impossible, whatever +remains, however improbable, must be the truth.” (A. Conan Doyle, *The +Sign of Four*) + +For some people, programming and debugging are the same thing. That is, +programming is the process of gradually debugging a program until it +does what you want. The idea is that you should start with a working +program and make small modifications, debugging them as you go. + +For example, Linux is an operating system that contains millions of +lines of code, but it started out as a simple program Linus Torvalds +used to explore the Intel 80386 chip. According to Larry Greenfield, +“One of Linus’s earlier projects was a program that would switch between +printing AAAA and BBBB. This later evolved to Linux.” (*The Linux Users’ +Guide* Beta Version 1). + +Glossary +-------- + +function: + A named sequence of statements that performs some useful operation. + Functions may or may not take arguments and may or may not produce a + result. + +function definition: + A statement that creates a new function, specifying its name, + parameters, and the statements it contains. + +function object: + A value created by a function definition. The name of the function + is a variable that refers to a function object. + +header: + The first line of a function definition. + +body: + The sequence of statements inside a function definition. + +parameter: + A name used inside a function to refer to the value passed as an + argument. + +function call: + A statement that runs a function. It consists of the function name + followed by an argument list in parentheses. + +argument: + A value provided to a function when the function is called. This + value is assigned to the corresponding parameter in the function. + +local variable: + A variable defined inside a function. A local variable can only be + used inside its function. + +return value: + The result of a function. If a function call is used as an + expression, the return value is the value of the expression. + +fruitful function: + A function that returns a value. + +void function: + A function that always returns None. + +None: + A special value returned by void functions. + +module: + A file that contains a collection of related functions and other + definitions. + +import statement: + A statement that reads a module file and creates a module object. + +module object: + A value created by an import statement that provides access to the + values defined in a module. + +dot notation: + The syntax for calling a function in another module by specifying + the module name followed by a dot (period) and the function name. + +composition: + Using an expression as part of a larger expression, or a statement + as part of a larger statement. + +flow of execution: + The order statements run in. + +stack diagram: + A graphical representation of a stack of functions, their variables, + and the values they refer to. + +frame: + A box in a stack diagram that represents a function call. It + contains the local variables and parameters of the function. + +traceback: + A list of the functions that are executing, printed when an + exception occurs. + +Exercises +--------- + +Write a function named ``right_justify`` that takes a string named s as +a parameter and prints the string with enough leading spaces so that the +last letter of the string is in column 70 of the display. + +:: + + >>> right_justify('monty') + monty + +Hint: Use string concatenation and repetition. Also, Python provides a +built-in function called len that returns the length of a string, so the +value of ``len('monty')`` is 5. + +A function object is a value you can assign to a variable or pass as an +argument. For example, ``do_twice`` is a function that takes a function +object as an argument and calls it twice: + +:: + + def do_twice(f): + f() + f() + +Here’s an example that uses ``do_twice`` to call a function named +``print_spam`` twice. + +:: + + def print_spam(): + print('spam') + + do_twice(print_spam) + +#. Type this example into a script and test it. + +#. Modify ``do_twice`` so that it takes two arguments, a function object + and a value, and calls the function twice, passing the value as an + argument. + +#. Copy the definition of ``print_twice`` from earlier in this chapter + to your script. + +#. Use the modified version of ``do_twice`` to call ``print_twice`` + twice, passing ``'spam'`` as an argument. + +#. Define a new function called ``do_four`` that takes a function object + and a value and calls the function four times, passing the value as a + parameter. There should be only two statements in the body of this + function, not four. + +Solution: http://thinkpython2.com/code/do_four.py. + +Note: This exercise should be done using only the statements and other +features we have learned so far. + +#. Write a function that draws a grid like the following: + + :: + + + - - - - + - - - - + + | | | + | | | + | | | + | | | + + - - - - + - - - - + + | | | + | | | + | | | + | | | + + - - - - + - - - - + + + Hint: to print more than one value on a line, you can print a + comma-separated sequence of values: + + :: + + print('+', '-') + + By default, print advances to the next line, but you can override + that behavior and put a space at the end, like this: + + :: + + print('+', end=' ') + print('-') + + The output of these statements is ``'+ -'``. + + A print statement with no argument ends the current line and goes to + the next line. + +#. Write a function that draws a similar grid with four rows and four + columns. + +Solution: http://thinkpython2.com/code/grid.py. Credit: This exercise is +based on an exercise in Oualline, *Practical C Programming, Third +Edition*, O’Reilly Media, 1997. + +Case study: interface design +============================ + +This chapter presents a case study that demonstrates a process for +designing functions that work together. + +It introduces the turtle module, which allows you to create images using +turtle graphics. The turtle module is included in most Python +installations, but if you are running Python using PythonAnywhere, you +won’t be able to run the turtle examples (at least you couldn’t when I +wrote this). + +If you have already installed Python on your computer, you should be +able to run the examples. Otherwise, now is a good time to install. I +have posted instructions at http://tinyurl.com/thinkpython2e. + +Code examples from this chapter are available from +http://thinkpython2.com/code/polygon.py. + +The turtle module +----------------- + +To check whether you have the turtle module, open the Python interpreter +and type + +:: + + >>> import turtle + >>> bob = turtle.Turtle() + +When you run this code, it should create a new window with small arrow +that represents the turtle. Close the window. + +Create a file named mypolygon.py and type in the following code: + +:: + + import turtle + bob = turtle.Turtle() + print(bob) + turtle.mainloop() + +The turtle module (with a lowercase ’t’) provides a function called +Turtle (with an uppercase ’T’) that creates a Turtle object, which we +assign to a variable named bob. Printing bob displays something like: + +:: + + + +This means that bob refers to an object with type Turtle as defined in +module turtle. + +``mainloop`` tells the window to wait for the user to do something, +although in this case there’s not much for the user to do except close +the window. + +Once you create a Turtle, you can call a **method** to move it around +the window. A method is similar to a function, but it uses slightly +different syntax. For example, to move the turtle forward: + +:: + + bob.fd(100) + +The method, fd, is associated with the turtle object we’re calling bob. +Calling a method is like making a request: you are asking bob to move +forward. + +The argument of fd is a distance in pixels, so the actual size depends +on your display. + +Other methods you can call on a Turtle are bk to move backward, lt for +left turn, and rt right turn. The argument for lt and rt is an angle in +degrees. + +Also, each Turtle is holding a pen, which is either down or up; if the +pen is down, the Turtle leaves a trail when it moves. The methods pu and +pd stand for “pen up” and “pen down”. + +To draw a right angle, add these lines to the program (after creating +bob and before calling ``mainloop``): + +:: + + bob.fd(100) + bob.lt(90) + bob.fd(100) + +When you run this program, you should see bob move east and then north, +leaving two line segments behind. + +Now modify the program to draw a square. Don’t go on until you’ve got it +working! + +Simple repetition +----------------- + +Chances are you wrote something like this: + +:: + + bob.fd(100) + bob.lt(90) + + bob.fd(100) + bob.lt(90) + + bob.fd(100) + bob.lt(90) + + bob.fd(100) + +We can do the same thing more concisely with a for statement. Add this +example to mypolygon.py and run it again: + +:: + + for i in range(4): + print('Hello!') + +You should see something like this: + +:: + + Hello! + Hello! + Hello! + Hello! + +This is the simplest use of the for statement; we will see more later. +But that should be enough to let you rewrite your square-drawing +program. Don’t go on until you do. + +Here is a for statement that draws a square: + +:: + + for i in range(4): + bob.fd(100) + bob.lt(90) + +The syntax of a for statement is similar to a function definition. It +has a header that ends with a colon and an indented body. The body can +contain any number of statements. + +A for statement is also called a **loop** because the flow of execution +runs through the body and then loops back to the top. In this case, it +runs the body four times. + +This version is actually a little different from the previous +square-drawing code because it makes another turn after drawing the last +side of the square. The extra turn takes more time, but it simplifies +the code if we do the same thing every time through the loop. This +version also has the effect of leaving the turtle back in the starting +position, facing in the starting direction. + +Exercises +--------- + +The following is a series of exercises using TurtleWorld. They are meant +to be fun, but they have a point, too. While you are working on them, +think about what the point is. + +The following sections have solutions to the exercises, so don’t look +until you have finished (or at least tried). + +#. Write a function called square that takes a parameter named t, which + is a turtle. It should use the turtle to draw a square. + + Write a function call that passes bob as an argument to square, and + then run the program again. + +#. Add another parameter, named length, to square. Modify the body so + length of the sides is length, and then modify the function call to + provide a second argument. Run the program again. Test your program + with a range of values for length. + +#. Make a copy of square and change the name to polygon. Add another + parameter named n and modify the body so it draws an n-sided regular + polygon. Hint: The exterior angles of an n-sided regular polygon are + :math:`360/n` degrees. + +#. Write a function called circle that takes a turtle, t, and radius, r, + as parameters and that draws an approximate circle by calling polygon + with an appropriate length and number of sides. Test your function + with a range of values of r. + + Hint: figure out the circumference of the circle and make sure that + length \* n = circumference. + +#. Make a more general version of circle called arc that takes an + additional parameter angle, which determines what fraction of a + circle to draw. angle is in units of degrees, so when angle=360, arc + should draw a complete circle. + +Encapsulation +------------- + +The first exercise asks you to put your square-drawing code into a +function definition and then call the function, passing the turtle as a +parameter. Here is a solution: + +:: + + def square(t): + for i in range(4): + t.fd(100) + t.lt(90) + + square(bob) + +The innermost statements, fd and lt are indented twice to show that they +are inside the for loop, which is inside the function definition. The +next line, square(bob), is flush with the left margin, which indicates +the end of both the for loop and the function definition. + +Inside the function, t refers to the same turtle bob, so t.lt(90) has +the same effect as bob.lt(90). In that case, why not call the parameter +bob? The idea is that t can be any turtle, not just bob, so you could +create a second turtle and pass it as an argument to square: + +:: + + alice = Turtle() + square(alice) + +Wrapping a piece of code up in a function is called **encapsulation**. +One of the benefits of encapsulation is that it attaches a name to the +code, which serves as a kind of documentation. Another advantage is that +if you re-use the code, it is more concise to call a function twice than +to copy and paste the body! + +Generalization +-------------- + +The next step is to add a length parameter to square. Here is a +solution: + +:: + + def square(t, length): + for i in range(4): + t.fd(length) + t.lt(90) + + square(bob, 100) + +Adding a parameter to a function is called **generalization** because it +makes the function more general: in the previous version, the square is +always the same size; in this version it can be any size. + +The next step is also a generalization. Instead of drawing squares, +polygon draws regular polygons with any number of sides. Here is a +solution: + +:: + + def polygon(t, n, length): + angle = 360 / n + for i in range(n): + t.fd(length) + t.lt(angle) + + polygon(bob, 7, 70) + +This example draws a 7-sided polygon with side length 70. + +If you are using Python 2, the value of angle might be off because of +integer division. A simple solution is to compute angle = 360.0 / n. +Because the numerator is a floating-point number, the result is floating +point. + +When a function has more than a few numeric arguments, it is easy to +forget what they are, or what order they should be in. In that case it +is often a good idea to include the names of the parameters in the +argument list: + +:: + + polygon(bob, n=7, length=70) + +These are called **keyword arguments** because they include the +parameter names as “keywords” (not to be confused with Python keywords +like while and def). + +This syntax makes the program more readable. It is also a reminder about +how arguments and parameters work: when you call a function, the +arguments are assigned to the parameters. + +Interface design +---------------- + +The next step is to write circle, which takes a radius, r, as a +parameter. Here is a simple solution that uses polygon to draw a +50-sided polygon: + +:: + + import math + + def circle(t, r): + circumference = 2 * math.pi * r + n = 50 + length = circumference / n + polygon(t, n, length) + +The first line computes the circumference of a circle with radius r +using the formula :math:`2 \pi r`. Since we use math.pi, we have to +import math. By convention, import statements are usually at the +beginning of the script. + +n is the number of line segments in our approximation of a circle, so +length is the length of each segment. Thus, polygon draws a 50-sides +polygon that approximates a circle with radius r. + +One limitation of this solution is that n is a constant, which means +that for very big circles, the line segments are too long, and for small +circles, we waste time drawing very small segments. One solution would +be to generalize the function by taking n as a parameter. This would +give the user (whoever calls circle) more control, but the interface +would be less clean. + +The **interface** of a function is a summary of how it is used: what are +the parameters? What does the function do? And what is the return value? +An interface is “clean” if it allows the caller to do what they want +without dealing with unnecessary details. + +In this example, r belongs in the interface because it specifies the +circle to be drawn. n is less appropriate because it pertains to the +details of *how* the circle should be rendered. + +Rather than clutter up the interface, it is better to choose an +appropriate value of n depending on circumference: + +:: + + def circle(t, r): + circumference = 2 * math.pi * r + n = int(circumference / 3) + 1 + length = circumference / n + polygon(t, n, length) + +Now the number of segments is an integer near circumference/3, so the +length of each segment is approximately 3, which is small enough that +the circles look good, but big enough to be efficient, and acceptable +for any size circle. + +Refactoring +----------- + +When I wrote circle, I was able to re-use polygon because a many-sided +polygon is a good approximation of a circle. But arc is not as +cooperative; we can’t use polygon or circle to draw an arc. + +One alternative is to start with a copy of polygon and transform it into +arc. The result might look like this: + +:: + + def arc(t, r, angle): + arc_length = 2 * math.pi * r * angle / 360 + n = int(arc_length / 3) + 1 + step_length = arc_length / n + step_angle = angle / n + + for i in range(n): + t.fd(step_length) + t.lt(step_angle) + +The second half of this function looks like polygon, but we can’t re-use +polygon without changing the interface. We could generalize polygon to +take an angle as a third argument, but then polygon would no longer be +an appropriate name! Instead, let’s call the more general function +polyline: + +:: + + def polyline(t, n, length, angle): + for i in range(n): + t.fd(length) + t.lt(angle) + +Now we can rewrite polygon and arc to use polyline: + +:: + + def polygon(t, n, length): + angle = 360.0 / n + polyline(t, n, length, angle) + + def arc(t, r, angle): + arc_length = 2 * math.pi * r * angle / 360 + n = int(arc_length / 3) + 1 + step_length = arc_length / n + step_angle = float(angle) / n + polyline(t, n, step_length, step_angle) + +Finally, we can rewrite circle to use arc: + +:: + + def circle(t, r): + arc(t, r, 360) + +This process—rearranging a program to improve interfaces and facilitate +code re-use—is called **refactoring**. In this case, we noticed that +there was similar code in arc and polygon, so we “factored it out” into +polyline. + +If we had planned ahead, we might have written polyline first and +avoided refactoring, but often you don’t know enough at the beginning of +a project to design all the interfaces. Once you start coding, you +understand the problem better. Sometimes refactoring is a sign that you +have learned something. + +A development plan +------------------ + +A **development plan** is a process for writing programs. The process we +used in this case study is “encapsulation and generalization”. The steps +of this process are: + +#. Start by writing a small program with no function definitions. + +#. Once you get the program working, identify a coherent piece of it, + encapsulate the piece in a function and give it a name. + +#. Generalize the function by adding appropriate parameters. + +#. Repeat steps 1–3 until you have a set of working functions. Copy and + paste working code to avoid retyping (and re-debugging). + +#. Look for opportunities to improve the program by refactoring. For + example, if you have similar code in several places, consider + factoring it into an appropriately general function. + +This process has some drawbacks—we will see alternatives later—but it +can be useful if you don’t know ahead of time how to divide the program +into functions. This approach lets you design as you go along. + +docstring +--------- + +A **docstring** is a string at the beginning of a function that explains +the interface (“doc” is short for “documentation”). Here is an example: + +:: + + def polyline(t, n, length, angle): + """Draws n line segments with the given length and + angle (in degrees) between them. t is a turtle. + """ + for i in range(n): + t.fd(length) + t.lt(angle) + +By convention, all docstrings are triple-quoted strings, also known as +multiline strings because the triple quotes allow the string to span +more than one line. + +It is terse, but it contains the essential information someone would +need to use this function. It explains concisely what the function does +(without getting into the details of how it does it). It explains what +effect each parameter has on the behavior of the function and what type +each parameter should be (if it is not obvious). + +Writing this kind of documentation is an important part of interface +design. A well-designed interface should be simple to explain; if you +have a hard time explaining one of your functions, maybe the interface +could be improved. + +Debugging +--------- + +An interface is like a contract between a function and a caller. The +caller agrees to provide certain parameters and the function agrees to +do certain work. + +For example, polyline requires four arguments: t has to be a Turtle; n +has to be an integer; length should be a positive number; and angle has +to be a number, which is understood to be in degrees. + +These requirements are called **preconditions** because they are +supposed to be true before the function starts executing. Conversely, +conditions at the end of the function are **postconditions**. +Postconditions include the intended effect of the function (like drawing +line segments) and any side effects (like moving the Turtle or making +other changes). + +Preconditions are the responsibility of the caller. If the caller +violates a (properly documented!) precondition and the function doesn’t +work correctly, the bug is in the caller, not the function. + +If the preconditions are satisfied and the postconditions are not, the +bug is in the function. If your pre- and postconditions are clear, they +can help with debugging. + +Glossary +-------- + +method: + A function that is associated with an object and called using dot + notation. + +loop: + A part of a program that can run repeatedly. + +encapsulation: + The process of transforming a sequence of statements into a function + definition. + +generalization: + The process of replacing something unnecessarily specific (like a + number) with something appropriately general (like a variable or + parameter). + +keyword argument: + An argument that includes the name of the parameter as a “keyword”. + +interface: + A description of how to use a function, including the name and + descriptions of the arguments and return value. + +refactoring: + The process of modifying a working program to improve function + interfaces and other qualities of the code. + +development plan: + A process for writing programs. + +docstring: + A string that appears at the top of a function definition to + document the function’s interface. + +precondition: + A requirement that should be satisfied by the caller before a + function starts. + +postcondition: + A requirement that should be satisfied by the function before it + ends. + +Exercises +--------- + +Download the code in this chapter from +http://thinkpython2.com/code/polygon.py. + +#. Draw a stack diagram that shows the state of the program while + executing circle(bob, radius). You can do the arithmetic by hand or + add print statements to the code. + +#. The version of arc in Section [refactoring] is not very accurate + because the linear approximation of the circle is always outside the + true circle. As a result, the Turtle ends up a few pixels away from + the correct destination. My solution shows a way to reduce the effect + of this error. Read the code and see if it makes sense to you. If you + draw a diagram, you might see how it works. + +.. figure:: figs/flowers.pdf + :alt: Turtle flowers. + + Turtle flowers. + +Write an appropriately general set of functions that can draw flowers as +in Figure [fig.flowers]. + +Solution: http://thinkpython2.com/code/flower.py, also requires +http://thinkpython2.com/code/polygon.py. + +.. figure:: figs/pies.pdf + :alt: Turtle pies. + + Turtle pies. + +Write an appropriately general set of functions that can draw shapes as +in Figure [fig.pies]. + +Solution: http://thinkpython2.com/code/pie.py. + +The letters of the alphabet can be constructed from a moderate number of +basic elements, like vertical and horizontal lines and a few curves. +Design an alphabet that can be drawn with a minimal number of basic +elements and then write functions that draw the letters. + +You should write one function for each letter, with names ``draw_a``, +``draw_b``, etc., and put your functions in a file named letters.py. You +can download a “turtle typewriter” from +http://thinkpython2.com/code/typewriter.py to help you test your code. + +You can get a solution from http://thinkpython2.com/code/letters.py; it +also requires http://thinkpython2.com/code/polygon.py. + +Read about spirals at http://en.wikipedia.org/wiki/Spiral; then write a +program that draws an Archimedian spiral (or one of the other kinds). +Solution: http://thinkpython2.com/code/spiral.py. + +Conditionals and recursion +========================== + +The main topic of this chapter is the if statement, which executes +different code depending on the state of the program. But first I want +to introduce two new operators: floor division and modulus. + +Floor division and modulus +-------------------------- + +The **floor division** operator, ``//``, divides two numbers and rounds +down to an integer. For example, suppose the run time of a movie is 105 +minutes. You might want to know how long that is in hours. Conventional +division returns a floating-point number: + +:: + + >>> minutes = 105 + >>> minutes / 60 + 1.75 + +But we don’t normally write hours with decimal points. Floor division +returns the integer number of hours, dropping the fraction part: + +:: + + >>> minutes = 105 + >>> hours = minutes // 60 + >>> hours + 1 + +To get the remainder, you could subtract off one hour in minutes: + +:: + + >>> remainder = minutes - hours * 60 + >>> remainder + 45 + +An alternative is to use the **modulus operator**, ``%``, which divides +two numbers and returns the remainder. + +:: + + >>> remainder = minutes % 60 + >>> remainder + 45 + +The modulus operator is more useful than it seems. For example, you can +check whether one number is divisible by another—if x % y is zero, then +x is divisible by y. + +Also, you can extract the right-most digit or digits from a number. For +example, x % 10 yields the right-most digit of x (in base 10). Similarly +x % 100 yields the last two digits. + +If you are using Python 2, division works differently. The division +operator, ``/``, performs floor division if both operands are integers, +and floating-point division if either operand is a float. + +Boolean expressions +------------------- + +A **boolean expression** is an expression that is either true or false. +The following examples use the operator ==, which compares two operands +and produces True if they are equal and False otherwise: + +:: + + >>> 5 == 5 + True + >>> 5 == 6 + False + +True and False are special values that belong to the type bool; they are +not strings: + +:: + + >>> type(True) + + >>> type(False) + + +The == operator is one of the **relational operators**; the others are: + +:: + + x != y # x is not equal to y + x > y # x is greater than y + x < y # x is less than y + x >= y # x is greater than or equal to y + x <= y # x is less than or equal to y + +Although these operations are probably familiar to you, the Python +symbols are different from the mathematical symbols. A common error is +to use a single equal sign (=) instead of a double equal sign (==). +Remember that = is an assignment operator and == is a relational +operator. There is no such thing as =< or =>. + +Logical operators +----------------- + +There are three **logical operators**: and, or, and not. The semantics +(meaning) of these operators is similar to their meaning in English. For +example, x > 0 and x < 10 is true only if x is greater than 0 *and* less +than 10. + +n%2 == 0 or n%3 == 0 is true if *either or both* of the conditions is +true, that is, if the number is divisible by 2 *or* 3. + +Finally, the not operator negates a boolean expression, so not (x > y) +is true if x > y is false, that is, if x is less than or equal to y. + +Strictly speaking, the operands of the logical operators should be +boolean expressions, but Python is not very strict. Any nonzero number +is interpreted as True: + +:: + + >>> 42 and True + True + +This flexibility can be useful, but there are some subtleties to it that +might be confusing. You might want to avoid it (unless you know what you +are doing). + +Conditional execution +--------------------- + +In order to write useful programs, we almost always need the ability to +check conditions and change the behavior of the program accordingly. +**Conditional statements** give us this ability. The simplest form is +the if statement: + +:: + + if x > 0: + print('x is positive') + +The boolean expression after if is called the **condition**. If it is +true, the indented statement runs. If not, nothing happens. + +if statements have the same structure as function definitions: a header +followed by an indented body. Statements like this are called **compound +statements**. + +There is no limit on the number of statements that can appear in the +body, but there has to be at least one. Occasionally, it is useful to +have a body with no statements (usually as a place keeper for code you +haven’t written yet). In that case, you can use the pass statement, +which does nothing. + +:: + + if x < 0: + pass # TODO: need to handle negative values! + +Alternative execution +--------------------- + +A second form of the if statement is “alternative execution”, in which +there are two possibilities and the condition determines which one runs. +The syntax looks like this: + +:: + + if x % 2 == 0: + print('x is even') + else: + print('x is odd') + +If the remainder when x is divided by 2 is 0, then we know that x is +even, and the program displays an appropriate message. If the condition +is false, the second set of statements runs. Since the condition must be +true or false, exactly one of the alternatives will run. The +alternatives are called **branches**, because they are branches in the +flow of execution. + +Chained conditionals +-------------------- + +Sometimes there are more than two possibilities and we need more than +two branches. One way to express a computation like that is a **chained +conditional**: + +:: + + if x < y: + print('x is less than y') + elif x > y: + print('x is greater than y') + else: + print('x and y are equal') + +elif is an abbreviation of “else if”. Again, exactly one branch will +run. There is no limit on the number of elif statements. If there is an +else clause, it has to be at the end, but there doesn’t have to be one. + +:: + + if choice == 'a': + draw_a() + elif choice == 'b': + draw_b() + elif choice == 'c': + draw_c() + +Each condition is checked in order. If the first is false, the next is +checked, and so on. If one of them is true, the corresponding branch +runs and the statement ends. Even if more than one condition is true, +only the first true branch runs. + +Nested conditionals +------------------- + +One conditional can also be nested within another. We could have written +the example in the previous section like this: + +:: + + if x == y: + print('x and y are equal') + else: + if x < y: + print('x is less than y') + else: + print('x is greater than y') + +The outer conditional contains two branches. The first branch contains a +simple statement. The second branch contains another if statement, which +has two branches of its own. Those two branches are both simple +statements, although they could have been conditional statements as +well. + +Although the indentation of the statements makes the structure apparent, +**nested conditionals** become difficult to read very quickly. It is a +good idea to avoid them when you can. + +Logical operators often provide a way to simplify nested conditional +statements. For example, we can rewrite the following code using a +single conditional: + +:: + + if 0 < x: + if x < 10: + print('x is a positive single-digit number.') + +The print statement runs only if we make it past both conditionals, so +we can get the same effect with the and operator: + +:: + + if 0 < x and x < 10: + print('x is a positive single-digit number.') + +For this kind of condition, Python provides a more concise option: + +:: + + if 0 < x < 10: + print('x is a positive single-digit number.') + +Recursion +--------- + +It is legal for one function to call another; it is also legal for a +function to call itself. It may not be obvious why that is a good thing, +but it turns out to be one of the most magical things a program can do. +For example, look at the following function: + +:: + + def countdown(n): + if n <= 0: + print('Blastoff!') + else: + print(n) + countdown(n-1) + +If n is 0 or negative, it outputs the word, “Blastoff!” Otherwise, it +outputs n and then calls a function named countdown—itself—passing n-1 +as an argument. + +What happens if we call this function like this? + +:: + + >>> countdown(3) + +The execution of countdown begins with n=3, and since n is greater than +0, it outputs the value 3, and then calls itself... + + The execution of countdown begins with n=2, and since n is greater + than 0, it outputs the value 2, and then calls itself... + + The execution of countdown begins with n=1, and since n is + greater than 0, it outputs the value 1, and then calls itself... + + The execution of countdown begins with n=0, and since n is + not greater than 0, it outputs the word, “Blastoff!” and + then returns. + + The countdown that got n=1 returns. + + The countdown that got n=2 returns. + +The countdown that got n=3 returns. + +And then you’re back in ``__main__``. So, the total output looks like +this: + +:: + + 3 + 2 + 1 + Blastoff! + +A function that calls itself is **recursive**; the process of executing +it is called **recursion**. + +As another example, we can write a function that prints a string n +times. + +:: + + def print_n(s, n): + if n <= 0: + return + print(s) + print_n(s, n-1) + +If n <= 0 the **return statement** exits the function. The flow of +execution immediately returns to the caller, and the remaining lines of +the function don’t run. + +The rest of the function is similar to countdown: it displays s and then +calls itself to display s :math:`n-1` additional times. So the number of +lines of output is 1 + (n - 1), which adds up to n. + +For simple examples like this, it is probably easier to use a for loop. +But we will see examples later that are hard to write with a for loop +and easy to write with recursion, so it is good to start early. + +Stack diagrams for recursive functions +-------------------------------------- + +In Section [stackdiagram], we used a stack diagram to represent the +state of a program during a function call. The same kind of diagram can +help interpret a recursive function. + +Every time a function gets called, Python creates a frame to contain the +function’s local variables and parameters. For a recursive function, +there might be more than one frame on the stack at the same time. + +Figure [fig.stack2] shows a stack diagram for countdown called with n = +3. + +.. figure:: figs/stack2.pdf + :alt: Stack diagram. + + Stack diagram. + +As usual, the top of the stack is the frame for ``__main__``. It is +empty because we did not create any variables in ``__main__`` or pass +any arguments to it. + +The four countdown frames have different values for the parameter n. The +bottom of the stack, where n=0, is called the **base case**. It does not +make a recursive call, so there are no more frames. + +As an exercise, draw a stack diagram for ``print_n`` called with +``s = 'Hello'`` and n=2. Then write a function called ``do_n`` that +takes a function object and a number, n, as arguments, and that calls +the given function n times. + +Infinite recursion +------------------ + +If a recursion never reaches a base case, it goes on making recursive +calls forever, and the program never terminates. This is known as +**infinite recursion**, and it is generally not a good idea. Here is a +minimal program with an infinite recursion: + +:: + + def recurse(): + recurse() + +In most programming environments, a program with infinite recursion does +not really run forever. Python reports an error message when the maximum +recursion depth is reached: + +:: + + File "", line 2, in recurse + File "", line 2, in recurse + File "", line 2, in recurse + . + . + . + File "", line 2, in recurse + RuntimeError: Maximum recursion depth exceeded + +This traceback is a little bigger than the one we saw in the previous +chapter. When the error occurs, there are 1000 recurse frames on the +stack! + +If you write encounter an infinite recursion by accident, review your +function to confirm that there is a base case that does not make a +recursive call. And if there is a base case, check whether you are +guaranteed to reach it. + +Keyboard input +-------------- + +The programs we have written so far accept no input from the user. They +just do the same thing every time. + +Python provides a built-in function called input that stops the program +and waits for the user to type something. When the user presses Return +or Enter, the program resumes and ``input`` returns what the user typed +as a string. In Python 2, the same function is called ``raw_input``. + +:: + + >>> text = input() + What are you waiting for? + >>> text + What are you waiting for? + +Before getting input from the user, it is a good idea to print a prompt +telling the user what to type. ``input`` can take a prompt as an +argument: + +:: + + >>> name = input('What...is your name?\n') + What...is your name? + Arthur, King of the Britons! + >>> name + Arthur, King of the Britons! + +The sequence ``\n`` at the end of the prompt represents a **newline**, +which is a special character that causes a line break. That’s why the +user’s input appears below the prompt. + +If you expect the user to type an integer, you can try to convert the +return value to int: + +:: + + >>> prompt = 'What...is the airspeed velocity of an unladen swallow?\n' + >>> speed = input(prompt) + What...is the airspeed velocity of an unladen swallow? + 42 + >>> int(speed) + 42 + +But if the user types something other than a string of digits, you get +an error: + +:: + + >>> speed = input(prompt) + What...is the airspeed velocity of an unladen swallow? + What do you mean, an African or a European swallow? + >>> int(speed) + ValueError: invalid literal for int() with base 10 + +We will see how to handle this kind of error later. + +Debugging +--------- + +When a syntax or runtime error occurs, the error message contains a lot +of information, but it can be overwhelming. The most useful parts are +usually: + +- What kind of error it was, and + +- Where it occurred. + +Syntax errors are usually easy to find, but there are a few gotchas. +Whitespace errors can be tricky because spaces and tabs are invisible +and we are used to ignoring them. + +:: + + >>> x = 5 + >>> y = 6 + File "", line 1 + y = 6 + ^ + IndentationError: unexpected indent + +In this example, the problem is that the second line is indented by one +space. But the error message points to y, which is misleading. In +general, error messages indicate where the problem was discovered, but +the actual error might be earlier in the code, sometimes on a previous +line. + +The same is true of runtime errors. Suppose you are trying to compute a +signal-to-noise ratio in decibels. The formula is +:math:`SNR_{db} = 10 \log_{10} (P_{signal} / P_{noise})`. In Python, you +might write something like this: + +:: + + import math + signal_power = 9 + noise_power = 10 + ratio = signal_power // noise_power + decibels = 10 * math.log10(ratio) + print(decibels) + +When you run this program, you get an exception: + +:: + + Traceback (most recent call last): + File "snr.py", line 5, in ? + decibels = 10 * math.log10(ratio) + ValueError: math domain error + +The error message indicates line 5, but there is nothing wrong with that +line. To find the real error, it might be useful to print the value of +ratio, which turns out to be 0. The problem is in line 4, which uses +floor division instead of floating-point division. + +You should take the time to read error messages carefully, but don’t +assume that everything they say is correct. + +Glossary +-------- + +floor division: + An operator, denoted //, that divides two numbers and rounds down + (toward zero) to an integer. + +modulus operator: + An operator, denoted with a percent sign (%), that works on integers + and returns the remainder when one number is divided by another. + +boolean expression: + An expression whose value is either True or False. + +relational operator: + One of the operators that compares its operands: ==, !=, >, <, >=, + and <=. + +logical operator: + One of the operators that combines boolean expressions: and, or, and + not. + +conditional statement: + A statement that controls the flow of execution depending on some + condition. + +condition: + The boolean expression in a conditional statement that determines + which branch runs. + +compound statement: + A statement that consists of a header and a body. The header ends + with a colon (:). The body is indented relative to the header. + +branch: + One of the alternative sequences of statements in a conditional + statement. + +chained conditional: + A conditional statement with a series of alternative branches. + +nested conditional: + A conditional statement that appears in one of the branches of + another conditional statement. + +return statement: + A statement that causes a function to end immediately and return to + the caller. + +recursion: + The process of calling the function that is currently executing. + +base case: + A conditional branch in a recursive function that does not make a + recursive call. + +infinite recursion: + A recursion that doesn’t have a base case, or never reaches it. + Eventually, an infinite recursion causes a runtime error. + +Exercises +--------- + +The time module provides a function, also named time, that returns the +current Greenwich Mean Time in “the epoch”, which is an arbitrary time +used as a reference point. On UNIX systems, the epoch is 1 January 1970. + +:: + + >>> import time + >>> time.time() + 1437746094.5735958 + +Write a script that reads the current time and converts it to a time of +day in hours, minutes, and seconds, plus the number of days since the +epoch. + +Fermat’s Last Theorem says that there are no positive integers +:math:`a`, :math:`b`, and :math:`c` such that + +.. math:: a^n + b^n = c^n + +for any values of :math:`n` greater than 2. + +#. Write a function named ``check_fermat`` that takes four parameters—a, + b, c and n—and checks to see if Fermat’s theorem holds. If :math:`n` + is greater than 2 and + + .. math:: a^n + b^n = c^n + + the program should print, “Holy smokes, Fermat was wrong!” Otherwise + the program should print, “No, that doesn’t work.” + +#. Write a function that prompts the user to input values for a, b, c + and n, converts them to integers, and uses ``check_fermat`` to check + whether they violate Fermat’s theorem. + +If you are given three sticks, you may or may not be able to arrange +them in a triangle. For example, if one of the sticks is 12 inches long +and the other two are one inch long, you will not be able to get the +short sticks to meet in the middle. For any three lengths, there is a +simple test to see if it is possible to form a triangle: + + If any of the three lengths is greater than the sum of the other + two, then you cannot form a triangle. Otherwise, you can. (If the + sum of two lengths equals the third, they form what is called a + “degenerate” triangle.) + +#. Write a function named ``is_triangle`` that takes three integers as + arguments, and that prints either “Yes” or “No”, depending on whether + you can or cannot form a triangle from sticks with the given lengths. + +#. Write a function that prompts the user to input three stick lengths, + converts them to integers, and uses ``is_triangle`` to check whether + sticks with the given lengths can form a triangle. + +What is the output of the following program? Draw a stack diagram that +shows the state of the program when it prints the result. + +:: + + def recurse(n, s): + if n == 0: + print(s) + else: + recurse(n-1, n+s) + + recurse(3, 0) + +#. What would happen if you called this function like this: recurse(-1, + 0)? + +#. Write a docstring that explains everything someone would need to know + in order to use this function (and nothing else). + +The following exercises use the turtle module, described in +Chapter [turtlechap]: + +Read the following function and see if you can figure out what it does. +Then run it (see the examples in Chapter [turtlechap]). + +:: + + def draw(t, length, n): + if n == 0: + return + angle = 50 + t.fd(length*n) + t.lt(angle) + draw(t, length, n-1) + t.rt(2*angle) + draw(t, length, n-1) + t.lt(angle) + t.bk(length*n) + +.. figure:: figs/koch.pdf + :alt: A Koch curve. + + A Koch curve. + +The Koch curve is a fractal that looks something like Figure [fig.koch]. +To draw a Koch curve with length :math:`x`, all you have to do is + +#. Draw a Koch curve with length :math:`x/3`. + +#. Turn left 60 degrees. + +#. Draw a Koch curve with length :math:`x/3`. + +#. Turn right 120 degrees. + +#. Draw a Koch curve with length :math:`x/3`. + +#. Turn left 60 degrees. + +#. Draw a Koch curve with length :math:`x/3`. + +The exception is if :math:`x` is less than 3: in that case, you can just +draw a straight line with length :math:`x`. + +#. Write a function called koch that takes a turtle and a length as + parameters, and that uses the turtle to draw a Koch curve with the + given length. + +#. Write a function called snowflake that draws three Koch curves to + make the outline of a snowflake. + + Solution: http://thinkpython2.com/code/koch.py. + +#. The Koch curve can be generalized in several ways. See + http://en.wikipedia.org/wiki/Koch_snowflake for examples and + implement your favorite. + +Fruitful functions +================== + +Many of the Python functions we have used, such as the math functions, +produce return values. But the functions we’ve written are all void: +they have an effect, like printing a value or moving a turtle, but they +don’t have a return value. In this chapter you will learn to write +fruitful functions. + +Return values +------------- + +Calling the function generates a return value, which we usually assign +to a variable or use as part of an expression. + +:: + + e = math.exp(1.0) + height = radius * math.sin(radians) + +The functions we have written so far are void. Speaking casually, they +have no return value; more precisely, their return value is None. + +In this chapter, we are (finally) going to write fruitful functions. The +first example is area, which returns the area of a circle with the given +radius: + +:: + + def area(radius): + a = math.pi * radius**2 + return a + +We have seen the return statement before, but in a fruitful function the +return statement includes an expression. This statement means: “Return +immediately from this function and use the following expression as a +return value.” The expression can be arbitrarily complicated, so we +could have written this function more concisely: + +:: + + def area(radius): + return math.pi * radius**2 + +On the other hand, **temporary variables** like a can make debugging +easier. + +Sometimes it is useful to have multiple return statements, one in each +branch of a conditional: + +:: + + def absolute_value(x): + if x < 0: + return -x + else: + return x + +Since these return statements are in an alternative conditional, only +one runs. + +As soon as a return statement runs, the function terminates without +executing any subsequent statements. Code that appears after a return +statement, or any other place the flow of execution can never reach, is +called **dead code**. + +In a fruitful function, it is a good idea to ensure that every possible +path through the program hits a return statement. For example: + +:: + + def absolute_value(x): + if x < 0: + return -x + if x > 0: + return x + +This function is incorrect because if x happens to be 0, neither +condition is true, and the function ends without hitting a return +statement. If the flow of execution gets to the end of a function, the +return value is None, which is not the absolute value of 0. + +:: + + >>> absolute_value(0) + None + +By the way, Python provides a built-in function called abs that computes +absolute values. + +As an exercise, write a compare function takes two values, x and y, and +returns 1 if x > y, 0 if x == y, and -1 if x < y. + +Incremental development +----------------------- + +As you write larger functions, you might find yourself spending more +time debugging. + +To deal with increasingly complex programs, you might want to try a +process called **incremental development**. The goal of incremental +development is to avoid long debugging sessions by adding and testing +only a small amount of code at a time. + +As an example, suppose you want to find the distance between two points, +given by the coordinates :math:`(x_1, y_1)` and :math:`(x_2, y_2)`. By +the Pythagorean theorem, the distance is: + +.. math:: \mathrm{distance} = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} + +The first step is to consider what a distance function should look like +in Python. In other words, what are the inputs (parameters) and what is +the output (return value)? + +In this case, the inputs are two points, which you can represent using +four numbers. The return value is the distance represented by a +floating-point value. + +Immediately you can write an outline of the function: + +:: + + def distance(x1, y1, x2, y2): + return 0.0 + +Obviously, this version doesn’t compute distances; it always returns +zero. But it is syntactically correct, and it runs, which means that you +can test it before you make it more complicated. + +To test the new function, call it with sample arguments: + +:: + + >>> distance(1, 2, 4, 6) + 0.0 + +I chose these values so that the horizontal distance is 3 and the +vertical distance is 4; that way, the result is 5, the hypotenuse of a +3-4-5 triangle. When testing a function, it is useful to know the right +answer. + +At this point we have confirmed that the function is syntactically +correct, and we can start adding code to the body. A reasonable next +step is to find the differences :math:`x_2 - x_1` and :math:`y_2 - y_1`. +The next version stores those values in temporary variables and prints +them. + +:: + + def distance(x1, y1, x2, y2): + dx = x2 - x1 + dy = y2 - y1 + print('dx is', dx) + print('dy is', dy) + return 0.0 + +If the function is working, it should display ``dx is 3`` and +``dy is 4``. If so, we know that the function is getting the right +arguments and performing the first computation correctly. If not, there +are only a few lines to check. + +Next we compute the sum of squares of dx and dy: + +:: + + def distance(x1, y1, x2, y2): + dx = x2 - x1 + dy = y2 - y1 + dsquared = dx**2 + dy**2 + print('dsquared is: ', dsquared) + return 0.0 + +Again, you would run the program at this stage and check the output +(which should be 25). Finally, you can use math.sqrt to compute and +return the result: + +:: + + def distance(x1, y1, x2, y2): + dx = x2 - x1 + dy = y2 - y1 + dsquared = dx**2 + dy**2 + result = math.sqrt(dsquared) + return result + +If that works correctly, you are done. Otherwise, you might want to +print the value of result before the return statement. + +The final version of the function doesn’t display anything when it runs; +it only returns a value. The print statements we wrote are useful for +debugging, but once you get the function working, you should remove +them. Code like that is called **scaffolding** because it is helpful for +building the program but is not part of the final product. + +When you start out, you should add only a line or two of code at a time. +As you gain more experience, you might find yourself writing and +debugging bigger chunks. Either way, incremental development can save +you a lot of debugging time. + +The key aspects of the process are: + +#. Start with a working program and make small incremental changes. At + any point, if there is an error, you should have a good idea where it + is. + +#. Use variables to hold intermediate values so you can display and + check them. + +#. Once the program is working, you might want to remove some of the + scaffolding or consolidate multiple statements into compound + expressions, but only if it does not make the program difficult to + read. + +As an exercise, use incremental development to write a function called +hypotenuse that returns the length of the hypotenuse of a right triangle +given the lengths of the other two legs as arguments. Record each stage +of the development process as you go. + +Composition +----------- + +As you should expect by now, you can call one function from within +another. As an example, we’ll write a function that takes two points, +the center of the circle and a point on the perimeter, and computes the +area of the circle. + +Assume that the center point is stored in the variables xc and yc, and +the perimeter point is in xp and yp. The first step is to find the +radius of the circle, which is the distance between the two points. We +just wrote a function, distance, that does that: + +:: + + radius = distance(xc, yc, xp, yp) + +The next step is to find the area of a circle with that radius; we just +wrote that, too: + +:: + + result = area(radius) + +Encapsulating these steps in a function, we get: + +:: + + def circle_area(xc, yc, xp, yp): + radius = distance(xc, yc, xp, yp) + result = area(radius) + return result + +The temporary variables radius and result are useful for development and +debugging, but once the program is working, we can make it more concise +by composing the function calls: + +:: + + def circle_area(xc, yc, xp, yp): + return area(distance(xc, yc, xp, yp)) + +Boolean functions +----------------- + +Functions can return booleans, which is often convenient for hiding +complicated tests inside functions. For example: + +:: + + def is_divisible(x, y): + if x % y == 0: + return True + else: + return False + +It is common to give boolean functions names that sound like yes/no +questions; ``is_divisible`` returns either True or False to indicate +whether x is divisible by y. + +Here is an example: + +:: + + >>> is_divisible(6, 4) + False + >>> is_divisible(6, 3) + True + +The result of the == operator is a boolean, so we can write the function +more concisely by returning it directly: + +:: + + def is_divisible(x, y): + return x % y == 0 + +Boolean functions are often used in conditional statements: + +:: + + if is_divisible(x, y): + print('x is divisible by y') + +It might be tempting to write something like: + +:: + + if is_divisible(x, y) == True: + print('x is divisible by y' + +But the extra comparison is unnecessary. + +As an exercise, write a function ``is_between(x, y, z)`` that returns +True if :math:`x \le y \le z` or False otherwise. + +More recursion +-------------- + +We have only covered a small subset of Python, but you might be +interested to know that this subset is a *complete* programming +language, which means that anything that can be computed can be +expressed in this language. Any program ever written could be rewritten +using only the language features you have learned so far (actually, you +would need a few commands to control devices like the mouse, disks, +etc., but that’s all). + +Proving that claim is a nontrivial exercise first accomplished by Alan +Turing, one of the first computer scientists (some would argue that he +was a mathematician, but a lot of early computer scientists started as +mathematicians). Accordingly, it is known as the Turing Thesis. For a +more complete (and accurate) discussion of the Turing Thesis, I +recommend Michael Sipser’s book *Introduction to the Theory of +Computation*. + +To give you an idea of what you can do with the tools you have learned +so far, we’ll evaluate a few recursively defined mathematical functions. +A recursive definition is similar to a circular definition, in the sense +that the definition contains a reference to the thing being defined. A +truly circular definition is not very useful: + +vorpal: + An adjective used to describe something that is vorpal. + +If you saw that definition in the dictionary, you might be annoyed. On +the other hand, if you looked up the definition of the factorial +function, denoted with the symbol :math:`!`, you might get something +like this: + +.. math:: + + \begin{aligned} + && 0! = 1 \\ + && n! = n (n-1)!\end{aligned} + +This definition says that the factorial of 0 is 1, and the factorial of +any other value, :math:`n`, is :math:`n` multiplied by the factorial of +:math:`n-1`. + +So :math:`3!` is 3 times :math:`2!`, which is 2 times :math:`1!`, which +is 1 times :math:`0!`. Putting it all together, :math:`3!` equals 3 +times 2 times 1 times 1, which is 6. + +If you can write a recursive definition of something, you can write a +Python program to evaluate it. The first step is to decide what the +parameters should be. In this case it should be clear that factorial +takes an integer: + +:: + + def factorial(n): + +If the argument happens to be 0, all we have to do is return 1: + +:: + + def factorial(n): + if n == 0: + return 1 + +Otherwise, and this is the interesting part, we have to make a recursive +call to find the factorial of :math:`n-1` and then multiply it by +:math:`n`: + +:: + + def factorial(n): + if n == 0: + return 1 + else: + recurse = factorial(n-1) + result = n * recurse + return result + +The flow of execution for this program is similar to the flow of +countdown in Section [recursion]. If we call factorial with the value 3: + +Since 3 is not 0, we take the second branch and calculate the factorial +of n-1... + + Since 2 is not 0, we take the second branch and calculate the + factorial of n-1... + + Since 1 is not 0, we take the second branch and calculate the + factorial of n-1... + + Since 0 equals 0, we take the first branch and return 1 + without making any more recursive calls. + + The return value, 1, is multiplied by :math:`n`, which is 1, and + the result is returned. + + The return value, 1, is multiplied by :math:`n`, which is 2, and the + result is returned. + +The return value (2) is multiplied by :math:`n`, which is 3, and the +result, 6, becomes the return value of the function call that started +the whole process. + +Figure [fig.stack3] shows what the stack diagram looks like for this +sequence of function calls. + +.. figure:: figs/stack3.pdf + :alt: Stack diagram. + + Stack diagram. + +The return values are shown being passed back up the stack. In each +frame, the return value is the value of result, which is the product of +n and recurse. + +In the last frame, the local variables recurse and result do not exist, +because the branch that creates them does not run. + +Leap of faith +------------- + +Following the flow of execution is one way to read programs, but it can +quickly become overwhelming. An alternative is what I call the “leap of +faith”. When you come to a function call, instead of following the flow +of execution, you *assume* that the function works correctly and returns +the right result. + +In fact, you are already practicing this leap of faith when you use +built-in functions. When you call math.cos or math.exp, you don’t +examine the bodies of those functions. You just assume that they work +because the people who wrote the built-in functions were good +programmers. + +The same is true when you call one of your own functions. For example, +in Section [boolean], we wrote a function called ``is_divisible`` that +determines whether one number is divisible by another. Once we have +convinced ourselves that this function is correct—by examining the code +and testing—we can use the function without looking at the body again. + +The same is true of recursive programs. When you get to the recursive +call, instead of following the flow of execution, you should assume that +the recursive call works (returns the correct result) and then ask +yourself, “Assuming that I can find the factorial of :math:`n-1`, can I +compute the factorial of :math:`n`?” It is clear that you can, by +multiplying by :math:`n`. + +Of course, it’s a bit strange to assume that the function works +correctly when you haven’t finished writing it, but that’s why it’s +called a leap of faith! + +One more example +---------------- + +After factorial, the most common example of a recursively defined +mathematical function is fibonacci, which has the following definition +(see http://en.wikipedia.org/wiki/Fibonacci_number): + +.. math:: + + \begin{aligned} + && \mathrm{fibonacci}(0) = 0 \\ + && \mathrm{fibonacci}(1) = 1 \\ + && \mathrm{fibonacci}(n) = \mathrm{fibonacci}(n-1) + \mathrm{fibonacci}(n-2)\end{aligned} + +Translated into Python, it looks like this: + +:: + + def fibonacci (n): + if n == 0: + return 0 + elif n == 1: + return 1 + else: + return fibonacci(n-1) + fibonacci(n-2) + +If you try to follow the flow of execution here, even for fairly small +values of :math:`n`, your head explodes. But according to the leap of +faith, if you assume that the two recursive calls work correctly, then +it is clear that you get the right result by adding them together. + +Checking types +-------------- + +What happens if we call factorial and give it 1.5 as an argument? + +:: + + >>> factorial(1.5) + RuntimeError: Maximum recursion depth exceeded + +It looks like an infinite recursion. How can that be? The function has a +base case—when n == 0. But if n is not an integer, we can *miss* the +base case and recurse forever. + +In the first recursive call, the value of n is 0.5. In the next, it is +-0.5. From there, it gets smaller (more negative), but it will never be +0. + +We have two choices. We can try to generalize the factorial function to +work with floating-point numbers, or we can make factorial check the +type of its argument. The first option is called the gamma function and +it’s a little beyond the scope of this book. So we’ll go for the second. + +We can use the built-in function isinstance to verify the type of the +argument. While we’re at it, we can also make sure the argument is +positive: + +:: + + def factorial (n): + if not isinstance(n, int): + print('Factorial is only defined for integers.') + return None + elif n < 0: + print('Factorial is not defined for negative integers.') + return None + elif n == 0: + return 1 + else: + return n * factorial(n-1) + +The first base case handles nonintegers; the second handles negative +integers. In both cases, the program prints an error message and returns +None to indicate that something went wrong: + +:: + + >>> factorial('fred') + Factorial is only defined for integers. + None + >>> factorial(-2) + Factorial is not defined for negative integers. + None + +If we get past both checks, we know that :math:`n` is positive or zero, +so we can prove that the recursion terminates. + +This program demonstrates a pattern sometimes called a **guardian**. The +first two conditionals act as guardians, protecting the code that +follows from values that might cause an error. The guardians make it +possible to prove the correctness of the code. + +In Section [raise] we will see a more flexible alternative to printing +an error message: raising an exception. + +Debugging +--------- + +Breaking a large program into smaller functions creates natural +checkpoints for debugging. If a function is not working, there are three +possibilities to consider: + +- There is something wrong with the arguments the function is getting; + a precondition is violated. + +- There is something wrong with the function; a postcondition is + violated. + +- There is something wrong with the return value or the way it is being + used. + +To rule out the first possibility, you can add a print statement at the +beginning of the function and display the values of the parameters (and +maybe their types). Or you can write code that checks the preconditions +explicitly. + +If the parameters look good, add a print statement before each return +statement and display the return value. If possible, check the result by +hand. Consider calling the function with values that make it easy to +check the result (as in Section [incremental.development]). + +If the function seems to be working, look at the function call to make +sure the return value is being used correctly (or used at all!). + +Adding print statements at the beginning and end of a function can help +make the flow of execution more visible. For example, here is a version +of factorial with print statements: + +:: + + def factorial(n): + space = ' ' * (4 * n) + print(space, 'factorial', n) + if n == 0: + print(space, 'returning 1') + return 1 + else: + recurse = factorial(n-1) + result = n * recurse + print(space, 'returning', result) + return result + +space is a string of space characters that controls the indentation of +the output. Here is the result of factorial(4) : + +:: + + factorial 4 + factorial 3 + factorial 2 + factorial 1 + factorial 0 + returning 1 + returning 1 + returning 2 + returning 6 + returning 24 + +If you are confused about the flow of execution, this kind of output can +be helpful. It takes some time to develop effective scaffolding, but a +little bit of scaffolding can save a lot of debugging. + +Glossary +-------- + +temporary variable: + A variable used to store an intermediate value in a complex + calculation. + +dead code: + Part of a program that can never run, often because it appears after + a return statement. + +incremental development: + A program development plan intended to avoid debugging by adding and + testing only a small amount of code at a time. + +scaffolding: + Code that is used during program development but is not part of the + final version. + +guardian: + A programming pattern that uses a conditional statement to check for + and handle circumstances that might cause an error. + +Exercises +--------- + +Draw a stack diagram for the following program. What does the program +print? + +:: + + def b(z): + prod = a(z, z) + print(z, prod) + return prod + + def a(x, y): + x = x + 1 + return x * y + + def c(x, y, z): + total = x + y + z + square = b(total)**2 + return square + + x = 1 + y = x + 1 + print(c(x, y+3, x+y)) + +[ackermann] + +The Ackermann function, :math:`A(m, n)`, is defined: + +.. math:: + + \begin{aligned} + A(m, n) = \begin{cases} + n+1 & \mbox{if } m = 0 \\ + A(m-1, 1) & \mbox{if } m > 0 \mbox{ and } n = 0 \\ + A(m-1, A(m, n-1)) & \mbox{if } m > 0 \mbox{ and } n > 0. + \end{cases} \end{aligned} + +See http://en.wikipedia.org/wiki/Ackermann_function. Write a function +named ack that evaluates the Ackermann function. Use your function to +evaluate ack(3, 4), which should be 125. What happens for larger values +of m and n? Solution: http://thinkpython2.com/code/ackermann.py. + +[palindrome] + +A palindrome is a word that is spelled the same backward and forward, +like “noon” and “redivider”. Recursively, a word is a palindrome if the +first and last letters are the same and the middle is a palindrome. + +The following are functions that take a string argument and return the +first, last, and middle letters: + +:: + + def first(word): + return word[0] + + def last(word): + return word[-1] + + def middle(word): + return word[1:-1] + +We’ll see how they work in Chapter [strings]. + +#. Type these functions into a file named palindrome.py and test them + out. What happens if you call middle with a string with two letters? + One letter? What about the empty string, which is written ``''`` and + contains no letters? + +#. Write a function called ``is_palindrome`` that takes a string + argument and returns True if it is a palindrome and False otherwise. + Remember that you can use the built-in function len to check the + length of a string. + +Solution: http://thinkpython2.com/code/palindrome_soln.py. + +A number, :math:`a`, is a power of :math:`b` if it is divisible by +:math:`b` and :math:`a/b` is a power of :math:`b`. Write a function +called ``is_power`` that takes parameters a and b and returns True if a +is a power of b. Note: you will have to think about the base case. + +The greatest common divisor (GCD) of :math:`a` and :math:`b` is the +largest number that divides both of them with no remainder. + +One way to find the GCD of two numbers is based on the observation that +if :math:`r` is the remainder when :math:`a` is divided by :math:`b`, +then :math:`gcd(a, +b) = gcd(b, r)`. As a base case, we can use :math:`gcd(a, 0) = a`. + +Write a function called ``gcd`` that takes parameters a and b and +returns their greatest common divisor. + +Credit: This exercise is based on an example from Abelson and Sussman’s +*Structure and Interpretation of Computer Programs*. + +Iteration +========= + +This chapter is about iteration, which is the ability to run a block of +statements repeatedly. We saw a kind of iteration, using recursion, in +Section [recursion]. We saw another kind, using a for loop, in +Section [repetition]. In this chapter we’ll see yet another kind, using +a while statement. But first I want to say a little more about variable +assignment. + +Reassignment +------------ + +As you may have discovered, it is legal to make more than one assignment +to the same variable. A new assignment makes an existing variable refer +to a new value (and stop referring to the old value). + +:: + + >>> x = 5 + >>> x + 5 + >>> x = 7 + >>> x + 7 + +The first time we display x, its value is 5; the second time, its value +is 7. + +Figure [fig.assign2] shows what **reassignment** looks like in a state +diagram. + +At this point I want to address a common source of confusion. Because +Python uses the equal sign (=) for assignment, it is tempting to +interpret a statement like a = b as a mathematical proposition of +equality; that is, the claim that a and b are equal. But this +interpretation is wrong. + +First, equality is a symmetric relationship and assignment is not. For +example, in mathematics, if :math:`a=7` then :math:`7=a`. But in Python, +the statement a = 7 is legal and 7 = a is not. + +Also, in mathematics, a proposition of equality is either true or false +for all time. If :math:`a=b` now, then :math:`a` will always equal +:math:`b`. In Python, an assignment statement can make two variables +equal, but they don’t have to stay that way: + +:: + + >>> a = 5 + >>> b = a # a and b are now equal + >>> a = 3 # a and b are no longer equal + >>> b + 5 + +The third line changes the value of a but does not change the value of +b, so they are no longer equal. + +Reassigning variables is often useful, but you should use it with +caution. If the values of variables change frequently, it can make the +code difficult to read and debug. + +.. figure:: figs/assign2.pdf + :alt: State diagram. + + State diagram. + +Updating variables +------------------ + +A common kind of reassignment is an **update**, where the new value of +the variable depends on the old. + +:: + + >>> x = x + 1 + +This means “get the current value of x, add one, and then update x with +the new value.” + +If you try to update a variable that doesn’t exist, you get an error, +because Python evaluates the right side before it assigns a value to x: + +:: + + >>> x = x + 1 + NameError: name 'x' is not defined + +Before you can update a variable, you have to **initialize** it, usually +with a simple assignment: + +:: + + >>> x = 0 + >>> x = x + 1 + +Updating a variable by adding 1 is called an **increment**; subtracting +1 is called a **decrement**. + +The while statement +------------------- + +Computers are often used to automate repetitive tasks. Repeating +identical or similar tasks without making errors is something that +computers do well and people do poorly. In a computer program, +repetition is also called **iteration**. + +We have already seen two functions, countdown and ``print_n``, that +iterate using recursion. Because iteration is so common, Python provides +language features to make it easier. One is the for statement we saw in +Section [repetition]. We’ll get back to that later. + +Another is the while statement. Here is a version of countdown that uses +a while statement: + +:: + + def countdown(n): + while n > 0: + print(n) + n = n - 1 + print('Blastoff!') + +You can almost read the while statement as if it were English. It means, +“While n is greater than 0, display the value of n and then decrement n. +When you get to 0, display the word Blastoff!” + +More formally, here is the flow of execution for a while statement: + +#. Determine whether the condition is true or false. + +#. If false, exit the while statement and continue execution at the next + statement. + +#. If the condition is true, run the body and then go back to step 1. + +This type of flow is called a loop because the third step loops back +around to the top. + +The body of the loop should change the value of one or more variables so +that the condition becomes false eventually and the loop terminates. +Otherwise the loop will repeat forever, which is called an **infinite +loop**. An endless source of amusement for computer scientists is the +observation that the directions on shampoo, “Lather, rinse, repeat”, are +an infinite loop. + +In the case of countdown, we can prove that the loop terminates: if n is +zero or negative, the loop never runs. Otherwise, n gets smaller each +time through the loop, so eventually we have to get to 0. + +For some other loops, it is not so easy to tell. For example: + +:: + + def sequence(n): + while n != 1: + print(n) + if n % 2 == 0: # n is even + n = n / 2 + else: # n is odd + n = n*3 + 1 + +The condition for this loop is n != 1, so the loop will continue until n +is 1, which makes the condition false. + +Each time through the loop, the program outputs the value of n and then +checks whether it is even or odd. If it is even, n is divided by 2. If +it is odd, the value of n is replaced with n\*3 + 1. For example, if the +argument passed to sequence is 3, the resulting values of n are 3, 10, +5, 16, 8, 4, 2, 1. + +Since n sometimes increases and sometimes decreases, there is no obvious +proof that n will ever reach 1, or that the program terminates. For some +particular values of n, we can prove termination. For example, if the +starting value is a power of two, n will be even every time through the +loop until it reaches 1. The previous example ends with such a sequence, +starting with 16. + +The hard question is whether we can prove that this program terminates +for *all* positive values of n. So far, no one has been able to prove it +*or* disprove it! (See http://en.wikipedia.org/wiki/Collatz_conjecture.) + +As an exercise, rewrite the function ``print_n`` from +Section [recursion] using iteration instead of recursion. + +break +----- + +Sometimes you don’t know it’s time to end a loop until you get half way +through the body. In that case you can use the break statement to jump +out of the loop. + +For example, suppose you want to take input from the user until they +type done. You could write: + +:: + + while True: + line = input('> ') + if line == 'done': + break + print(line) + + print('Done!') + +The loop condition is True, which is always true, so the loop runs until +it hits the break statement. + +Each time through, it prompts the user with an angle bracket. If the +user types done, the break statement exits the loop. Otherwise the +program echoes whatever the user types and goes back to the top of the +loop. Here’s a sample run: + +:: + + > not done + not done + > done + Done! + +This way of writing while loops is common because you can check the +condition anywhere in the loop (not just at the top) and you can express +the stop condition affirmatively (“stop when this happens”) rather than +negatively (“keep going until that happens”). + +Square roots +------------ + +Loops are often used in programs that compute numerical results by +starting with an approximate answer and iteratively improving it. + +For example, one way of computing square roots is Newton’s method. +Suppose that you want to know the square root of :math:`a`. If you start +with almost any estimate, :math:`x`, you can compute a better estimate +with the following formula: + +.. math:: y = \frac{x + a/x}{2} + +For example, if :math:`a` is 4 and :math:`x` is 3: + +:: + + >>> a = 4 + >>> x = 3 + >>> y = (x + a/x) / 2 + >>> y + 2.16666666667 + +The result is closer to the correct answer (:math:`\sqrt{4} = 2`). If we +repeat the process with the new estimate, it gets even closer: + +:: + + >>> x = y + >>> y = (x + a/x) / 2 + >>> y + 2.00641025641 + +After a few more updates, the estimate is almost exact: + +:: + + >>> x = y + >>> y = (x + a/x) / 2 + >>> y + 2.00001024003 + >>> x = y + >>> y = (x + a/x) / 2 + >>> y + 2.00000000003 + +In general we don’t know ahead of time how many steps it takes to get to +the right answer, but we know when we get there because the estimate +stops changing: + +:: + + >>> x = y + >>> y = (x + a/x) / 2 + >>> y + 2.0 + >>> x = y + >>> y = (x + a/x) / 2 + >>> y + 2.0 + +When y == x, we can stop. Here is a loop that starts with an initial +estimate, x, and improves it until it stops changing: + +:: + + while True: + print(x) + y = (x + a/x) / 2 + if y == x: + break + x = y + +For most values of a this works fine, but in general it is dangerous to +test float equality. Floating-point values are only approximately right: +most rational numbers, like :math:`1/3`, and irrational numbers, like +:math:`\sqrt{2}`, can’t be represented exactly with a float. + +Rather than checking whether x and y are exactly equal, it is safer to +use the built-in function abs to compute the absolute value, or +magnitude, of the difference between them: + +:: + + if abs(y-x) < epsilon: + break + +Where ``epsilon`` has a value like 0.0000001 that determines how close +is close enough. + +Algorithms +---------- + +Newton’s method is an example of an **algorithm**: it is a mechanical +process for solving a category of problems (in this case, computing +square roots). + +To understand what an algorithm is, it might help to start with +something that is not an algorithm. When you learned to multiply +single-digit numbers, you probably memorized the multiplication table. +In effect, you memorized 100 specific solutions. That kind of knowledge +is not algorithmic. + +But if you were “lazy”, you might have learned a few tricks. For +example, to find the product of :math:`n` and 9, you can write +:math:`n-1` as the first digit and :math:`10-n` as the second digit. +This trick is a general solution for multiplying any single-digit number +by 9. That’s an algorithm! + +Similarly, the techniques you learned for addition with carrying, +subtraction with borrowing, and long division are all algorithms. One of +the characteristics of algorithms is that they do not require any +intelligence to carry out. They are mechanical processes where each step +follows from the last according to a simple set of rules. + +Executing algorithms is boring, but designing them is interesting, +intellectually challenging, and a central part of computer science. + +Some of the things that people do naturally, without difficulty or +conscious thought, are the hardest to express algorithmically. +Understanding natural language is a good example. We all do it, but so +far no one has been able to explain *how* we do it, at least not in the +form of an algorithm. + +Debugging +--------- + +As you start writing bigger programs, you might find yourself spending +more time debugging. More code means more chances to make an error and +more places for bugs to hide. + +One way to cut your debugging time is “debugging by bisection”. For +example, if there are 100 lines in your program and you check them one +at a time, it would take 100 steps. + +Instead, try to break the problem in half. Look at the middle of the +program, or near it, for an intermediate value you can check. Add a +print statement (or something else that has a verifiable effect) and run +the program. + +If the mid-point check is incorrect, there must be a problem in the +first half of the program. If it is correct, the problem is in the +second half. + +Every time you perform a check like this, you halve the number of lines +you have to search. After six steps (which is fewer than 100), you would +be down to one or two lines of code, at least in theory. + +In practice it is not always clear what the “middle of the program” is +and not always possible to check it. It doesn’t make sense to count +lines and find the exact midpoint. Instead, think about places in the +program where there might be errors and places where it is easy to put a +check. Then choose a spot where you think the chances are about the same +that the bug is before or after the check. + +Glossary +-------- + +reassignment: + Assigning a new value to a variable that already exists. + +update: + An assignment where the new value of the variable depends on the + old. + +initialization: + An assignment that gives an initial value to a variable that will be + updated. + +increment: + An update that increases the value of a variable (often by one). + +decrement: + An update that decreases the value of a variable. + +iteration: + Repeated execution of a set of statements using either a recursive + function call or a loop. + +infinite loop: + A loop in which the terminating condition is never satisfied. + +algorithm: + A general process for solving a category of problems. + +Exercises +--------- + +Copy the loop from Section [squareroot] and encapsulate it in a function +called ``mysqrt`` that takes a as a parameter, chooses a reasonable +value of x, and returns an estimate of the square root of a. + +To test it, write a function named ``test_square_root`` that prints a +table like this: + +:: + + a mysqrt(a) math.sqrt(a) diff + - --------- ------------ ---- + 1.0 1.0 1.0 0.0 + 2.0 1.41421356237 1.41421356237 2.22044604925e-16 + 3.0 1.73205080757 1.73205080757 0.0 + 4.0 2.0 2.0 0.0 + 5.0 2.2360679775 2.2360679775 0.0 + 6.0 2.44948974278 2.44948974278 0.0 + 7.0 2.64575131106 2.64575131106 0.0 + 8.0 2.82842712475 2.82842712475 4.4408920985e-16 + 9.0 3.0 3.0 0.0 + +The first column is a number, :math:`a`; the second column is the square +root of :math:`a` computed with ``mysqrt``; the third column is the +square root computed by math.sqrt; the fourth column is the absolute +value of the difference between the two estimates. + +The built-in function eval takes a string and evaluates it using the +Python interpreter. For example: + +:: + + >>> eval('1 + 2 * 3') + 7 + >>> import math + >>> eval('math.sqrt(5)') + 2.2360679774997898 + >>> eval('type(math.pi)') + + +Write a function called ``eval_loop`` that iteratively prompts the user, +takes the resulting input and evaluates it using eval, and prints the +result. + +It should continue until the user enters ``'done'``, and then return the +value of the last expression it evaluated. + +The mathematician Srinivasa Ramanujan found an infinite series that can +be used to generate a numerical approximation of :math:`1 / \pi`: + +.. math:: + + \frac{1}{\pi} = \frac{2\sqrt{2}}{9801} + \sum^\infty_{k=0} \frac{(4k)!(1103+26390k)}{(k!)^4 396^{4k}} + +Write a function called ``estimate_pi`` that uses this formula to +compute and return an estimate of :math:`\pi`. It should use a while +loop to compute terms of the summation until the last term is smaller +than 1e-15 (which is Python notation for :math:`10^{-15}`). You can +check the result by comparing it to math.pi. + +Solution: http://thinkpython2.com/code/pi.py. + +Strings +======= + +Strings are not like integers, floats, and booleans. A string is a +**sequence**, which means it is an ordered collection of other values. +In this chapter you’ll see how to access the characters that make up a +string, and you’ll learn about some of the methods strings provide. + +A string is a sequence +---------------------- + +A string is a sequence of characters. You can access the characters one +at a time with the bracket operator: + +:: + + >>> fruit = 'banana' + >>> letter = fruit[1] + +The second statement selects character number 1 from fruit and assigns +it to letter. + +The expression in brackets is called an **index**. The index indicates +which character in the sequence you want (hence the name). + +But you might not get what you expect: + +:: + + >>> letter + 'a' + +For most people, the first letter of ``'banana'`` is b, not a. But for +computer scientists, the index is an offset from the beginning of the +string, and the offset of the first letter is zero. + +:: + + >>> letter = fruit[0] + >>> letter + 'b' + +So b is the 0th letter (“zero-eth”) of ``'banana'``, a is the 1th letter +(“one-eth”), and n is the 2th letter (“two-eth”). + +As an index you can use an expression that contains variables and +operators: + +:: + + >>> i = 1 + >>> fruit[i] + 'a' + >>> fruit[i+1] + 'n' + +But the value of the index has to be an integer. Otherwise you get: + +:: + + >>> letter = fruit[1.5] + TypeError: string indices must be integers + +len +--- + +len is a built-in function that returns the number of characters in a +string: + +:: + + >>> fruit = 'banana' + >>> len(fruit) + 6 + +To get the last letter of a string, you might be tempted to try +something like this: + +:: + + >>> length = len(fruit) + >>> last = fruit[length] + IndexError: string index out of range + +The reason for the IndexError is that there is no letter in ’banana’ +with the index 6. Since we started counting at zero, the six letters are +numbered 0 to 5. To get the last character, you have to subtract 1 from +length: + +:: + + >>> last = fruit[length-1] + >>> last + 'a' + +Or you can use negative indices, which count backward from the end of +the string. The expression fruit[-1] yields the last letter, fruit[-2] +yields the second to last, and so on. + +Traversal with a for loop +------------------------- + +A lot of computations involve processing a string one character at a +time. Often they start at the beginning, select each character in turn, +do something to it, and continue until the end. This pattern of +processing is called a **traversal**. One way to write a traversal is +with a while loop: + +:: + + index = 0 + while index < len(fruit): + letter = fruit[index] + print(letter) + index = index + 1 + +This loop traverses the string and displays each letter on a line by +itself. The loop condition is index < len(fruit), so when index is equal +to the length of the string, the condition is false, and the body of the +loop doesn’t run. The last character accessed is the one with the index +len(fruit)-1, which is the last character in the string. + +As an exercise, write a function that takes a string as an argument and +displays the letters backward, one per line. + +Another way to write a traversal is with a for loop: + +:: + + for letter in fruit: + print(letter) + +Each time through the loop, the next character in the string is assigned +to the variable letter. The loop continues until no characters are left. + +The following example shows how to use concatenation (string addition) +and a for loop to generate an abecedarian series (that is, in +alphabetical order). In Robert McCloskey’s book *Make Way for +Ducklings*, the names of the ducklings are Jack, Kack, Lack, Mack, Nack, +Ouack, Pack, and Quack. This loop outputs these names in order: + +:: + + prefixes = 'JKLMNOPQ' + suffix = 'ack' + + for letter in prefixes: + print(letter + suffix) + +The output is: + +:: + + Jack + Kack + Lack + Mack + Nack + Oack + Pack + Qack + +Of course, that’s not quite right because “Ouack” and “Quack” are +misspelled. As an exercise, modify the program to fix this error. + +String slices +------------- + +A segment of a string is called a **slice**. Selecting a slice is +similar to selecting a character: + +:: + + >>> s = 'Monty Python' + >>> s[0:5] + 'Monty' + >>> s[6:12] + 'Python' + +The operator returns the part of the string from the “n-eth” character +to the “m-eth” character, including the first but excluding the last. +This behavior is counterintuitive, but it might help to imagine the +indices pointing *between* the characters, as in Figure [fig.banana]. + +.. figure:: figs/banana.pdf + :alt: Slice indices. + + Slice indices. + +If you omit the first index (before the colon), the slice starts at the +beginning of the string. If you omit the second index, the slice goes to +the end of the string: + +:: + + >>> fruit = 'banana' + >>> fruit[:3] + 'ban' + >>> fruit[3:] + 'ana' + +If the first index is greater than or equal to the second the result is +an **empty string**, represented by two quotation marks: + +:: + + >>> fruit = 'banana' + >>> fruit[3:3] + '' + +An empty string contains no characters and has length 0, but other than +that, it is the same as any other string. + +Continuing this example, what do you think fruit[:] means? Try it and +see. + +Strings are immutable +--------------------- + +It is tempting to use the operator on the left side of an assignment, +with the intention of changing a character in a string. For example: + +:: + + >>> greeting = 'Hello, world!' + >>> greeting[0] = 'J' + TypeError: 'str' object does not support item assignment + +The “object” in this case is the string and the “item” is the character +you tried to assign. For now, an object is the same thing as a value, +but we will refine that definition later (Section [equivalence]). + +The reason for the error is that strings are **immutable**, which means +you can’t change an existing string. The best you can do is create a new +string that is a variation on the original: + +:: + + >>> greeting = 'Hello, world!' + >>> new_greeting = 'J' + greeting[1:] + >>> new_greeting + 'Jello, world!' + +This example concatenates a new first letter onto a slice of greeting. +It has no effect on the original string. + +Searching +--------- + +What does the following function do? + +:: + + def find(word, letter): + index = 0 + while index < len(word): + if word[index] == letter: + return index + index = index + 1 + return -1 + +In a sense, find is the inverse of the operator. Instead of taking an +index and extracting the corresponding character, it takes a character +and finds the index where that character appears. If the character is +not found, the function returns -1. + +This is the first example we have seen of a return statement inside a +loop. If word[index] == letter, the function breaks out of the loop and +returns immediately. + +If the character doesn’t appear in the string, the program exits the +loop normally and returns -1. + +This pattern of computation—traversing a sequence and returning when we +find what we are looking for—is called a **search**. + +As an exercise, modify find so that it has a third parameter, the index +in word where it should start looking. + +Looping and counting +-------------------- + +The following program counts the number of times the letter a appears in +a string: + +:: + + word = 'banana' + count = 0 + for letter in word: + if letter == 'a': + count = count + 1 + print(count) + +This program demonstrates another pattern of computation called a +**counter**. The variable count is initialized to 0 and then incremented +each time an a is found. When the loop exits, count contains the +result—the total number of a’s. + +As an exercise, encapsulate this code in a function named count, and +generalize it so that it accepts the string and the letter as arguments. + +Then rewrite the function so that instead of traversing the string, it +uses the three-parameter version of find from the previous section. + +String methods +-------------- + +Strings provide methods that perform a variety of useful operations. A +method is similar to a function—it takes arguments and returns a +value—but the syntax is different. For example, the method upper takes a +string and returns a new string with all uppercase letters. + +Instead of the function syntax upper(word), it uses the method syntax +word.upper(). + +:: + + >>> word = 'banana' + >>> new_word = word.upper() + >>> new_word + 'BANANA' + +This form of dot notation specifies the name of the method, upper, and +the name of the string to apply the method to, word. The empty +parentheses indicate that this method takes no arguments. + +A method call is called an **invocation**; in this case, we would say +that we are invoking upper on word. + +As it turns out, there is a string method named find that is remarkably +similar to the function we wrote: + +:: + + >>> word = 'banana' + >>> index = word.find('a') + >>> index + 1 + +In this example, we invoke find on word and pass the letter we are +looking for as a parameter. + +Actually, the find method is more general than our function; it can find +substrings, not just characters: + +:: + + >>> word.find('na') + 2 + +By default, find starts at the beginning of the string, but it can take +a second argument, the index where it should start: + +:: + + >>> word.find('na', 3) + 4 + +This is an example of an **optional argument**; find can also take a +third argument, the index where it should stop: + +:: + + >>> name = 'bob' + >>> name.find('b', 1, 2) + -1 + +This search fails because b does not appear in the index range from 1 to +2, not including 2. Searching up to, but not including, the second index +makes find consistent with the slice operator. + +The in operator +--------------- + +The word in is a boolean operator that takes two strings and returns +True if the first appears as a substring in the second: + +:: + + >>> 'a' in 'banana' + True + >>> 'seed' in 'banana' + False + +For example, the following function prints all the letters from word1 +that also appear in word2: + +:: + + def in_both(word1, word2): + for letter in word1: + if letter in word2: + print(letter) + +With well-chosen variable names, Python sometimes reads like English. +You could read this loop, “for (each) letter in (the first) word, if +(the) letter (appears) in (the second) word, print (the) letter.” + +Here’s what you get if you compare apples and oranges: + +:: + + >>> in_both('apples', 'oranges') + a + e + s + +String comparison +----------------- + +The relational operators work on strings. To see if two strings are +equal: + +:: + + if word == 'banana': + print('All right, bananas.') + +Other relational operations are useful for putting words in alphabetical +order: + +:: + + if word < 'banana': + print('Your word, ' + word + ', comes before banana.') + elif word > 'banana': + print('Your word, ' + word + ', comes after banana.') + else: + print('All right, bananas.') + +Python does not handle uppercase and lowercase letters the same way +people do. All the uppercase letters come before all the lowercase +letters, so: + +:: + + Your word, Pineapple, comes before banana. + +A common way to address this problem is to convert strings to a standard +format, such as all lowercase, before performing the comparison. Keep +that in mind in case you have to defend yourself against a man armed +with a Pineapple. + +Debugging +--------- + +When you use indices to traverse the values in a sequence, it is tricky +to get the beginning and end of the traversal right. Here is a function +that is supposed to compare two words and return True if one of the +words is the reverse of the other, but it contains two errors: + +:: + + def is_reverse(word1, word2): + if len(word1) != len(word2): + return False + + i = 0 + j = len(word2) + + while j > 0: + if word1[i] != word2[j]: + return False + i = i+1 + j = j-1 + + return True + +The first if statement checks whether the words are the same length. If +not, we can return False immediately. Otherwise, for the rest of the +function, we can assume that the words are the same length. This is an +example of the guardian pattern in Section [guardian]. + +i and j are indices: i traverses word1 forward while j traverses word2 +backward. If we find two letters that don’t match, we can return False +immediately. If we get through the whole loop and all the letters match, +we return True. + +If we test this function with the words “pots” and “stop”, we expect the +return value True, but we get an IndexError: + +:: + + >>> is_reverse('pots', 'stop') + ... + File "reverse.py", line 15, in is_reverse + if word1[i] != word2[j]: + IndexError: string index out of range + +For debugging this kind of error, my first move is to print the values +of the indices immediately before the line where the error appears. + +:: + + while j > 0: + print(i, j) # print here + + if word1[i] != word2[j]: + return False + i = i+1 + j = j-1 + +Now when I run the program again, I get more information: + +:: + + >>> is_reverse('pots', 'stop') + 0 4 + ... + IndexError: string index out of range + +The first time through the loop, the value of j is 4, which is out of +range for the string ``'pots'``. The index of the last character is 3, +so the initial value for j should be len(word2)-1. + +If I fix that error and run the program again, I get: + +:: + + >>> is_reverse('pots', 'stop') + 0 3 + 1 2 + 2 1 + True + +This time we get the right answer, but it looks like the loop only ran +three times, which is suspicious. To get a better idea of what is +happening, it is useful to draw a state diagram. During the first +iteration, the frame for ``is_reverse`` is shown in Figure [fig.state4]. + +.. figure:: figs/state4.pdf + :alt: State diagram. + + State diagram. + +I took some license by arranging the variables in the frame and adding +dotted lines to show that the values of i and j indicate characters in +word1 and word2. + +Starting with this diagram, run the program on paper, changing the +values of i and j during each iteration. Find and fix the second error +in this function. [isreverse] + +Glossary +-------- + +object: + Something a variable can refer to. For now, you can use “object” and + “value” interchangeably. + +sequence: + An ordered collection of values where each value is identified by an + integer index. + +item: + One of the values in a sequence. + +index: + An integer value used to select an item in a sequence, such as a + character in a string. In Python indices start from 0. + +slice: + A part of a string specified by a range of indices. + +empty string: + A string with no characters and length 0, represented by two + quotation marks. + +immutable: + The property of a sequence whose items cannot be changed. + +traverse: + To iterate through the items in a sequence, performing a similar + operation on each. + +search: + A pattern of traversal that stops when it finds what it is looking + for. + +counter: + A variable used to count something, usually initialized to zero and + then incremented. + +invocation: + A statement that calls a method. + +optional argument: + A function or method argument that is not required. + +Exercises +--------- + +Read the documentation of the string methods at +http://docs.python.org/3/library/stdtypes.html#string-methods. You might +want to experiment with some of them to make sure you understand how +they work. strip and replace are particularly useful. + +The documentation uses a syntax that might be confusing. For example, in +``find(sub[, start[, end]])``, the brackets indicate optional arguments. +So sub is required, but start is optional, and if you include start, +then end is optional. + +There is a string method called count that is similar to the function in +Section [counter]. Read the documentation of this method and write an +invocation that counts the number of a’s in ``'banana'``. + +A string slice can take a third index that specifies the “step size”; +that is, the number of spaces between successive characters. A step size +of 2 means every other character; 3 means every third, etc. + +:: + + >>> fruit = 'banana' + >>> fruit[0:5:2] + 'bnn' + +A step size of -1 goes through the word backwards, so the slice +``[::-1]`` generates a reversed string. + +Use this idiom to write a one-line version of ``is_palindrome`` from +Exercise [palindrome]. + +The following functions are all *intended* to check whether a string +contains any lowercase letters, but at least some of them are wrong. For +each function, describe what the function actually does (assuming that +the parameter is a string). + +:: + + def any_lowercase1(s): + for c in s: + if c.islower(): + return True + else: + return False + + def any_lowercase2(s): + for c in s: + if 'c'.islower(): + return 'True' + else: + return 'False' + + def any_lowercase3(s): + for c in s: + flag = c.islower() + return flag + + def any_lowercase4(s): + flag = False + for c in s: + flag = flag or c.islower() + return flag + + def any_lowercase5(s): + for c in s: + if not c.islower(): + return False + return True + +[exrotate] A Caesar cypher is a weak form of encryption that involves +“rotating” each letter by a fixed number of places. To rotate a letter +means to shift it through the alphabet, wrapping around to the beginning +if necessary, so ’A’ rotated by 3 is ’D’ and ’Z’ rotated by 1 is ’A’. + +To rotate a word, rotate each letter by the same amount. For example, +“cheer” rotated by 7 is “jolly” and “melon” rotated by -10 is “cubed”. +In the movie *2001: A Space Odyssey*, the ship computer is called HAL, +which is IBM rotated by -1. + +Write a function called ``rotate_word`` that takes a string and an +integer as parameters, and returns a new string that contains the +letters from the original string rotated by the given amount. + +You might want to use the built-in function ord, which converts a +character to a numeric code, and chr, which converts numeric codes to +characters. Letters of the alphabet are encoded in alphabetical order, +so for example: + +:: + + >>> ord('c') - ord('a') + 2 + +Because ``'c'`` is the two-eth letter of the alphabet. But beware: the +numeric codes for upper case letters are different. + +Potentially offensive jokes on the Internet are sometimes encoded in +ROT13, which is a Caesar cypher with rotation 13. If you are not easily +offended, find and decode some of them. Solution: +http://thinkpython2.com/code/rotate.py. + +Case study: word play +===================== + +This chapter presents the second case study, which involves solving word +puzzles by searching for words that have certain properties. For +example, we’ll find the longest palindromes in English and search for +words whose letters appear in alphabetical order. And I will present +another program development plan: reduction to a previously solved +problem. + +Reading word lists +------------------ + +For the exercises in this chapter we need a list of English words. There +are lots of word lists available on the Web, but the one most suitable +for our purpose is one of the word lists collected and contributed to +the public domain by Grady Ward as part of the Moby lexicon project (see +http://wikipedia.org/wiki/Moby_Project). It is a list of 113,809 +official crosswords; that is, words that are considered valid in +crossword puzzles and other word games. In the Moby collection, the +filename is 113809of.fic; you can download a copy, with the simpler name +words.txt, from http://thinkpython2.com/code/words.txt. + +This file is in plain text, so you can open it with a text editor, but +you can also read it from Python. The built-in function open takes the +name of the file as a parameter and returns a **file object** you can +use to read the file. + +:: + + >>> fin = open('words.txt') + +fin is a common name for a file object used for input. The file object +provides several methods for reading, including readline, which reads +characters from the file until it gets to a newline and returns the +result as a string: + +:: + + >>> fin.readline() + 'aa\r\n' + +The first word in this particular list is “aa”, which is a kind of lava. +The sequence ``\r\n`` represents two whitespace characters, a carriage +return and a newline, that separate this word from the next. + +The file object keeps track of where it is in the file, so if you call +readline again, you get the next word: + +:: + + >>> fin.readline() + 'aah\r\n' + +The next word is “aah”, which is a perfectly legitimate word, so stop +looking at me like that. Or, if it’s the whitespace that’s bothering +you, we can get rid of it with the string method strip: + +:: + + >>> line = fin.readline() + >>> word = line.strip() + >>> word + 'aahed' + +You can also use a file object as part of a for loop. This program reads +words.txt and prints each word, one per line: + +:: + + fin = open('words.txt') + for line in fin: + word = line.strip() + print(word) + +Exercises +--------- + +There are solutions to these exercises in the next section. You should +at least attempt each one before you read the solutions. + +Write a program that reads words.txt and prints only the words with more +than 20 characters (not counting whitespace). + +In 1939 Ernest Vincent Wright published a 50,000 word novel called +*Gadsby* that does not contain the letter “e”. Since “e” is the most +common letter in English, that’s not easy to do. + +In fact, it is difficult to construct a solitary thought without using +that most common symbol. It is slow going at first, but with caution and +hours of training you can gradually gain facility. + +All right, I’ll stop now. + +Write a function called ``has_no_e`` that returns True if the given word +doesn’t have the letter “e” in it. + +Modify your program from the previous section to print only the words +that have no “e” and compute the percentage of the words in the list +that have no “e”. + +Write a function named avoids that takes a word and a string of +forbidden letters, and that returns True if the word doesn’t use any of +the forbidden letters. + +Modify your program to prompt the user to enter a string of forbidden +letters and then print the number of words that don’t contain any of +them. Can you find a combination of 5 forbidden letters that excludes +the smallest number of words? + +Write a function named ``uses_only`` that takes a word and a string of +letters, and that returns True if the word contains only letters in the +list. Can you make a sentence using only the letters acefhlo? Other than +“Hoe alfalfa?” + +Write a function named ``uses_all`` that takes a word and a string of +required letters, and that returns True if the word uses all the +required letters at least once. How many words are there that use all +the vowels aeiou? How about aeiouy? + +Write a function called ``is_abecedarian`` that returns True if the +letters in a word appear in alphabetical order (double letters are ok). +How many abecedarian words are there? + +Search +------ + +All of the exercises in the previous section have something in common; +they can be solved with the search pattern we saw in Section [find]. The +simplest example is: + +:: + + def has_no_e(word): + for letter in word: + if letter == 'e': + return False + return True + +The for loop traverses the characters in word. If we find the letter +“e”, we can immediately return False; otherwise we have to go to the +next letter. If we exit the loop normally, that means we didn’t find an +“e”, so we return True. + +You could write this function more concisely using the in operator, but +I started with this version because it demonstrates the logic of the +search pattern. + +is a more general version of ``has_no_e`` but it has the same structure: + +:: + + def avoids(word, forbidden): + for letter in word: + if letter in forbidden: + return False + return True + +We can return False as soon as we find a forbidden letter; if we get to +the end of the loop, we return True. + +``uses_only`` is similar except that the sense of the condition is +reversed: + +:: + + def uses_only(word, available): + for letter in word: + if letter not in available: + return False + return True + +Instead of a list of forbidden letters, we have a list of available +letters. If we find a letter in word that is not in available, we can +return False. + +``uses_all`` is similar except that we reverse the role of the word and +the string of letters: + +:: + + def uses_all(word, required): + for letter in required: + if letter not in word: + return False + return True + +Instead of traversing the letters in word, the loop traverses the +required letters. If any of the required letters do not appear in the +word, we can return False. + +If you were really thinking like a computer scientist, you would have +recognized that ``uses_all`` was an instance of a previously solved +problem, and you would have written: + +:: + + def uses_all(word, required): + return uses_only(required, word) + +This is an example of a program development plan called **reduction to a +previously solved problem**, which means that you recognize the problem +you are working on as an instance of a solved problem and apply an +existing solution. + +Looping with indices +-------------------- + +I wrote the functions in the previous section with for loops because I +only needed the characters in the strings; I didn’t have to do anything +with the indices. + +For ``is_abecedarian`` we have to compare adjacent letters, which is a +little tricky with a for loop: + +:: + + def is_abecedarian(word): + previous = word[0] + for c in word: + if c < previous: + return False + previous = c + return True + +An alternative is to use recursion: + +:: + + def is_abecedarian(word): + if len(word) <= 1: + return True + if word[0] > word[1]: + return False + return is_abecedarian(word[1:]) + +Another option is to use a while loop: + +:: + + def is_abecedarian(word): + i = 0 + while i < len(word)-1: + if word[i+1] < word[i]: + return False + i = i+1 + return True + +The loop starts at i=0 and ends when i=len(word)-1. Each time through +the loop, it compares the :math:`i`\ th character (which you can think +of as the current character) to the :math:`i+1`\ th character (which you +can think of as the next). + +If the next character is less than (alphabetically before) the current +one, then we have discovered a break in the abecedarian trend, and we +return False. + +If we get to the end of the loop without finding a fault, then the word +passes the test. To convince yourself that the loop ends correctly, +consider an example like ``'flossy'``. The length of the word is 6, so +the last time the loop runs is when i is 4, which is the index of the +second-to-last character. On the last iteration, it compares the +second-to-last character to the last, which is what we want. + +Here is a version of ``is_palindrome`` (see Exercise [palindrome]) that +uses two indices; one starts at the beginning and goes up; the other +starts at the end and goes down. + +:: + + def is_palindrome(word): + i = 0 + j = len(word)-1 + + while i>> cheeses = ['Cheddar', 'Edam', 'Gouda'] + >>> numbers = [42, 123] + >>> empty = [] + >>> print(cheeses, numbers, empty) + ['Cheddar', 'Edam', 'Gouda'] [42, 123] [] + +Lists are mutable +----------------- + +The syntax for accessing the elements of a list is the same as for +accessing the characters of a string—the bracket operator. The +expression inside the brackets specifies the index. Remember that the +indices start at 0: + +:: + + >>> cheeses[0] + 'Cheddar' + +Unlike strings, lists are mutable. When the bracket operator appears on +the left side of an assignment, it identifies the element of the list +that will be assigned. + +:: + + >>> numbers = [42, 123] + >>> numbers[1] = 5 + >>> numbers + [42, 5] + +The one-eth element of numbers, which used to be 123, is now 5. + +Figure [fig.liststate] shows the state diagram for cheeses, numbers and +empty: + +.. figure:: figs/liststate.pdf + :alt: State diagram. + + State diagram. + +Lists are represented by boxes with the word “list” outside and the +elements of the list inside. cheeses refers to a list with three +elements indexed 0, 1 and 2. numbers contains two elements; the diagram +shows that the value of the second element has been reassigned from 123 +to 5. empty refers to a list with no elements. + +List indices work the same way as string indices: + +- Any integer expression can be used as an index. + +- If you try to read or write an element that does not exist, you get + an IndexError. + +- If an index has a negative value, it counts backward from the end of + the list. + +The in operator also works on lists. + +:: + + >>> cheeses = ['Cheddar', 'Edam', 'Gouda'] + >>> 'Edam' in cheeses + True + >>> 'Brie' in cheeses + False + +Traversing a list +----------------- + +The most common way to traverse the elements of a list is with a for +loop. The syntax is the same as for strings: + +:: + + for cheese in cheeses: + print(cheese) + +This works well if you only need to read the elements of the list. But +if you want to write or update the elements, you need the indices. A +common way to do that is to combine the built-in functions range and +len: + +:: + + for i in range(len(numbers)): + numbers[i] = numbers[i] * 2 + +This loop traverses the list and updates each element. len returns the +number of elements in the list. range returns a list of indices from 0 +to :math:`n-1`, where :math:`n` is the length of the list. Each time +through the loop i gets the index of the next element. The assignment +statement in the body uses i to read the old value of the element and to +assign the new value. + +A for loop over an empty list never runs the body: + +:: + + for x in []: + print('This never happens.') + +Although a list can contain another list, the nested list still counts +as a single element. The length of this list is four: + +:: + + ['spam', 1, ['Brie', 'Roquefort', 'Pol le Veq'], [1, 2, 3]] + +List operations +--------------- + +The + operator concatenates lists: + +:: + + >>> a = [1, 2, 3] + >>> b = [4, 5, 6] + >>> c = a + b + >>> c + [1, 2, 3, 4, 5, 6] + +The operator repeats a list a given number of times: + +:: + + >>> [0] * 4 + [0, 0, 0, 0] + >>> [1, 2, 3] * 3 + [1, 2, 3, 1, 2, 3, 1, 2, 3] + +The first example repeats four times. The second example repeats the +list three times. + +List slices +----------- + +The slice operator also works on lists: + +:: + + >>> t = ['a', 'b', 'c', 'd', 'e', 'f'] + >>> t[1:3] + ['b', 'c'] + >>> t[:4] + ['a', 'b', 'c', 'd'] + >>> t[3:] + ['d', 'e', 'f'] + +If you omit the first index, the slice starts at the beginning. If you +omit the second, the slice goes to the end. So if you omit both, the +slice is a copy of the whole list. + +:: + + >>> t[:] + ['a', 'b', 'c', 'd', 'e', 'f'] + +Since lists are mutable, it is often useful to make a copy before +performing operations that modify lists. + +A slice operator on the left side of an assignment can update multiple +elements: + +:: + + >>> t = ['a', 'b', 'c', 'd', 'e', 'f'] + >>> t[1:3] = ['x', 'y'] + >>> t + ['a', 'x', 'y', 'd', 'e', 'f'] + +List methods +------------ + +Python provides methods that operate on lists. For example, append adds +a new element to the end of a list: + +:: + + >>> t = ['a', 'b', 'c'] + >>> t.append('d') + >>> t + ['a', 'b', 'c', 'd'] + +extend takes a list as an argument and appends all of the elements: + +:: + + >>> t1 = ['a', 'b', 'c'] + >>> t2 = ['d', 'e'] + >>> t1.extend(t2) + >>> t1 + ['a', 'b', 'c', 'd', 'e'] + +This example leaves t2 unmodified. + +sort arranges the elements of the list from low to high: + +:: + + >>> t = ['d', 'c', 'e', 'b', 'a'] + >>> t.sort() + >>> t + ['a', 'b', 'c', 'd', 'e'] + +Most list methods are void; they modify the list and return None. If you +accidentally write t = t.sort(), you will be disappointed with the +result. + +Map, filter and reduce +---------------------- + +To add up all the numbers in a list, you can use a loop like this: + +:: + + def add_all(t): + total = 0 + for x in t: + total += x + return total + +total is initialized to 0. Each time through the loop, x gets one +element from the list. The += operator provides a short way to update a +variable. This **augmented assignment statement**, + +:: + + total += x + +is equivalent to + +:: + + total = total + x + +As the loop runs, total accumulates the sum of the elements; a variable +used this way is sometimes called an **accumulator**. + +Adding up the elements of a list is such a common operation that Python +provides it as a built-in function, sum: + +:: + + >>> t = [1, 2, 3] + >>> sum(t) + 6 + +An operation like this that combines a sequence of elements into a +single value is sometimes called **reduce**. + +Sometimes you want to traverse one list while building another. For +example, the following function takes a list of strings and returns a +new list that contains capitalized strings: + +:: + + def capitalize_all(t): + res = [] + for s in t: + res.append(s.capitalize()) + return res + +res is initialized with an empty list; each time through the loop, we +append the next element. So res is another kind of accumulator. + +An operation like ``capitalize_all`` is sometimes called a **map** +because it “maps” a function (in this case the method capitalize) onto +each of the elements in a sequence. + +Another common operation is to select some of the elements from a list +and return a sublist. For example, the following function takes a list +of strings and returns a list that contains only the uppercase strings: + +:: + + def only_upper(t): + res = [] + for s in t: + if s.isupper(): + res.append(s) + return res + +isupper is a string method that returns True if the string contains only +upper case letters. + +An operation like ``only_upper`` is called a **filter** because it +selects some of the elements and filters out the others. + +Most common list operations can be expressed as a combination of map, +filter and reduce. + +Deleting elements +----------------- + +There are several ways to delete elements from a list. If you know the +index of the element you want, you can use pop: + +:: + + >>> t = ['a', 'b', 'c'] + >>> x = t.pop(1) + >>> t + ['a', 'c'] + >>> x + 'b' + +pop modifies the list and returns the element that was removed. If you +don’t provide an index, it deletes and returns the last element. + +If you don’t need the removed value, you can use the del operator: + +:: + + >>> t = ['a', 'b', 'c'] + >>> del t[1] + >>> t + ['a', 'c'] + +If you know the element you want to remove (but not the index), you can +use remove: + +:: + + >>> t = ['a', 'b', 'c'] + >>> t.remove('b') + >>> t + ['a', 'c'] + +The return value from remove is None. + +To remove more than one element, you can use del with a slice index: + +:: + + >>> t = ['a', 'b', 'c', 'd', 'e', 'f'] + >>> del t[1:5] + >>> t + ['a', 'f'] + +As usual, the slice selects all the elements up to but not including the +second index. + +Lists and strings +----------------- + +A string is a sequence of characters and a list is a sequence of values, +but a list of characters is not the same as a string. To convert from a +string to a list of characters, you can use list: + +:: + + >>> s = 'spam' + >>> t = list(s) + >>> t + ['s', 'p', 'a', 'm'] + +Because list is the name of a built-in function, you should avoid using +it as a variable name. I also avoid l because it looks too much like 1. +So that’s why I use t. + +The list function breaks a string into individual letters. If you want +to break a string into words, you can use the split method: + +:: + + >>> s = 'pining for the fjords' + >>> t = s.split() + >>> t + ['pining', 'for', 'the', 'fjords'] + +An optional argument called a **delimiter** specifies which characters +to use as word boundaries. The following example uses a hyphen as a +delimiter: + +:: + + >>> s = 'spam-spam-spam' + >>> delimiter = '-' + >>> t = s.split(delimiter) + >>> t + ['spam', 'spam', 'spam'] + +join is the inverse of split. It takes a list of strings and +concatenates the elements. join is a string method, so you have to +invoke it on the delimiter and pass the list as a parameter: + +:: + + >>> t = ['pining', 'for', 'the', 'fjords'] + >>> delimiter = ' ' + >>> s = delimiter.join(t) + >>> s + 'pining for the fjords' + +In this case the delimiter is a space character, so join puts a space +between words. To concatenate strings without spaces, you can use the +empty string, ``''``, as a delimiter. + +Objects and values +------------------ + +If we run these assignment statements: + +:: + + a = 'banana' + b = 'banana' + +We know that a and b both refer to a string, but we don’t know whether +they refer to the *same* string. There are two possible states, shown in +Figure [fig.list1]. + +.. figure:: figs/list1.pdf + :alt: State diagram. + + State diagram. + +In one case, a and b refer to two different objects that have the same +value. In the second case, they refer to the same object. + +To check whether two variables refer to the same object, you can use the +is operator. + +:: + + >>> a = 'banana' + >>> b = 'banana' + >>> a is b + True + +In this example, Python only created one string object, and both a and b +refer to it. But when you create two lists, you get two objects: + +:: + + >>> a = [1, 2, 3] + >>> b = [1, 2, 3] + >>> a is b + False + +So the state diagram looks like Figure [fig.list2]. + +.. figure:: figs/list2.pdf + :alt: State diagram. + + State diagram. + +In this case we would say that the two lists are **equivalent**, because +they have the same elements, but not **identical**, because they are not +the same object. If two objects are identical, they are also equivalent, +but if they are equivalent, they are not necessarily identical. + +Until now, we have been using “object” and “value” interchangeably, but +it is more precise to say that an object has a value. If you evaluate , +you get a list object whose value is a sequence of integers. If another +list has the same elements, we say it has the same value, but it is not +the same object. + +Aliasing +-------- + +If a refers to an object and you assign b = a, then both variables refer +to the same object: + +:: + + >>> a = [1, 2, 3] + >>> b = a + >>> b is a + True + +The state diagram looks like Figure [fig.list3]. + +.. figure:: figs/list3.pdf + :alt: State diagram. + + State diagram. + +The association of a variable with an object is called a **reference**. +In this example, there are two references to the same object. + +An object with more than one reference has more than one name, so we say +that the object is **aliased**. + +If the aliased object is mutable, changes made with one alias affect the +other: + +:: + + >>> b[0] = 42 + >>> a + [42, 2, 3] + +Although this behavior can be useful, it is error-prone. In general, it +is safer to avoid aliasing when you are working with mutable objects. + +For immutable objects like strings, aliasing is not as much of a +problem. In this example: + +:: + + a = 'banana' + b = 'banana' + +It almost never makes a difference whether a and b refer to the same +string or not. + +List arguments +-------------- + +When you pass a list to a function, the function gets a reference to the +list. If the function modifies the list, the caller sees the change. For +example, ``delete_head`` removes the first element from a list: + +:: + + def delete_head(t): + del t[0] + +Here’s how it is used: + +:: + + >>> letters = ['a', 'b', 'c'] + >>> delete_head(letters) + >>> letters + ['b', 'c'] + +The parameter t and the variable letters are aliases for the same +object. The stack diagram looks like Figure [fig.stack5]. + +.. figure:: figs/stack5.pdf + :alt: Stack diagram. + + Stack diagram. + +Since the list is shared by two frames, I drew it between them. + +It is important to distinguish between operations that modify lists and +operations that create new lists. For example, the append method +modifies a list, but the + operator creates a new list: + +:: + + >>> t1 = [1, 2] + >>> t2 = t1.append(3) + >>> t1 + [1, 2, 3] + >>> t2 + None + +append modifies the list and returns None. + +:: + + >>> t3 = t1 + [4] + >>> t1 + [1, 2, 3] + >>> t3 + [1, 2, 3, 4] + >>> t1 + +The + operator creates a new list and leaves the original list +unchanged. + +This difference is important when you write functions that are supposed +to modify lists. For example, this function *does not* delete the head +of a list: + +:: + + def bad_delete_head(t): + t = t[1:] # WRONG! + +The slice operator creates a new list and the assignment makes t refer +to it, but that doesn’t affect the caller. + +:: + + >>> t4 = [1, 2, 3] + >>> bad_delete_head(t4) + >>> t4 + [1, 2, 3] + +At the beginning of ``bad_delete_head``, t and t4 refer to the same +list. At the end, t refers to a new list, but t4 still refers to the +original, unmodified list. + +An alternative is to write a function that creates and returns a new +list. For example, tail returns all but the first element of a list: + +:: + + def tail(t): + return t[1:] + +This function leaves the original list unmodified. Here’s how it is +used: + +:: + + >>> letters = ['a', 'b', 'c'] + >>> rest = tail(letters) + >>> rest + ['b', 'c'] + +Debugging +--------- + +Careless use of lists (and other mutable objects) can lead to long hours +of debugging. Here are some common pitfalls and ways to avoid them: + +#. Most list methods modify the argument and return None. This is the + opposite of the string methods, which return a new string and leave + the original alone. + + If you are used to writing string code like this: + + :: + + word = word.strip() + + It is tempting to write list code like this: + + :: + + t = t.sort() # WRONG! + + Because sort returns None, the next operation you perform with t is + likely to fail. + + Before using list methods and operators, you should read the + documentation carefully and then test them in interactive mode. + +#. Pick an idiom and stick with it. + + Part of the problem with lists is that there are too many ways to do + things. For example, to remove an element from a list, you can use + pop, remove, del, or even a slice assignment. + + To add an element, you can use the append method or the + operator. + Assuming that t is a list and x is a list element, these are correct: + + :: + + t.append(x) + t = t + [x] + t += [x] + + And these are wrong: + + :: + + t.append([x]) # WRONG! + t = t.append(x) # WRONG! + t + [x] # WRONG! + t = t + x # WRONG! + + Try out each of these examples in interactive mode to make sure you + understand what they do. Notice that only the last one causes a + runtime error; the other three are legal, but they do the wrong + thing. + +#. Make copies to avoid aliasing. + + If you want to use a method like sort that modifies the argument, but + you need to keep the original list as well, you can make a copy. + + :: + + >>> t = [3, 1, 2] + >>> t2 = t[:] + >>> t2.sort() + >>> t + [3, 1, 2] + >>> t2 + [1, 2, 3] + + In this example you could also use the built-in function sorted, + which returns a new, sorted list and leaves the original alone. + + :: + + >>> t2 = sorted(t) + >>> t + [3, 1, 2] + >>> t2 + [1, 2, 3] + +Glossary +-------- + +list: + A sequence of values. + +element: + One of the values in a list (or other sequence), also called items. + +nested list: + A list that is an element of another list. + +accumulator: + A variable used in a loop to add up or accumulate a result. + +augmented assignment: + A statement that updates the value of a variable using an operator + like ``+=``. + +reduce: + A processing pattern that traverses a sequence and accumulates the + elements into a single result. + +map: + A processing pattern that traverses a sequence and performs an + operation on each element. + +filter: + A processing pattern that traverses a list and selects the elements + that satisfy some criterion. + +object: + Something a variable can refer to. An object has a type and a value. + +equivalent: + Having the same value. + +identical: + Being the same object (which implies equivalence). + +reference: + The association between a variable and its value. + +aliasing: + A circumstance where two or more variables refer to the same object. + +delimiter: + A character or string used to indicate where a string should be + split. + +Exercises +--------- + +You can download solutions to these exercises from +http://thinkpython2.com/code/list_exercises.py. + +Write a function called ``nested_sum`` that takes a list of lists of +integers and adds up the elements from all of the nested lists. For +example: + +:: + + >>> t = [[1, 2], [3], [4, 5, 6]] + >>> nested_sum(t) + 21 + +[cumulative] + +Write a function called cumsum that takes a list of numbers and returns +the cumulative sum; that is, a new list where the :math:`i`\ th element +is the sum of the first :math:`i+1` elements from the original list. For +example: + +:: + + >>> t = [1, 2, 3] + >>> cumsum(t) + [1, 3, 6] + +Write a function called ``middle`` that takes a list and returns a new +list that contains all but the first and last elements. For example: + +:: + + >>> t = [1, 2, 3, 4] + >>> middle(t) + [2, 3] + +Write a function called ``chop`` that takes a list, modifies it by +removing the first and last elements, and returns None. For example: + +:: + + >>> t = [1, 2, 3, 4] + >>> chop(t) + >>> t + [2, 3] + +Write a function called ``is_sorted`` that takes a list as a parameter +and returns True if the list is sorted in ascending order and False +otherwise. For example: + +:: + + >>> is_sorted([1, 2, 2]) + True + >>> is_sorted(['b', 'a']) + False + +[anagram] + +Two words are anagrams if you can rearrange the letters from one to +spell the other. Write a function called ``is_anagram`` that takes two +strings and returns True if they are anagrams. + +[duplicate] + +Write a function called ``has_duplicates`` that takes a list and returns +True if there is any element that appears more than once. It should not +modify the original list. + +This exercise pertains to the so-called Birthday Paradox, which you can +read about at http://en.wikipedia.org/wiki/Birthday_paradox. + +If there are 23 students in your class, what are the chances that two of +you have the same birthday? You can estimate this probability by +generating random samples of 23 birthdays and checking for matches. +Hint: you can generate random birthdays with the randint function in the +random module. + +You can download my solution from +http://thinkpython2.com/code/birthday.py. + +Write a function that reads the file words.txt and builds a list with +one element per word. Write two versions of this function, one using the +append method and the other using the idiom t = t + [x]. Which one takes +longer to run? Why? + +Solution: http://thinkpython2.com/code/wordlist.py. + +[wordlist1] [bisection] + +To check whether a word is in the word list, you could use the in +operator, but it would be slow because it searches through the words in +order. + +Because the words are in alphabetical order, we can speed things up with +a bisection search (also known as binary search), which is similar to +what you do when you look a word up in the dictionary. You start in the +middle and check to see whether the word you are looking for comes +before the word in the middle of the list. If so, you search the first +half of the list the same way. Otherwise you search the second half. + +Either way, you cut the remaining search space in half. If the word list +has 113,809 words, it will take about 17 steps to find the word or +conclude that it’s not there. + +Write a function called ``in_bisect`` that takes a sorted list and a +target value and returns the index of the value in the list if it’s +there, or None if it’s not. + +Or you could read the documentation of the bisect module and use that! +Solution: http://thinkpython2.com/code/inlist.py. + +Two words are a “reverse pair” if each is the reverse of the other. +Write a program that finds all the reverse pairs in the word list. +Solution: http://thinkpython2.com/code/reverse_pair.py. + +Two words “interlock” if taking alternating letters from each forms a +new word. For example, “shoe” and “cold” interlock to form “schooled”. +Solution: http://thinkpython2.com/code/interlock.py. Credit: This +exercise is inspired by an example at http://puzzlers.org. + +#. Write a program that finds all pairs of words that interlock. Hint: + don’t enumerate all pairs! + +#. Can you find any words that are three-way interlocked; that is, every + third letter forms a word, starting from the first, second or third? + +Dictionaries +============ + +This chapter presents another built-in type called a dictionary. +Dictionaries are one of Python’s best features; they are the building +blocks of many efficient and elegant algorithms. + +A dictionary is a mapping +------------------------- + +A **dictionary** is like a list, but more general. In a list, the +indices have to be integers; in a dictionary they can be (almost) any +type. + +A dictionary contains a collection of indices, which are called +**keys**, and a collection of values. Each key is associated with a +single value. The association of a key and a value is called a +**key-value pair** or sometimes an **item**. + +In mathematical language, a dictionary represents a **mapping** from +keys to values, so you can also say that each key “maps to” a value. As +an example, we’ll build a dictionary that maps from English to Spanish +words, so the keys and the values are all strings. + +The function dict creates a new dictionary with no items. Because dict +is the name of a built-in function, you should avoid using it as a +variable name. + +:: + + >>> eng2sp = dict() + >>> eng2sp + {} + +The squiggly-brackets, ``{}``, represent an empty dictionary. To add +items to the dictionary, you can use square brackets: + +:: + + >>> eng2sp['one'] = 'uno' + +This line creates an item that maps from the key ``'one'`` to the value +``'uno'``. If we print the dictionary again, we see a key-value pair +with a colon between the key and value: + +:: + + >>> eng2sp + {'one': 'uno'} + +This output format is also an input format. For example, you can create +a new dictionary with three items: + +:: + + >>> eng2sp = {'one': 'uno', 'two': 'dos', 'three': 'tres'} + +But if you print eng2sp, you might be surprised: + +:: + + >>> eng2sp + {'one': 'uno', 'three': 'tres', 'two': 'dos'} + +The order of the key-value pairs might not be the same. If you type the +same example on your computer, you might get a different result. In +general, the order of items in a dictionary is unpredictable. + +But that’s not a problem because the elements of a dictionary are never +indexed with integer indices. Instead, you use the keys to look up the +corresponding values: + +:: + + >>> eng2sp['two'] + 'dos' + +The key ``'two'`` always maps to the value ``'dos'`` so the order of the +items doesn’t matter. + +If the key isn’t in the dictionary, you get an exception: + +:: + + >>> eng2sp['four'] + KeyError: 'four' + +The len function works on dictionaries; it returns the number of +key-value pairs: + +:: + + >>> len(eng2sp) + 3 + +The in operator works on dictionaries, too; it tells you whether +something appears as a *key* in the dictionary (appearing as a value is +not good enough). + +:: + + >>> 'one' in eng2sp + True + >>> 'uno' in eng2sp + False + +To see whether something appears as a value in a dictionary, you can use +the method values, which returns a collection of values, and then use +the in operator: + +:: + + >>> vals = eng2sp.values() + >>> 'uno' in vals + True + +The in operator uses different algorithms for lists and dictionaries. +For lists, it searches the elements of the list in order, as in +Section [find]. As the list gets longer, the search time gets longer in +direct proportion. + +For dictionaries, Python uses an algorithm called a **hashtable** that +has a remarkable property: the in operator takes about the same amount +of time no matter how many items are in the dictionary. I explain how +that’s possible in Section [hashtable], but the explanation might not +make sense until you’ve read a few more chapters. + +Dictionary as a collection of counters +-------------------------------------- + +Suppose you are given a string and you want to count how many times each +letter appears. There are several ways you could do it: + +#. You could create 26 variables, one for each letter of the alphabet. + Then you could traverse the string and, for each character, increment + the corresponding counter, probably using a chained conditional. + +#. You could create a list with 26 elements. Then you could convert each + character to a number (using the built-in function ord), use the + number as an index into the list, and increment the appropriate + counter. + +#. You could create a dictionary with characters as keys and counters as + the corresponding values. The first time you see a character, you + would add an item to the dictionary. After that you would increment + the value of an existing item. + +Each of these options performs the same computation, but each of them +implements that computation in a different way. + +An **implementation** is a way of performing a computation; some +implementations are better than others. For example, an advantage of the +dictionary implementation is that we don’t have to know ahead of time +which letters appear in the string and we only have to make room for the +letters that do appear. + +Here is what the code might look like: + +:: + + def histogram(s): + d = dict() + for c in s: + if c not in d: + d[c] = 1 + else: + d[c] += 1 + return d + +The name of the function is histogram, which is a statistical term for a +collection of counters (or frequencies). + +The first line of the function creates an empty dictionary. The for loop +traverses the string. Each time through the loop, if the character c is +not in the dictionary, we create a new item with key c and the initial +value 1 (since we have seen this letter once). If c is already in the +dictionary we increment d[c]. + +Here’s how it works: + +:: + + >>> h = histogram('brontosaurus') + >>> h + {'a': 1, 'b': 1, 'o': 2, 'n': 1, 's': 2, 'r': 2, 'u': 2, 't': 1} + +The histogram indicates that the letters ``'a'`` and ``'b'`` appear +once; ``'o'`` appears twice, and so on. + +Dictionaries have a method called get that takes a key and a default +value. If the key appears in the dictionary, get returns the +corresponding value; otherwise it returns the default value. For +example: + +:: + + >>> h = histogram('a') + >>> h + {'a': 1} + >>> h.get('a', 0) + 1 + >>> h.get('b', 0) + 0 + +As an exercise, use get to write histogram more concisely. You should be +able to eliminate the if statement. + +Looping and dictionaries +------------------------ + +If you use a dictionary in a for statement, it traverses the keys of the +dictionary. For example, ``print_hist`` prints each key and the +corresponding value: + +:: + + def print_hist(h): + for c in h: + print(c, h[c]) + +Here’s what the output looks like: + +:: + + >>> h = histogram('parrot') + >>> print_hist(h) + a 1 + p 1 + r 2 + t 1 + o 1 + +Again, the keys are in no particular order. To traverse the keys in +sorted order, you can use the built-in function sorted: + +:: + + >>> for key in sorted(h): + ... print(key, h[key]) + a 1 + o 1 + p 1 + r 2 + t 1 + +Reverse lookup +-------------- + +Given a dictionary d and a key k, it is easy to find the corresponding +value v = d[k]. This operation is called a **lookup**. + +But what if you have v and you want to find k? You have two problems: +first, there might be more than one key that maps to the value v. +Depending on the application, you might be able to pick one, or you +might have to make a list that contains all of them. Second, there is no +simple syntax to do a **reverse lookup**; you have to search. + +Here is a function that takes a value and returns the first key that +maps to that value: + +:: + + def reverse_lookup(d, v): + for k in d: + if d[k] == v: + return k + raise LookupError() + +This function is yet another example of the search pattern, but it uses +a feature we haven’t seen before, raise. The **raise statement** causes +an exception; in this case it causes a LookupError, which is a built-in +exception used to indicate that a lookup operation failed. + +If we get to the end of the loop, that means v doesn’t appear in the +dictionary as a value, so we raise an exception. + +Here is an example of a successful reverse lookup: + +:: + + >>> h = histogram('parrot') + >>> key = reverse_lookup(h, 2) + >>> key + 'r' + +And an unsuccessful one: + +:: + + >>> key = reverse_lookup(h, 3) + Traceback (most recent call last): + File "", line 1, in + File "", line 5, in reverse_lookup + LookupError + +The effect when you raise an exception is the same as when Python raises +one: it prints a traceback and an error message. + +The raise statement can take a detailed error message as an optional +argument. For example: + +:: + + >>> raise LookupError('value does not appear in the dictionary') + Traceback (most recent call last): + File "", line 1, in ? + LookupError: value does not appear in the dictionary + +A reverse lookup is much slower than a forward lookup; if you have to do +it often, or if the dictionary gets big, the performance of your program +will suffer. + +Dictionaries and lists +---------------------- + +Lists can appear as values in a dictionary. For example, if you are +given a dictionary that maps from letters to frequencies, you might want +to invert it; that is, create a dictionary that maps from frequencies to +letters. Since there might be several letters with the same frequency, +each value in the inverted dictionary should be a list of letters. + +Here is a function that inverts a dictionary: + +:: + + def invert_dict(d): + inverse = dict() + for key in d: + val = d[key] + if val not in inverse: + inverse[val] = [key] + else: + inverse[val].append(key) + return inverse + +Each time through the loop, key gets a key from d and val gets the +corresponding value. If val is not in inverse, that means we haven’t +seen it before, so we create a new item and initialize it with a +**singleton** (a list that contains a single element). Otherwise we have +seen this value before, so we append the corresponding key to the list. + +Here is an example: + +:: + + >>> hist = histogram('parrot') + >>> hist + {'a': 1, 'p': 1, 'r': 2, 't': 1, 'o': 1} + >>> inverse = invert_dict(hist) + >>> inverse + {1: ['a', 'p', 't', 'o'], 2: ['r']} + +.. figure:: figs/dict1.pdf + :alt: State diagram. + + State diagram. + +Figure [fig.dict1] is a state diagram showing hist and inverse. A +dictionary is represented as a box with the type dict above it and the +key-value pairs inside. If the values are integers, floats or strings, I +draw them inside the box, but I usually draw lists outside the box, just +to keep the diagram simple. + +Lists can be values in a dictionary, as this example shows, but they +cannot be keys. Here’s what happens if you try: + +:: + + >>> t = [1, 2, 3] + >>> d = dict() + >>> d[t] = 'oops' + Traceback (most recent call last): + File "", line 1, in ? + TypeError: list objects are unhashable + +I mentioned earlier that a dictionary is implemented using a hashtable +and that means that the keys have to be **hashable**. + +A **hash** is a function that takes a value (of any kind) and returns an +integer. Dictionaries use these integers, called hash values, to store +and look up key-value pairs. + +This system works fine if the keys are immutable. But if the keys are +mutable, like lists, bad things happen. For example, when you create a +key-value pair, Python hashes the key and stores it in the corresponding +location. If you modify the key and then hash it again, it would go to a +different location. In that case you might have two entries for the same +key, or you might not be able to find a key. Either way, the dictionary +wouldn’t work correctly. + +That’s why keys have to be hashable, and why mutable types like lists +aren’t. The simplest way to get around this limitation is to use tuples, +which we will see in the next chapter. + +Since dictionaries are mutable, they can’t be used as keys, but they +*can* be used as values. + +Memos +----- + +If you played with the fibonacci function from +Section [one.more.example], you might have noticed that the bigger the +argument you provide, the longer the function takes to run. Furthermore, +the run time increases quickly. + +To understand why, consider Figure [fig.fibonacci], which shows the +**call graph** for fibonacci with n=4: + +.. figure:: figs/fibonacci.pdf + :alt: Call graph. + + Call graph. + +A call graph shows a set of function frames, with lines connecting each +frame to the frames of the functions it calls. At the top of the graph, +fibonacci with n=4 calls fibonacci with n=3 and n=2. In turn, fibonacci +with n=3 calls fibonacci with n=2 and n=1. And so on. + +Count how many times fibonacci(0) and fibonacci(1) are called. This is +an inefficient solution to the problem, and it gets worse as the +argument gets bigger. + +One solution is to keep track of values that have already been computed +by storing them in a dictionary. A previously computed value that is +stored for later use is called a **memo**. Here is a “memoized” version +of fibonacci: + +:: + + known = {0:0, 1:1} + + def fibonacci(n): + if n in known: + return known[n] + + res = fibonacci(n-1) + fibonacci(n-2) + known[n] = res + return res + +known is a dictionary that keeps track of the Fibonacci numbers we +already know. It starts with two items: 0 maps to 0 and 1 maps to 1. + +Whenever fibonacci is called, it checks known. If the result is already +there, it can return immediately. Otherwise it has to compute the new +value, add it to the dictionary, and return it. + +If you run this version of fibonacci and compare it with the original, +you will find that it is much faster. + +Global variables +---------------- + +In the previous example, known is created outside the function, so it +belongs to the special frame called ``__main__``. Variables in +``__main__`` are sometimes called **global** because they can be +accessed from any function. Unlike local variables, which disappear when +their function ends, global variables persist from one function call to +the next. + +It is common to use global variables for **flags**; that is, boolean +variables that indicate (“flag”) whether a condition is true. For +example, some programs use a flag named verbose to control the level of +detail in the output: + +:: + + verbose = True + + def example1(): + if verbose: + print('Running example1') + +If you try to reassign a global variable, you might be surprised. The +following example is supposed to keep track of whether the function has +been called: + +:: + + been_called = False + + def example2(): + been_called = True # WRONG + +But if you run it you will see that the value of ``been_called`` doesn’t +change. The problem is that example2 creates a new local variable named +``been_called``. The local variable goes away when the function ends, +and has no effect on the global variable. + +To reassign a global variable inside a function you have to **declare** +the global variable before you use it: + +:: + + been_called = False + + def example2(): + global been_called + been_called = True + +The **global statement** tells the interpreter something like, “In this +function, when I say ``been_called``, I mean the global variable; don’t +create a local one.” + +Here’s an example that tries to update a global variable: + +:: + + count = 0 + + def example3(): + count = count + 1 # WRONG + +If you run it you get: + +:: + + UnboundLocalError: local variable 'count' referenced before assignment + +Python assumes that count is local, and under that assumption you are +reading it before writing it. The solution, again, is to declare count +global. + +:: + + def example3(): + global count + count += 1 + +If a global variable refers to a mutable value, you can modify the value +without declaring the variable: + +:: + + known = {0:0, 1:1} + + def example4(): + known[2] = 1 + +So you can add, remove and replace elements of a global list or +dictionary, but if you want to reassign the variable, you have to +declare it: + +:: + + def example5(): + global known + known = dict() + +Global variables can be useful, but if you have a lot of them, and you +modify them frequently, they can make programs hard to debug. + +Debugging +--------- + +As you work with bigger datasets it can become unwieldy to debug by +printing and checking the output by hand. Here are some suggestions for +debugging large datasets: + +Scale down the input: + If possible, reduce the size of the dataset. For example if the + program reads a text file, start with just the first 10 lines, or + with the smallest example you can find. You can either edit the + files themselves, or (better) modify the program so it reads only + the first n lines. + + If there is an error, you can reduce n to the smallest value that + manifests the error, and then increase it gradually as you find and + correct errors. + +Check summaries and types: + Instead of printing and checking the entire dataset, consider + printing summaries of the data: for example, the number of items in + a dictionary or the total of a list of numbers. + + A common cause of runtime errors is a value that is not the right + type. For debugging this kind of error, it is often enough to print + the type of a value. + +Write self-checks: + Sometimes you can write code to check for errors automatically. For + example, if you are computing the average of a list of numbers, you + could check that the result is not greater than the largest element + in the list or less than the smallest. This is called a “sanity + check” because it detects results that are “insane”. + + Another kind of check compares the results of two different + computations to see if they are consistent. This is called a + “consistency check”. + +Format the output: + Formatting debugging output can make it easier to spot an error. We + saw an example in Section [factdebug]. The pprint module provides a + pprint function that displays built-in types in a more + human-readable format (pprint stands for “pretty print”). + +Again, time you spend building scaffolding can reduce the time you spend +debugging. + +Glossary +-------- + +mapping: + A relationship in which each element of one set corresponds to an + element of another set. + +dictionary: + A mapping from keys to their corresponding values. + +key-value pair: + The representation of the mapping from a key to a value. + +item: + In a dictionary, another name for a key-value pair. + +key: + An object that appears in a dictionary as the first part of a + key-value pair. + +value: + An object that appears in a dictionary as the second part of a + key-value pair. This is more specific than our previous use of the + word “value”. + +implementation: + A way of performing a computation. + +hashtable: + The algorithm used to implement Python dictionaries. + +hash function: + A function used by a hashtable to compute the location for a key. + +hashable: + A type that has a hash function. Immutable types like integers, + floats and strings are hashable; mutable types like lists and + dictionaries are not. + +lookup: + A dictionary operation that takes a key and finds the corresponding + value. + +reverse lookup: + A dictionary operation that takes a value and finds one or more keys + that map to it. + +raise statement: + A statement that (deliberately) raises an exception. + +singleton: + A list (or other sequence) with a single element. + +call graph: + A diagram that shows every frame created during the execution of a + program, with an arrow from each caller to each callee. + +memo: + A computed value stored to avoid unnecessary future computation. + +global variable: + A variable defined outside a function. Global variables can be + accessed from any function. + +global statement: + A statement that declares a variable name global. + +flag: + A boolean variable used to indicate whether a condition is true. + +declaration: + A statement like global that tells the interpreter something about a + variable. + +Exercises +--------- + +[wordlist2] + +Write a function that reads the words in words.txt and stores them as +keys in a dictionary. It doesn’t matter what the values are. Then you +can use the in operator as a fast way to check whether a string is in +the dictionary. + +If you did Exercise [wordlist1], you can compare the speed of this +implementation with the list in operator and the bisection search. + +[setdefault] + +Read the documentation of the dictionary method setdefault and use it to +write a more concise version of ``invert_dict``. Solution: +http://thinkpython2.com/code/invert_dict.py. + +Memoize the Ackermann function from Exercise [ackermann] and see if +memoization makes it possible to evaluate the function with bigger +arguments. Hint: no. Solution: +http://thinkpython2.com/code/ackermann_memo.py. + +If you did Exercise [duplicate], you already have a function named +``has_duplicates`` that takes a list as a parameter and returns True if +there is any object that appears more than once in the list. + +Use a dictionary to write a faster, simpler version of +``has_duplicates``. Solution: +http://thinkpython2.com/code/has_duplicates.py. + +[exrotatepairs] + +Two words are “rotate pairs” if you can rotate one of them and get the +other (see ``rotate_word`` in Exercise [exrotate]). + +Write a program that reads a wordlist and finds all the rotate pairs. +Solution: http://thinkpython2.com/code/rotate_pairs.py. + +Here’s another Puzzler from *Car Talk* +(http://www.cartalk.com/content/puzzlers): + + This was sent in by a fellow named Dan O’Leary. He came upon a + common one-syllable, five-letter word recently that has the + following unique property. When you remove the first letter, the + remaining letters form a homophone of the original word, that is a + word that sounds exactly the same. Replace the first letter, that + is, put it back and remove the second letter and the result is yet + another homophone of the original word. And the question is, what’s + the word? + + Now I’m going to give you an example that doesn’t work. Let’s look + at the five-letter word, ‘wrack.’ W-R-A-C-K, you know like to ‘wrack + with pain.’ If I remove the first letter, I am left with a + four-letter word, ’R-A-C-K.’ As in, ‘Holy cow, did you see the rack + on that buck! It must have been a nine-pointer!’ It’s a perfect + homophone. If you put the ‘w’ back, and remove the ‘r,’ instead, + you’re left with the word, ‘wack,’ which is a real word, it’s just + not a homophone of the other two words. + + But there is, however, at least one word that Dan and we know of, + which will yield two homophones if you remove either of the first + two letters to make two, new four-letter words. The question is, + what’s the word? + +You can use the dictionary from Exercise [wordlist2] to check whether a +string is in the word list. + +To check whether two words are homophones, you can use the CMU +Pronouncing Dictionary. You can download it from +http://www.speech.cs.cmu.edu/cgi-bin/cmudict or from +http://thinkpython2.com/code/c06d and you can also download +http://thinkpython2.com/code/pronounce.py, which provides a function +named ``read_dictionary`` that reads the pronouncing dictionary and +returns a Python dictionary that maps from each word to a string that +describes its primary pronunciation. + +Write a program that lists all the words that solve the Puzzler. +Solution: http://thinkpython2.com/code/homophone.py. + +Tuples +====== + +This chapter presents one more built-in type, the tuple, and then shows +how lists, dictionaries, and tuples work together. I also present a +useful feature for variable-length argument lists, the gather and +scatter operators. + +One note: there is no consensus on how to pronounce “tuple”. Some people +say “tuh-ple”, which rhymes with “supple”. But in the context of +programming, most people say “too-ple”, which rhymes with “quadruple”. + +Tuples are immutable +-------------------- + +A tuple is a sequence of values. The values can be any type, and they +are indexed by integers, so in that respect tuples are a lot like lists. +The important difference is that tuples are immutable. + +Syntactically, a tuple is a comma-separated list of values: + +:: + + >>> t = 'a', 'b', 'c', 'd', 'e' + +Although it is not necessary, it is common to enclose tuples in +parentheses: + +:: + + >>> t = ('a', 'b', 'c', 'd', 'e') + +To create a tuple with a single element, you have to include a final +comma: + +:: + + >>> t1 = 'a', + >>> type(t1) + + +A value in parentheses is not a tuple: + +:: + + >>> t2 = ('a') + >>> type(t2) + + +Another way to create a tuple is the built-in function tuple. With no +argument, it creates an empty tuple: + +:: + + >>> t = tuple() + >>> t + () + +If the argument is a sequence (string, list or tuple), the result is a +tuple with the elements of the sequence: + +:: + + >>> t = tuple('lupins') + >>> t + ('l', 'u', 'p', 'i', 'n', 's') + +Because tuple is the name of a built-in function, you should avoid using +it as a variable name. + +Most list operators also work on tuples. The bracket operator indexes an +element: + +:: + + >>> t = ('a', 'b', 'c', 'd', 'e') + >>> t[0] + 'a' + +And the slice operator selects a range of elements. + +:: + + >>> t[1:3] + ('b', 'c') + +But if you try to modify one of the elements of the tuple, you get an +error: + +:: + + >>> t[0] = 'A' + TypeError: object doesn't support item assignment + +Because tuples are immutable, you can’t modify the elements. But you can +replace one tuple with another: + +:: + + >>> t = ('A',) + t[1:] + >>> t + ('A', 'b', 'c', 'd', 'e') + +This statement makes a new tuple and then makes t refer to it. + +The relational operators work with tuples and other sequences; Python +starts by comparing the first element from each sequence. If they are +equal, it goes on to the next elements, and so on, until it finds +elements that differ. Subsequent elements are not considered (even if +they are really big). + +:: + + >>> (0, 1, 2) < (0, 3, 4) + True + >>> (0, 1, 2000000) < (0, 3, 4) + True + +Tuple assignment +---------------- + +It is often useful to swap the values of two variables. With +conventional assignments, you have to use a temporary variable. For +example, to swap a and b: + +:: + + >>> temp = a + >>> a = b + >>> b = temp + +This solution is cumbersome; **tuple assignment** is more elegant: + +:: + + >>> a, b = b, a + +The left side is a tuple of variables; the right side is a tuple of +expressions. Each value is assigned to its respective variable. All the +expressions on the right side are evaluated before any of the +assignments. + +The number of variables on the left and the number of values on the +right have to be the same: + +:: + + >>> a, b = 1, 2, 3 + ValueError: too many values to unpack + +More generally, the right side can be any kind of sequence (string, list +or tuple). For example, to split an email address into a user name and a +domain, you could write: + +:: + + >>> addr = 'monty@python.org' + >>> uname, domain = addr.split('@') + +The return value from split is a list with two elements; the first +element is assigned to uname, the second to domain. + +:: + + >>> uname + 'monty' + >>> domain + 'python.org' + +Tuples as return values +----------------------- + +Strictly speaking, a function can only return one value, but if the +value is a tuple, the effect is the same as returning multiple values. +For example, if you want to divide two integers and compute the quotient +and remainder, it is inefficient to compute x/y and then x%y. It is +better to compute them both at the same time. + +The built-in function divmod takes two arguments and returns a tuple of +two values, the quotient and remainder. You can store the result as a +tuple: + +:: + + >>> t = divmod(7, 3) + >>> t + (2, 1) + +Or use tuple assignment to store the elements separately: + +:: + + >>> quot, rem = divmod(7, 3) + >>> quot + 2 + >>> rem + 1 + +Here is an example of a function that returns a tuple: + +:: + + def min_max(t): + return min(t), max(t) + +max and min are built-in functions that find the largest and smallest +elements of a sequence. ``min_max`` computes both and returns a tuple of +two values. + +Variable-length argument tuples +------------------------------- + +Functions can take a variable number of arguments. A parameter name that +begins with **gathers** arguments into a tuple. For example, printall +takes any number of arguments and prints them: + +:: + + def printall(*args): + print(args) + +The gather parameter can have any name you like, but args is +conventional. Here’s how the function works: + +:: + + >>> printall(1, 2.0, '3') + (1, 2.0, '3') + +The complement of gather is **scatter**. If you have a sequence of +values and you want to pass it to a function as multiple arguments, you +can use the operator. For example, divmod takes exactly two arguments; +it doesn’t work with a tuple: + +:: + + >>> t = (7, 3) + >>> divmod(t) + TypeError: divmod expected 2 arguments, got 1 + +But if you scatter the tuple, it works: + +:: + + >>> divmod(*t) + (2, 1) + +Many of the built-in functions use variable-length argument tuples. For +example, max and min can take any number of arguments: + +:: + + >>> max(1, 2, 3) + 3 + +But sum does not. + +:: + + >>> sum(1, 2, 3) + TypeError: sum expected at most 2 arguments, got 3 + +As an exercise, write a function called sumall that takes any number of +arguments and returns their sum. + +Lists and tuples +---------------- + +zip is a built-in function that takes two or more sequences and returns +a list of tuples where each tuple contains one element from each +sequence. The name of the function refers to a zipper, which joins and +interleaves two rows of teeth. + +This example zips a string and a list: + +:: + + >>> s = 'abc' + >>> t = [0, 1, 2] + >>> zip(s, t) + + +The result is a **zip object** that knows how to iterate through the +pairs. The most common use of zip is in a for loop: + +:: + + >>> for pair in zip(s, t): + ... print(pair) + ... + ('a', 0) + ('b', 1) + ('c', 2) + +A zip object is a kind of **iterator**, which is any object that +iterates through a sequence. Iterators are similar to lists in some +ways, but unlike lists, you can’t use an index to select an element from +an iterator. + +If you want to use list operators and methods, you can use a zip object +to make a list: + +:: + + >>> list(zip(s, t)) + [('a', 0), ('b', 1), ('c', 2)] + +The result is a list of tuples; in this example, each tuple contains a +character from the string and the corresponding element from the list. + +If the sequences are not the same length, the result has the length of +the shorter one. + +:: + + >>> list(zip('Anne', 'Elk')) + [('A', 'E'), ('n', 'l'), ('n', 'k')] + +You can use tuple assignment in a for loop to traverse a list of tuples: + +:: + + t = [('a', 0), ('b', 1), ('c', 2)] + for letter, number in t: + print(number, letter) + +Each time through the loop, Python selects the next tuple in the list +and assigns the elements to letter and number. The output of this loop +is: + +:: + + 0 a + 1 b + 2 c + +If you combine zip, for and tuple assignment, you get a useful idiom for +traversing two (or more) sequences at the same time. For example, +``has_match`` takes two sequences, t1 and t2, and returns True if there +is an index i such that t1[i] == t2[i]: + +:: + + def has_match(t1, t2): + for x, y in zip(t1, t2): + if x == y: + return True + return False + +If you need to traverse the elements of a sequence and their indices, +you can use the built-in function enumerate: + +:: + + for index, element in enumerate('abc'): + print(index, element) + +The result from enumerate is an enumerate object, which iterates a +sequence of pairs; each pair contains an index (starting from 0) and an +element from the given sequence. In this example, the output is + +:: + + 0 a + 1 b + 2 c + +Again. + +Dictionaries and tuples +----------------------- + +Dictionaries have a method called items that returns a sequence of +tuples, where each tuple is a key-value pair. + +:: + + >>> d = {'a':0, 'b':1, 'c':2} + >>> t = d.items() + >>> t + dict_items([('c', 2), ('a', 0), ('b', 1)]) + +The result is a ``dict_items`` object, which is an iterator that +iterates the key-value pairs. You can use it in a for loop like this: + +:: + + >>> for key, value in d.items(): + ... print(key, value) + ... + c 2 + a 0 + b 1 + +As you should expect from a dictionary, the items are in no particular +order. + +Going in the other direction, you can use a list of tuples to initialize +a new dictionary: + +:: + + >>> t = [('a', 0), ('c', 2), ('b', 1)] + >>> d = dict(t) + >>> d + {'a': 0, 'c': 2, 'b': 1} + +Combining dict with zip yields a concise way to create a dictionary: + +:: + + >>> d = dict(zip('abc', range(3))) + >>> d + {'a': 0, 'c': 2, 'b': 1} + +The dictionary method update also takes a list of tuples and adds them, +as key-value pairs, to an existing dictionary. + +It is common to use tuples as keys in dictionaries (primarily because +you can’t use lists). For example, a telephone directory might map from +last-name, first-name pairs to telephone numbers. Assuming that we have +defined last, first and number, we could write: + +:: + + directory[last, first] = number + +The expression in brackets is a tuple. We could use tuple assignment to +traverse this dictionary. + +:: + + for last, first in directory: + print(first, last, directory[last,first]) + +This loop traverses the keys in directory, which are tuples. It assigns +the elements of each tuple to last and first, then prints the name and +corresponding telephone number. + +There are two ways to represent tuples in a state diagram. The more +detailed version shows the indices and elements just as they appear in a +list. For example, the tuple ``('Cleese', 'John')`` would appear as in +Figure [fig.tuple1]. + +.. figure:: figs/tuple1.pdf + :alt: State diagram. + + State diagram. + +But in a larger diagram you might want to leave out the details. For +example, a diagram of the telephone directory might appear as in +Figure [fig.dict2]. + +.. figure:: figs/dict2.pdf + :alt: State diagram. + + State diagram. + +Here the tuples are shown using Python syntax as a graphical shorthand. +The telephone number in the diagram is the complaints line for the BBC, +so please don’t call it. + +Sequences of sequences +---------------------- + +I have focused on lists of tuples, but almost all of the examples in +this chapter also work with lists of lists, tuples of tuples, and tuples +of lists. To avoid enumerating the possible combinations, it is +sometimes easier to talk about sequences of sequences. + +In many contexts, the different kinds of sequences (strings, lists and +tuples) can be used interchangeably. So how should you choose one over +the others? + +To start with the obvious, strings are more limited than other sequences +because the elements have to be characters. They are also immutable. If +you need the ability to change the characters in a string (as opposed to +creating a new string), you might want to use a list of characters +instead. + +Lists are more common than tuples, mostly because they are mutable. But +there are a few cases where you might prefer tuples: + +#. In some contexts, like a return statement, it is syntactically + simpler to create a tuple than a list. + +#. If you want to use a sequence as a dictionary key, you have to use an + immutable type like a tuple or string. + +#. If you are passing a sequence as an argument to a function, using + tuples reduces the potential for unexpected behavior due to aliasing. + +Because tuples are immutable, they don’t provide methods like sort and +reverse, which modify existing lists. But Python provides the built-in +function sorted, which takes any sequence and returns a new list with +the same elements in sorted order, and reversed, which takes a sequence +and returns an iterator that traverses the list in reverse order. + +Debugging +--------- + +Lists, dictionaries and tuples are examples of **data structures**; in +this chapter we are starting to see compound data structures, like lists +of tuples, or dictionaries that contain tuples as keys and lists as +values. Compound data structures are useful, but they are prone to what +I call **shape errors**; that is, errors caused when a data structure +has the wrong type, size, or structure. For example, if you are +expecting a list with one integer and I give you a plain old integer +(not in a list), it won’t work. + +To help debug these kinds of errors, I have written a module called +structshape that provides a function, also called structshape, that +takes any kind of data structure as an argument and returns a string +that summarizes its shape. You can download it from +http://thinkpython2.com/code/structshape.py + +Here’s the result for a simple list: + +:: + + >>> from structshape import structshape + >>> t = [1, 2, 3] + >>> structshape(t) + 'list of 3 int' + +A fancier program might write “list of 3 int\ *s*”, but it was easier +not to deal with plurals. Here’s a list of lists: + +:: + + >>> t2 = [[1,2], [3,4], [5,6]] + >>> structshape(t2) + 'list of 3 list of 2 int' + +If the elements of the list are not the same type, structshape groups +them, in order, by type: + +:: + + >>> t3 = [1, 2, 3, 4.0, '5', '6', [7], [8], 9] + >>> structshape(t3) + 'list of (3 int, float, 2 str, 2 list of int, int)' + +Here’s a list of tuples: + +:: + + >>> s = 'abc' + >>> lt = list(zip(t, s)) + >>> structshape(lt) + 'list of 3 tuple of (int, str)' + +And here’s a dictionary with 3 items that map integers to strings. + +:: + + >>> d = dict(lt) + >>> structshape(d) + 'dict of 3 int->str' + +If you are having trouble keeping track of your data structures, +structshape can help. + +Glossary +-------- + +tuple: + An immutable sequence of elements. + +tuple assignment: + An assignment with a sequence on the right side and a tuple of + variables on the left. The right side is evaluated and then its + elements are assigned to the variables on the left. + +gather: + The operation of assembling a variable-length argument tuple. + +scatter: + The operation of treating a sequence as a list of arguments. + +zip object: + The result of calling a built-in function zip; an object that + iterates through a sequence of tuples. + +iterator: + An object that can iterate through a sequence, but which does not + provide list operators and methods. + +data structure: + A collection of related values, often organized in lists, + dictionaries, tuples, etc. + +shape error: + An error caused because a value has the wrong shape; that is, the + wrong type or size. + +Exercises +--------- + +Write a function called ``most_frequent`` that takes a string and prints +the letters in decreasing order of frequency. Find text samples from +several different languages and see how letter frequency varies between +languages. Compare your results with the tables at +http://en.wikipedia.org/wiki/Letter_frequencies. Solution: +http://thinkpython2.com/code/most_frequent.py. + +[anagrams] + +More anagrams! + +#. Write a program that reads a word list from a file (see + Section [wordlist]) and prints all the sets of words that are + anagrams. + + Here is an example of what the output might look like: + + :: + + ['deltas', 'desalt', 'lasted', 'salted', 'slated', 'staled'] + ['retainers', 'ternaries'] + ['generating', 'greatening'] + ['resmelts', 'smelters', 'termless'] + + Hint: you might want to build a dictionary that maps from a + collection of letters to a list of words that can be spelled with + those letters. The question is, how can you represent the collection + of letters in a way that can be used as a key? + +#. Modify the previous program so that it prints the longest list of + anagrams first, followed by the second longest, and so on. + +#. In Scrabble a “bingo” is when you play all seven tiles in your rack, + along with a letter on the board, to form an eight-letter word. What + collection of 8 letters forms the most possible bingos? Hint: there + are seven. + + Solution: http://thinkpython2.com/code/anagram_sets.py. + +Two words form a “metathesis pair” if you can transform one into the +other by swapping two letters; for example, “converse” and “conserve”. +Write a program that finds all of the metathesis pairs in the +dictionary. Hint: don’t test all pairs of words, and don’t test all +possible swaps. Solution: http://thinkpython2.com/code/metathesis.py. +Credit: This exercise is inspired by an example at http://puzzlers.org. + +Here’s another Car Talk Puzzler +(http://www.cartalk.com/content/puzzlers): + + What is the longest English word, that remains a valid English word, + as you remove its letters one at a time? + + Now, letters can be removed from either end, or the middle, but you + can’t rearrange any of the letters. Every time you drop a letter, + you wind up with another English word. If you do that, you’re + eventually going to wind up with one letter and that too is going to + be an English word—one that’s found in the dictionary. I want to + know what’s the longest word and how many letters does it have? + + I’m going to give you a little modest example: Sprite. Ok? You start + off with sprite, you take a letter off, one from the interior of the + word, take the r away, and we’re left with the word spite, then we + take the e off the end, we’re left with spit, we take the s off, + we’re left with pit, it, and I. + +Write a program to find all words that can be reduced in this way, and +then find the longest one. + +This exercise is a little more challenging than most, so here are some +suggestions: + +#. You might want to write a function that takes a word and computes a + list of all the words that can be formed by removing one letter. + These are the “children” of the word. + +#. Recursively, a word is reducible if any of its children are + reducible. As a base case, you can consider the empty string + reducible. + +#. The wordlist I provided, words.txt, doesn’t contain single letter + words. So you might want to add “I”, “a”, and the empty string. + +#. To improve the performance of your program, you might want to memoize + the words that are known to be reducible. + +Solution: http://thinkpython2.com/code/reducible.py. + +Case study: data structure selection +==================================== + +At this point you have learned about Python’s core data structures, and +you have seen some of the algorithms that use them. If you would like to +know more about algorithms, this might be a good time to read +Chapter [algorithms]. But you don’t have to read it before you go on; +you can read it whenever you are interested. + +This chapter presents a case study with exercises that let you think +about choosing data structures and practice using them. + +Word frequency analysis +----------------------- + +As usual, you should at least attempt the exercises before you read my +solutions. + +Write a program that reads a file, breaks each line into words, strips +whitespace and punctuation from the words, and converts them to +lowercase. + +Hint: The string module provides a string named whitespace, which +contains space, tab, newline, etc., and punctuation which contains the +punctuation characters. Let’s see if we can make Python swear: + +:: + + >>> import string + >>> string.punctuation + '!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~' + +Also, you might consider using the string methods strip, replace and +translate. + +Go to Project Gutenberg (http://gutenberg.org) and download your +favorite out-of-copyright book in plain text format. + +Modify your program from the previous exercise to read the book you +downloaded, skip over the header information at the beginning of the +file, and process the rest of the words as before. + +Then modify the program to count the total number of words in the book, +and the number of times each word is used. + +Print the number of different words used in the book. Compare different +books by different authors, written in different eras. Which author uses +the most extensive vocabulary? + +Modify the program from the previous exercise to print the 20 most +frequently used words in the book. + +Modify the previous program to read a word list (see Section [wordlist]) +and then print all the words in the book that are not in the word list. +How many of them are typos? How many of them are common words that +*should* be in the word list, and how many of them are really obscure? + +Random numbers +-------------- + +Given the same inputs, most computer programs generate the same outputs +every time, so they are said to be **deterministic**. Determinism is +usually a good thing, since we expect the same calculation to yield the +same result. For some applications, though, we want the computer to be +unpredictable. Games are an obvious example, but there are more. + +Making a program truly nondeterministic turns out to be difficult, but +there are ways to make it at least seem nondeterministic. One of them is +to use algorithms that generate **pseudorandom** numbers. Pseudorandom +numbers are not truly random because they are generated by a +deterministic computation, but just by looking at the numbers it is all +but impossible to distinguish them from random. + +The random module provides functions that generate pseudorandom numbers +(which I will simply call “random” from here on). + +The function random returns a random float between 0.0 and 1.0 +(including 0.0 but not 1.0). Each time you call random, you get the next +number in a long series. To see a sample, run this loop: + +:: + + import random + + for i in range(10): + x = random.random() + print(x) + +The function randint takes parameters low and high and returns an +integer between low and high (including both). + +:: + + >>> random.randint(5, 10) + 5 + >>> random.randint(5, 10) + 9 + +To choose an element from a sequence at random, you can use choice: + +:: + + >>> t = [1, 2, 3] + >>> random.choice(t) + 2 + >>> random.choice(t) + 3 + +The random module also provides functions to generate random values from +continuous distributions including Gaussian, exponential, gamma, and a +few more. + +Write a function named ``choose_from_hist`` that takes a histogram as +defined in Section [histogram] and returns a random value from the +histogram, chosen with probability in proportion to frequency. For +example, for this histogram: + +:: + + >>> t = ['a', 'a', 'b'] + >>> hist = histogram(t) + >>> hist + {'a': 2, 'b': 1} + +your function should return ``'a'`` with probability :math:`2/3` and +``'b'`` with probability :math:`1/3`. + +Word histogram +-------------- + +You should attempt the previous exercises before you go on. You can +download my solution from http://thinkpython2.com/code/analyze_book1.py. +You will also need http://thinkpython2.com/code/emma.txt. + +Here is a program that reads a file and builds a histogram of the words +in the file: + +:: + + import string + + def process_file(filename): + hist = dict() + fp = open(filename) + for line in fp: + process_line(line, hist) + return hist + + def process_line(line, hist): + line = line.replace('-', ' ') + + for word in line.split(): + word = word.strip(string.punctuation + string.whitespace) + word = word.lower() + hist[word] = hist.get(word, 0) + 1 + + hist = process_file('emma.txt') + +This program reads emma.txt, which contains the text of *Emma* by Jane +Austen. + +``process_file`` loops through the lines of the file, passing them one +at a time to ``process_line``. The histogram hist is being used as an +accumulator. + +``process_line`` uses the string method replace to replace hyphens with +spaces before using split to break the line into a list of strings. It +traverses the list of words and uses strip and lower to remove +punctuation and convert to lower case. (It is a shorthand to say that +strings are “converted”; remember that strings are immutable, so methods +like strip and lower return new strings.) + +Finally, ``process_line`` updates the histogram by creating a new item +or incrementing an existing one. + +To count the total number of words in the file, we can add up the +frequencies in the histogram: + +:: + + def total_words(hist): + return sum(hist.values()) + +The number of different words is just the number of items in the +dictionary: + +:: + + def different_words(hist): + return len(hist) + +Here is some code to print the results: + +:: + + print('Total number of words:', total_words(hist)) + print('Number of different words:', different_words(hist)) + +And the results: + +:: + + Total number of words: 161080 + Number of different words: 7214 + +Most common words +----------------- + +To find the most common words, we can make a list of tuples, where each +tuple contains a word and its frequency, and sort it. + +The following function takes a histogram and returns a list of +word-frequency tuples: + +:: + + def most_common(hist): + t = [] + for key, value in hist.items(): + t.append((value, key)) + + t.sort(reverse=True) + return t + +In each tuple, the frequency appears first, so the resulting list is +sorted by frequency. Here is a loop that prints the ten most common +words: + +:: + + t = most_common(hist) + print('The most common words are:') + for freq, word in t[:10]: + print(word, freq, sep='\t') + +I use the keyword argument sep to tell print to use a tab character as a +“separator”, rather than a space, so the second column is lined up. Here +are the results from *Emma*: + +:: + + The most common words are: + to 5242 + the 5205 + and 4897 + of 4295 + i 3191 + a 3130 + it 2529 + her 2483 + was 2400 + she 2364 + +This code can be simplified using the key parameter of the sort +function. If you are curious, you can read about it at +https://wiki.python.org/moin/HowTo/Sorting. + +Optional parameters +------------------- + +We have seen built-in functions and methods that take optional +arguments. It is possible to write programmer-defined functions with +optional arguments, too. For example, here is a function that prints the +most common words in a histogram + +:: + + def print_most_common(hist, num=10): + t = most_common(hist) + print('The most common words are:') + for freq, word in t[:num]: + print(word, freq, sep='\t') + +The first parameter is required; the second is optional. The **default +value** of num is 10. + +If you only provide one argument: + +:: + + print_most_common(hist) + +num gets the default value. If you provide two arguments: + +:: + + print_most_common(hist, 20) + +num gets the value of the argument instead. In other words, the optional +argument **overrides** the default value. + +If a function has both required and optional parameters, all the +required parameters have to come first, followed by the optional ones. + +Dictionary subtraction +---------------------- + +Finding the words from the book that are not in the word list from +words.txt is a problem you might recognize as set subtraction; that is, +we want to find all the words from one set (the words in the book) that +are not in the other (the words in the list). + +subtract takes dictionaries d1 and d2 and returns a new dictionary that +contains all the keys from d1 that are not in d2. Since we don’t really +care about the values, we set them all to None. + +:: + + def subtract(d1, d2): + res = dict() + for key in d1: + if key not in d2: + res[key] = None + return res + +To find the words in the book that are not in words.txt, we can use +``process_file`` to build a histogram for words.txt, and then subtract: + +:: + + words = process_file('words.txt') + diff = subtract(hist, words) + + print("Words in the book that aren't in the word list:") + for word in diff.keys(): + print(word, end=' ') + +Here are some of the results from *Emma*: + +:: + + Words in the book that aren't in the word list: + rencontre jane's blanche woodhouses disingenuousness + friend's venice apartment ... + +Some of these words are names and possessives. Others, like “rencontre”, +are no longer in common use. But a few are common words that should +really be in the list! + +Python provides a data structure called set that provides many common +set operations. You can read about them in Section [sets], or read the +documentation at +http://docs.python.org/3/library/stdtypes.html#types-set. + +Write a program that uses set subtraction to find words in the book that +are not in the word list. Solution: +http://thinkpython2.com/code/analyze_book2.py. + +Random words +------------ + +To choose a random word from the histogram, the simplest algorithm is to +build a list with multiple copies of each word, according to the +observed frequency, and then choose from the list: + +:: + + def random_word(h): + t = [] + for word, freq in h.items(): + t.extend([word] * freq) + + return random.choice(t) + +The expression \* freq creates a list with freq copies of the string +word. The extend method is similar to append except that the argument is +a sequence. + +This algorithm works, but it is not very efficient; each time you choose +a random word, it rebuilds the list, which is as big as the original +book. An obvious improvement is to build the list once and then make +multiple selections, but the list is still big. + +An alternative is: + +#. Use keys to get a list of the words in the book. + +#. Build a list that contains the cumulative sum of the word frequencies + (see Exercise [cumulative]). The last item in this list is the total + number of words in the book, :math:`n`. + +#. Choose a random number from 1 to :math:`n`. Use a bisection search + (See Exercise [bisection]) to find the index where the random number + would be inserted in the cumulative sum. + +#. Use the index to find the corresponding word in the word list. + +[randhist] + +Write a program that uses this algorithm to choose a random word from +the book. Solution: http://thinkpython2.com/code/analyze_book3.py. + +Markov analysis +--------------- + +If you choose words from the book at random, you can get a sense of the +vocabulary, but you probably won’t get a sentence: + +:: + + this the small regard harriet which knightley's it most things + +A series of random words seldom makes sense because there is no +relationship between successive words. For example, in a real sentence +you would expect an article like “the” to be followed by an adjective or +a noun, and probably not a verb or adverb. + +One way to measure these kinds of relationships is Markov analysis, +which characterizes, for a given sequence of words, the probability of +the words that might come next. For example, the song *Eric, the Half a +Bee* begins: + + | Half a bee, philosophically, + | Must, ipso facto, half not be. + | But half the bee has got to be + | Vis a vis, its entity. D’you see? + | But can a bee be said to be + | Or not to be an entire bee + | When half the bee is not a bee + | Due to some ancient injury? + +In this text, the phrase “half the” is always followed by the word +“bee”, but the phrase “the bee” might be followed by either “has” or +“is”. + +The result of Markov analysis is a mapping from each prefix (like “half +the” and “the bee”) to all possible suffixes (like “has” and “is”). + +Given this mapping, you can generate a random text by starting with any +prefix and choosing at random from the possible suffixes. Next, you can +combine the end of the prefix and the new suffix to form the next +prefix, and repeat. + +For example, if you start with the prefix “Half a”, then the next word +has to be “bee”, because the prefix only appears once in the text. The +next prefix is “a bee”, so the next suffix might be “philosophically”, +“be” or “due”. + +In this example the length of the prefix is always two, but you can do +Markov analysis with any prefix length. + +Markov analysis: + +#. Write a program to read a text from a file and perform Markov + analysis. The result should be a dictionary that maps from prefixes + to a collection of possible suffixes. The collection might be a list, + tuple, or dictionary; it is up to you to make an appropriate choice. + You can test your program with prefix length two, but you should + write the program in a way that makes it easy to try other lengths. + +#. Add a function to the previous program to generate random text based + on the Markov analysis. Here is an example from *Emma* with prefix + length 2: + + He was very clever, be it sweetness or be angry, ashamed or only + amused, at such a stroke. She had never thought of Hannah till + you were never meant for me?“ ”I cannot make speeches, Emma:" he + soon cut it all himself. + + For this example, I left the punctuation attached to the words. The + result is almost syntactically correct, but not quite. Semantically, + it almost makes sense, but not quite. + + What happens if you increase the prefix length? Does the random text + make more sense? + +#. Once your program is working, you might want to try a mash-up: if you + combine text from two or more books, the random text you generate + will blend the vocabulary and phrases from the sources in interesting + ways. + +Credit: This case study is based on an example from Kernighan and Pike, +*The Practice of Programming*, Addison-Wesley, 1999. + +You should attempt this exercise before you go on; then you can can +download my solution from http://thinkpython2.com/code/markov.py. You +will also need http://thinkpython2.com/code/emma.txt. + +Data structures +--------------- + +Using Markov analysis to generate random text is fun, but there is also +a point to this exercise: data structure selection. In your solution to +the previous exercises, you had to choose: + +- How to represent the prefixes. + +- How to represent the collection of possible suffixes. + +- How to represent the mapping from each prefix to the collection of + possible suffixes. + +The last one is easy: a dictionary is the obvious choice for a mapping +from keys to corresponding values. + +For the prefixes, the most obvious options are string, list of strings, +or tuple of strings. + +For the suffixes, one option is a list; another is a histogram +(dictionary). + +How should you choose? The first step is to think about the operations +you will need to implement for each data structure. For the prefixes, we +need to be able to remove words from the beginning and add to the end. +For example, if the current prefix is “Half a”, and the next word is +“bee”, you need to be able to form the next prefix, “a bee”. + +Your first choice might be a list, since it is easy to add and remove +elements, but we also need to be able to use the prefixes as keys in a +dictionary, so that rules out lists. With tuples, you can’t append or +remove, but you can use the addition operator to form a new tuple: + +:: + + def shift(prefix, word): + return prefix[1:] + (word,) + +shift takes a tuple of words, prefix, and a string, word, and forms a +new tuple that has all the words in prefix except the first, and word +added to the end. + +For the collection of suffixes, the operations we need to perform +include adding a new suffix (or increasing the frequency of an existing +one), and choosing a random suffix. + +Adding a new suffix is equally easy for the list implementation or the +histogram. Choosing a random element from a list is easy; choosing from +a histogram is harder to do efficiently (see Exercise [randhist]). + +So far we have been talking mostly about ease of implementation, but +there are other factors to consider in choosing data structures. One is +run time. Sometimes there is a theoretical reason to expect one data +structure to be faster than other; for example, I mentioned that the in +operator is faster for dictionaries than for lists, at least when the +number of elements is large. + +But often you don’t know ahead of time which implementation will be +faster. One option is to implement both of them and see which is better. +This approach is called **benchmarking**. A practical alternative is to +choose the data structure that is easiest to implement, and then see if +it is fast enough for the intended application. If so, there is no need +to go on. If not, there are tools, like the profile module, that can +identify the places in a program that take the most time. + +The other factor to consider is storage space. For example, using a +histogram for the collection of suffixes might take less space because +you only have to store each word once, no matter how many times it +appears in the text. In some cases, saving space can also make your +program run faster, and in the extreme, your program might not run at +all if you run out of memory. But for many applications, space is a +secondary consideration after run time. + +One final thought: in this discussion, I have implied that we should use +one data structure for both analysis and generation. But since these are +separate phases, it would also be possible to use one structure for +analysis and then convert to another structure for generation. This +would be a net win if the time saved during generation exceeded the time +spent in conversion. + +Debugging +--------- + +When you are debugging a program, and especially if you are working on a +hard bug, there are five things to try: + +Reading: + Examine your code, read it back to yourself, and check that it says + what you meant to say. + +Running: + Experiment by making changes and running different versions. Often + if you display the right thing at the right place in the program, + the problem becomes obvious, but sometimes you have to build + scaffolding. + +Ruminating: + Take some time to think! What kind of error is it: syntax, runtime, + or semantic? What information can you get from the error messages, + or from the output of the program? What kind of error could cause + the problem you’re seeing? What did you change last, before the + problem appeared? + +Rubberducking: + If you explain the problem to someone else, you sometimes find the + answer before you finish asking the question. Often you don’t need + the other person; you could just talk to a rubber duck. And that’s + the origin of the well-known strategy called **rubber duck + debugging**. I am not making this up; see + https://en.wikipedia.org/wiki/Rubber_duck_debugging. + +Retreating: + At some point, the best thing to do is back off, undoing recent + changes, until you get back to a program that works and that you + understand. Then you can start rebuilding. + +Beginning programmers sometimes get stuck on one of these activities and +forget the others. Each activity comes with its own failure mode. + +For example, reading your code might help if the problem is a +typographical error, but not if the problem is a conceptual +misunderstanding. If you don’t understand what your program does, you +can read it 100 times and never see the error, because the error is in +your head. + +Running experiments can help, especially if you run small, simple tests. +But if you run experiments without thinking or reading your code, you +might fall into a pattern I call “random walk programming”, which is the +process of making random changes until the program does the right thing. +Needless to say, random walk programming can take a long time. + +You have to take time to think. Debugging is like an experimental +science. You should have at least one hypothesis about what the problem +is. If there are two or more possibilities, try to think of a test that +would eliminate one of them. + +But even the best debugging techniques will fail if there are too many +errors, or if the code you are trying to fix is too big and complicated. +Sometimes the best option is to retreat, simplifying the program until +you get to something that works and that you understand. + +Beginning programmers are often reluctant to retreat because they can’t +stand to delete a line of code (even if it’s wrong). If it makes you +feel better, copy your program into another file before you start +stripping it down. Then you can copy the pieces back one at a time. + +Finding a hard bug requires reading, running, ruminating, and sometimes +retreating. If you get stuck on one of these activities, try the others. + +Glossary +-------- + +deterministic: + Pertaining to a program that does the same thing each time it runs, + given the same inputs. + +pseudorandom: + Pertaining to a sequence of numbers that appears to be random, but + is generated by a deterministic program. + +default value: + The value given to an optional parameter if no argument is provided. + +override: + To replace a default value with an argument. + +benchmarking: + The process of choosing between data structures by implementing + alternatives and testing them on a sample of the possible inputs. + +rubber duck debugging: + Debugging by explaining your problem to an inanimate object such as + a rubber duck. Articulating the problem can help you solve it, even + if the rubber duck doesn’t know Python. + +Exercises +--------- + +The “rank” of a word is its position in a list of words sorted by +frequency: the most common word has rank 1, the second most common has +rank 2, etc. + +Zipf’s law describes a relationship between the ranks and frequencies of +words in natural languages (http://en.wikipedia.org/wiki/Zipf's_law). +Specifically, it predicts that the frequency, :math:`f`, of the word +with rank :math:`r` is: + +.. math:: f = c r^{-s} + +where :math:`s` and :math:`c` are parameters that depend on the language +and the text. If you take the logarithm of both sides of this equation, +you get: + +.. math:: \log f = \log c - s \log r + +So if you plot log :math:`f` versus log :math:`r`, you should get a +straight line with slope :math:`-s` and intercept log :math:`c`. + +Write a program that reads a text from a file, counts word frequencies, +and prints one line for each word, in descending order of frequency, +with log :math:`f` and log :math:`r`. Use the graphing program of your +choice to plot the results and check whether they form a straight line. +Can you estimate the value of :math:`s`? + +Solution: http://thinkpython2.com/code/zipf.py. To run my solution, you +need the plotting module matplotlib. If you installed Anaconda, you +already have matplotlib; otherwise you might have to install it. + +Files +===== + +This chapter introduces the idea of “persistent” programs that keep data +in permanent storage, and shows how to use different kinds of permanent +storage, like files and databases. + +Persistence +----------- + +Most of the programs we have seen so far are transient in the sense that +they run for a short time and produce some output, but when they end, +their data disappears. If you run the program again, it starts with a +clean slate. + +Other programs are **persistent**: they run for a long time (or all the +time); they keep at least some of their data in permanent storage (a +hard drive, for example); and if they shut down and restart, they pick +up where they left off. + +Examples of persistent programs are operating systems, which run pretty +much whenever a computer is on, and web servers, which run all the time, +waiting for requests to come in on the network. + +One of the simplest ways for programs to maintain their data is by +reading and writing text files. We have already seen programs that read +text files; in this chapter we will see programs that write them. + +An alternative is to store the state of the program in a database. In +this chapter I will present a simple database and a module, pickle, that +makes it easy to store program data. + +Reading and writing +------------------- + +A text file is a sequence of characters stored on a permanent medium +like a hard drive, flash memory, or CD-ROM. We saw how to open and read +a file in Section [wordlist]. + +To write a file, you have to open it with mode ``'w'`` as a second +parameter: + +:: + + >>> fout = open('output.txt', 'w') + +If the file already exists, opening it in write mode clears out the old +data and starts fresh, so be careful! If the file doesn’t exist, a new +one is created. + +open returns a file object that provides methods for working with the +file. The write method puts data into the file. + +:: + + >>> line1 = "This here's the wattle,\n" + >>> fout.write(line1) + 24 + +The return value is the number of characters that were written. The file +object keeps track of where it is, so if you call write again, it adds +the new data to the end of the file. + +:: + + >>> line2 = "the emblem of our land.\n" + >>> fout.write(line2) + 24 + +When you are done writing, you should close the file. + +:: + + >>> fout.close() + +If you don’t close the file, it gets closed for you when the program +ends. + +Format operator +--------------- + +The argument of write has to be a string, so if we want to put other +values in a file, we have to convert them to strings. The easiest way to +do that is with str: + +:: + + >>> x = 52 + >>> fout.write(str(x)) + +An alternative is to use the **format operator**, %. When applied to +integers, % is the modulus operator. But when the first operand is a +string, % is the format operator. + +The first operand is the **format string**, which contains one or more +**format sequences**, which specify how the second operand is formatted. +The result is a string. + +For example, the format sequence ``'%d'`` means that the second operand +should be formatted as a decimal integer: + +:: + + >>> camels = 42 + >>> '%d' % camels + '42' + +The result is the string ``'42'``, which is not to be confused with the +integer value 42. + +A format sequence can appear anywhere in the string, so you can embed a +value in a sentence: + +:: + + >>> 'I have spotted %d camels.' % camels + 'I have spotted 42 camels.' + +If there is more than one format sequence in the string, the second +argument has to be a tuple. Each format sequence is matched with an +element of the tuple, in order. + +The following example uses ``'%d'`` to format an integer, ``'%g'`` to +format a floating-point number, and ``'%s'`` to format a string: + +:: + + >>> 'In %d years I have spotted %g %s.' % (3, 0.1, 'camels') + 'In 3 years I have spotted 0.1 camels.' + +The number of elements in the tuple has to match the number of format +sequences in the string. Also, the types of the elements have to match +the format sequences: + +:: + + >>> '%d %d %d' % (1, 2) + TypeError: not enough arguments for format string + >>> '%d' % 'dollars' + TypeError: %d format: a number is required, not str + +In the first example, there aren’t enough elements; in the second, the +element is the wrong type. + +For more information on the format operator, see +https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting. +A more powerful alternative is the string format method, which you can +read about at +https://docs.python.org/3/library/stdtypes.html#str.format. + +Filenames and paths +------------------- + +Files are organized into **directories** (also called “folders”). Every +running program has a “current directory”, which is the default +directory for most operations. For example, when you open a file for +reading, Python looks for it in the current directory. + +The os module provides functions for working with files and directories +(“os” stands for “operating system”). os.getcwd returns the name of the +current directory: + +:: + + >>> import os + >>> cwd = os.getcwd() + >>> cwd + '/home/dinsdale' + +cwd stands for “current working directory”. The result in this example +is /home/dinsdale, which is the home directory of a user named dinsdale. + +A string like ``'/home/dinsdale'`` that identifies a file or directory +is called a **path**. + +A simple filename, like memo.txt is also considered a path, but it is a +**relative path** because it relates to the current directory. If the +current directory is /home/dinsdale, the filename memo.txt would refer +to /home/dinsdale/memo.txt. + +A path that begins with / does not depend on the current directory; it +is called an **absolute path**. To find the absolute path to a file, you +can use os.path.abspath: + +:: + + >>> os.path.abspath('memo.txt') + '/home/dinsdale/memo.txt' + +os.path provides other functions for working with filenames and paths. +For example, os.path.exists checks whether a file or directory exists: + +:: + + >>> os.path.exists('memo.txt') + True + +If it exists, os.path.isdir checks whether it’s a directory: + +:: + + >>> os.path.isdir('memo.txt') + False + >>> os.path.isdir('/home/dinsdale') + True + +Similarly, os.path.isfile checks whether it’s a file. + +os.listdir returns a list of the files (and other directories) in the +given directory: + +:: + + >>> os.listdir(cwd) + ['music', 'photos', 'memo.txt'] + +To demonstrate these functions, the following example “walks” through a +directory, prints the names of all the files, and calls itself +recursively on all the directories. + +:: + + def walk(dirname): + for name in os.listdir(dirname): + path = os.path.join(dirname, name) + + if os.path.isfile(path): + print(path) + else: + walk(path) + +os.path.join takes a directory and a file name and joins them into a +complete path. + +The os module provides a function called walk that is similar to this +one but more versatile. As an exercise, read the documentation and use +it to print the names of the files in a given directory and its +subdirectories. You can download my solution from +http://thinkpython2.com/code/walk.py. + +Catching exceptions +------------------- + +A lot of things can go wrong when you try to read and write files. If +you try to open a file that doesn’t exist, you get an IOError: + +:: + + >>> fin = open('bad_file') + IOError: [Errno 2] No such file or directory: 'bad_file' + +If you don’t have permission to access a file: + +:: + + >>> fout = open('/etc/passwd', 'w') + PermissionError: [Errno 13] Permission denied: '/etc/passwd' + +And if you try to open a directory for reading, you get + +:: + + >>> fin = open('/home') + IsADirectoryError: [Errno 21] Is a directory: '/home' + +To avoid these errors, you could use functions like os.path.exists and +os.path.isfile, but it would take a lot of time and code to check all +the possibilities (if “Errno 21” is any indication, there are at least +21 things that can go wrong). + +It is better to go ahead and try—and deal with problems if they +happen—which is exactly what the try statement does. The syntax is +similar to an if...else statement: + +:: + + try: + fin = open('bad_file') + except: + print('Something went wrong.') + +Python starts by executing the try clause. If all goes well, it skips +the except clause and proceeds. If an exception occurs, it jumps out of +the try clause and runs the except clause. + +Handling an exception with a try statement is called **catching** an +exception. In this example, the except clause prints an error message +that is not very helpful. In general, catching an exception gives you a +chance to fix the problem, or try again, or at least end the program +gracefully. + +Databases +--------- + +A **database** is a file that is organized for storing data. Many +databases are organized like a dictionary in the sense that they map +from keys to values. The biggest difference between a database and a +dictionary is that the database is on disk (or other permanent storage), +so it persists after the program ends. + +The module dbm provides an interface for creating and updating database +files. As an example, I’ll create a database that contains captions for +image files. + +Opening a database is similar to opening other files: + +:: + + >>> import dbm + >>> db = dbm.open('captions', 'c') + +The mode ``'c'`` means that the database should be created if it doesn’t +already exist. The result is a database object that can be used (for +most operations) like a dictionary. + +When you create a new item, dbm updates the database file. + +:: + + >>> db['cleese.png'] = 'Photo of John Cleese.' + +When you access one of the items, dbm reads the file: + +:: + + >>> db['cleese.png'] + b'Photo of John Cleese.' + +The result is a **bytes object**, which is why it begins with b. A bytes +object is similar to a string in many ways. When you get farther into +Python, the difference becomes important, but for now we can ignore it. + +If you make another assignment to an existing key, dbm replaces the old +value: + +:: + + >>> db['cleese.png'] = 'Photo of John Cleese doing a silly walk.' + >>> db['cleese.png'] + b'Photo of John Cleese doing a silly walk.' + +Some dictionary methods, like keys and items, don’t work with database +objects. But iteration with a for loop works: + +:: + + for key in db: + print(key, db[key]) + +As with other files, you should close the database when you are done: + +:: + + >>> db.close() + +Pickling +-------- + +A limitation of dbm is that the keys and values have to be strings or +bytes. If you try to use any other type, you get an error. + +The pickle module can help. It translates almost any type of object into +a string suitable for storage in a database, and then translates strings +back into objects. + +pickle.dumps takes an object as a parameter and returns a string +representation (dumps is short for “dump string”): + +:: + + >>> import pickle + >>> t = [1, 2, 3] + >>> pickle.dumps(t) + b'\x80\x03]q\x00(K\x01K\x02K\x03e.' + +The format isn’t obvious to human readers; it is meant to be easy for +pickle to interpret. pickle.loads (“load string”) reconstitutes the +object: + +:: + + >>> t1 = [1, 2, 3] + >>> s = pickle.dumps(t1) + >>> t2 = pickle.loads(s) + >>> t2 + [1, 2, 3] + +Although the new object has the same value as the old, it is not (in +general) the same object: + +:: + + >>> t1 == t2 + True + >>> t1 is t2 + False + +In other words, pickling and then unpickling has the same effect as +copying the object. + +You can use pickle to store non-strings in a database. In fact, this +combination is so common that it has been encapsulated in a module +called shelve. + +Pipes +----- + +Most operating systems provide a command-line interface, also known as a +**shell**. Shells usually provide commands to navigate the file system +and launch applications. For example, in Unix you can change directories +with cd, display the contents of a directory with ls, and launch a web +browser by typing (for example) firefox. + +Any program that you can launch from the shell can also be launched from +Python using a **pipe object**, which represents a running program. + +For example, the Unix command ls -l normally displays the contents of +the current directory in long format. You can launch ls with +os.popen [1]_: + +:: + + >>> cmd = 'ls -l' + >>> fp = os.popen(cmd) + +The argument is a string that contains a shell command. The return value +is an object that behaves like an open file. You can read the output +from the ls process one line at a time with readline or get the whole +thing at once with read: + +:: + + >>> res = fp.read() + +When you are done, you close the pipe like a file: + +:: + + >>> stat = fp.close() + >>> print(stat) + None + +The return value is the final status of the ls process; None means that +it ended normally (with no errors). + +For example, most Unix systems provide a command called md5sum that +reads the contents of a file and computes a “checksum”. You can read +about MD5 at http://en.wikipedia.org/wiki/Md5. This command provides an +efficient way to check whether two files have the same contents. The +probability that different contents yield the same checksum is very +small (that is, unlikely to happen before the universe collapses). + +You can use a pipe to run md5sum from Python and get the result: + +:: + + >>> filename = 'book.tex' + >>> cmd = 'md5sum ' + filename + >>> fp = os.popen(cmd) + >>> res = fp.read() + >>> stat = fp.close() + >>> print(res) + 1e0033f0ed0656636de0d75144ba32e0 book.tex + >>> print(stat) + None + +Writing modules +--------------- + +Any file that contains Python code can be imported as a module. For +example, suppose you have a file named wc.py with the following code: + +:: + + def linecount(filename): + count = 0 + for line in open(filename): + count += 1 + return count + + print(linecount('wc.py')) + +If you run this program, it reads itself and prints the number of lines +in the file, which is 7. You can also import it like this: + +:: + + >>> import wc + 7 + +Now you have a module object wc: + +:: + + >>> wc + + +The module object provides ``linecount``: + +:: + + >>> wc.linecount('wc.py') + 7 + +So that’s how you write modules in Python. + +The only problem with this example is that when you import the module it +runs the test code at the bottom. Normally when you import a module, it +defines new functions but it doesn’t run them. + +Programs that will be imported as modules often use the following idiom: + +:: + + if __name__ == '__main__': + print(linecount('wc.py')) + +``__name__`` is a built-in variable that is set when the program starts. +If the program is running as a script, ``__name__`` has the value +``'__main__'``; in that case, the test code runs. Otherwise, if the +module is being imported, the test code is skipped. + +As an exercise, type this example into a file named wc.py and run it as +a script. Then run the Python interpreter and import wc. What is the +value of ``__name__`` when the module is being imported? + +Warning: If you import a module that has already been imported, Python +does nothing. It does not re-read the file, even if it has changed. + +If you want to reload a module, you can use the built-in function +reload, but it can be tricky, so the safest thing to do is restart the +interpreter and then import the module again. + +Debugging +--------- + +When you are reading and writing files, you might run into problems with +whitespace. These errors can be hard to debug because spaces, tabs and +newlines are normally invisible: + +:: + + >>> s = '1 2\t 3\n 4' + >>> print(s) + 1 2 3 + 4 + +The built-in function repr can help. It takes any object as an argument +and returns a string representation of the object. For strings, it +represents whitespace characters with backslash sequences: + +:: + + >>> print(repr(s)) + '1 2\t 3\n 4' + +This can be helpful for debugging. + +One other problem you might run into is that different systems use +different characters to indicate the end of a line. Some systems use a +newline, represented ``\n``. Others use a return character, represented +``\r``. Some use both. If you move files between different systems, +these inconsistencies can cause problems. + +For most systems, there are applications to convert from one format to +another. You can find them (and read more about this issue) at +http://en.wikipedia.org/wiki/Newline. Or, of course, you could write one +yourself. + +Glossary +-------- + +persistent: + Pertaining to a program that runs indefinitely and keeps at least + some of its data in permanent storage. + +format operator: + An operator, %, that takes a format string and a tuple and generates + a string that includes the elements of the tuple formatted as + specified by the format string. + +format string: + A string, used with the format operator, that contains format + sequences. + +format sequence: + A sequence of characters in a format string, like %d, that specifies + how a value should be formatted. + +text file: + A sequence of characters stored in permanent storage like a hard + drive. + +directory: + A named collection of files, also called a folder. + +path: + A string that identifies a file. + +relative path: + A path that starts from the current directory. + +absolute path: + A path that starts from the topmost directory in the file system. + +catch: + To prevent an exception from terminating a program using the try and + except statements. + +database: + A file whose contents are organized like a dictionary with keys that + correspond to values. + +bytes object: + An object similar to a string. + +shell: + A program that allows users to type commands and then executes them + by starting other programs. + +pipe object: + An object that represents a running program, allowing a Python + program to run commands and read the results. + +Exercises +--------- + +Write a function called sed that takes as arguments a pattern string, a +replacement string, and two filenames; it should read the first file and +write the contents into the second file (creating it if necessary). If +the pattern string appears anywhere in the file, it should be replaced +with the replacement string. + +If an error occurs while opening, reading, writing or closing files, +your program should catch the exception, print an error message, and +exit. Solution: http://thinkpython2.com/code/sed.py. + +If you download my solution to Exercise [anagrams] from +http://thinkpython2.com/code/anagram_sets.py, you’ll see that it creates +a dictionary that maps from a sorted string of letters to the list of +words that can be spelled with those letters. For example, ``'opst'`` +maps to the list ``['opts', 'post', 'pots', 'spot', 'stop', 'tops']``. + +Write a module that imports ``anagram_sets`` and provides two new +functions: ``store_anagrams`` should store the anagram dictionary in a +“shelf”; ``read_anagrams`` should look up a word and return a list of +its anagrams. Solution: http://thinkpython2.com/code/anagram_db.py. + +[checksum] + +In a large collection of MP3 files, there may be more than one copy of +the same song, stored in different directories or with different file +names. The goal of this exercise is to search for duplicates. + +#. Write a program that searches a directory and all of its + subdirectories, recursively, and returns a list of complete paths for + all files with a given suffix (like .mp3). Hint: os.path provides + several useful functions for manipulating file and path names. + +#. To recognize duplicates, you can use md5sum to compute a “checksum” + for each files. If two files have the same checksum, they probably + have the same contents. + +#. To double-check, you can use the Unix command diff. + +Solution: http://thinkpython2.com/code/find_duplicates.py. + +Classes and objects +=================== + +At this point you know how to use functions to organize code and +built-in types to organize data. The next step is to learn +“object-oriented programming”, which uses programmer-defined types to +organize both code and data. Object-oriented programming is a big topic; +it will take a few chapters to get there. + +Code examples from this chapter are available from +http://thinkpython2.com/code/Point1.py; solutions to the exercises are +available from http://thinkpython2.com/code/Point1_soln.py. + +Programmer-defined types +------------------------ + +We have used many of Python’s built-in types; now we are going to define +a new type. As an example, we will create a type called Point that +represents a point in two-dimensional space. + +In mathematical notation, points are often written in parentheses with a +comma separating the coordinates. For example, :math:`(0,0)` represents +the origin, and :math:`(x,y)` represents the point :math:`x` units to +the right and :math:`y` units up from the origin. + +There are several ways we might represent points in Python: + +- We could store the coordinates separately in two variables, x and y. + +- We could store the coordinates as elements in a list or tuple. + +- We could create a new type to represent points as objects. + +Creating a new type is more complicated than the other options, but it +has advantages that will be apparent soon. + +A programmer-defined type is also called a **class**. A class definition +looks like this: + +:: + + class Point: + """Represents a point in 2-D space.""" + +The header indicates that the new class is called Point. The body is a +docstring that explains what the class is for. You can define variables +and methods inside a class definition, but we will get back to that +later. + +Defining a class named Point creates a **class object**. + +:: + + >>> Point + + +Because Point is defined at the top level, its “full name” is +``__main__.Point``. + +The class object is like a factory for creating objects. To create a +Point, you call Point as if it were a function. + +:: + + >>> blank = Point() + >>> blank + <__main__.Point object at 0xb7e9d3ac> + +The return value is a reference to a Point object, which we assign to +blank. + +Creating a new object is called **instantiation**, and the object is an +**instance** of the class. + +When you print an instance, Python tells you what class it belongs to +and where it is stored in memory (the prefix 0x means that the following +number is in hexadecimal). + +Every object is an instance of some class, so “object” and “instance” +are interchangeable. But in this chapter I use “instance” to indicate +that I am talking about a programmer-defined type. + +Attributes +---------- + +You can assign values to an instance using dot notation: + +:: + + >>> blank.x = 3.0 + >>> blank.y = 4.0 + +This syntax is similar to the syntax for selecting a variable from a +module, such as math.pi or string.whitespace. In this case, though, we +are assigning values to named elements of an object. These elements are +called **attributes**. + +As a noun, “AT-trib-ute” is pronounced with emphasis on the first +syllable, as opposed to “a-TRIB-ute”, which is a verb. + +The following diagram shows the result of these assignments. A state +diagram that shows an object and its attributes is called an **object +diagram**; see Figure [fig.point]. + +.. figure:: figs/point.pdf + :alt: Object diagram. + + Object diagram. + +The variable blank refers to a Point object, which contains two +attributes. Each attribute refers to a floating-point number. + +You can read the value of an attribute using the same syntax: + +:: + + >>> blank.y + 4.0 + >>> x = blank.x + >>> x + 3.0 + +The expression blank.x means, “Go to the object blank refers to and get +the value of x.” In the example, we assign that value to a variable +named x. There is no conflict between the variable x and the attribute +x. + +You can use dot notation as part of any expression. For example: + +:: + + >>> '(%g, %g)' % (blank.x, blank.y) + '(3.0, 4.0)' + >>> distance = math.sqrt(blank.x**2 + blank.y**2) + >>> distance + 5.0 + +You can pass an instance as an argument in the usual way. For example: + +:: + + def print_point(p): + print('(%g, %g)' % (p.x, p.y)) + +``print_point`` takes a point as an argument and displays it in +mathematical notation. To invoke it, you can pass blank as an argument: + +:: + + >>> print_point(blank) + (3.0, 4.0) + +Inside the function, p is an alias for blank, so if the function +modifies p, blank changes. + +As an exercise, write a function called ``distance_between_points`` that +takes two Points as arguments and returns the distance between them. + +Rectangles +---------- + +Sometimes it is obvious what the attributes of an object should be, but +other times you have to make decisions. For example, imagine you are +designing a class to represent rectangles. What attributes would you use +to specify the location and size of a rectangle? You can ignore angle; +to keep things simple, assume that the rectangle is either vertical or +horizontal. + +There are at least two possibilities: + +- You could specify one corner of the rectangle (or the center), the + width, and the height. + +- You could specify two opposing corners. + +At this point it is hard to say whether either is better than the other, +so we’ll implement the first one, just as an example. + +Here is the class definition: + +:: + + class Rectangle: + """Represents a rectangle. + + attributes: width, height, corner. + """ + +The docstring lists the attributes: width and height are numbers; corner +is a Point object that specifies the lower-left corner. + +To represent a rectangle, you have to instantiate a Rectangle object and +assign values to the attributes: + +:: + + box = Rectangle() + box.width = 100.0 + box.height = 200.0 + box.corner = Point() + box.corner.x = 0.0 + box.corner.y = 0.0 + +The expression box.corner.x means, “Go to the object box refers to and +select the attribute named corner; then go to that object and select the +attribute named x.” + +.. figure:: figs/rectangle.pdf + :alt: Object diagram. + + Object diagram. + +Figure [fig.rectangle] shows the state of this object. An object that is +an attribute of another object is **embedded**. + +Instances as return values +-------------------------- + +Functions can return instances. For example, ``find_center`` takes a +Rectangle as an argument and returns a Point that contains the +coordinates of the center of the Rectangle: + +:: + + def find_center(rect): + p = Point() + p.x = rect.corner.x + rect.width/2 + p.y = rect.corner.y + rect.height/2 + return p + +Here is an example that passes box as an argument and assigns the +resulting Point to center: + +:: + + >>> center = find_center(box) + >>> print_point(center) + (50, 100) + +Objects are mutable +------------------- + +You can change the state of an object by making an assignment to one of +its attributes. For example, to change the size of a rectangle without +changing its position, you can modify the values of width and height: + +:: + + box.width = box.width + 50 + box.height = box.height + 100 + +You can also write functions that modify objects. For example, +``grow_rectangle`` takes a Rectangle object and two numbers, dwidth and +dheight, and adds the numbers to the width and height of the rectangle: + +:: + + def grow_rectangle(rect, dwidth, dheight): + rect.width += dwidth + rect.height += dheight + +Here is an example that demonstrates the effect: + +:: + + >>> box.width, box.height + (150.0, 300.0) + >>> grow_rectangle(box, 50, 100) + >>> box.width, box.height + (200.0, 400.0) + +Inside the function, rect is an alias for box, so when the function +modifies rect, box changes. + +As an exercise, write a function named ``move_rectangle`` that takes a +Rectangle and two numbers named dx and dy. It should change the location +of the rectangle by adding dx to the x coordinate of corner and adding +dy to the y coordinate of corner. + +Copying +------- + +Aliasing can make a program difficult to read because changes in one +place might have unexpected effects in another place. It is hard to keep +track of all the variables that might refer to a given object. + +Copying an object is often an alternative to aliasing. The copy module +contains a function called copy that can duplicate any object: + +:: + + >>> p1 = Point() + >>> p1.x = 3.0 + >>> p1.y = 4.0 + + >>> import copy + >>> p2 = copy.copy(p1) + +p1 and p2 contain the same data, but they are not the same Point. + +:: + + >>> print_point(p1) + (3, 4) + >>> print_point(p2) + (3, 4) + >>> p1 is p2 + False + >>> p1 == p2 + False + +The is operator indicates that p1 and p2 are not the same object, which +is what we expected. But you might have expected == to yield True +because these points contain the same data. In that case, you will be +disappointed to learn that for instances, the default behavior of the == +operator is the same as the is operator; it checks object identity, not +object equivalence. That’s because for programmer-defined types, Python +doesn’t know what should be considered equivalent. At least, not yet. + +If you use copy.copy to duplicate a Rectangle, you will find that it +copies the Rectangle object but not the embedded Point. + +:: + + >>> box2 = copy.copy(box) + >>> box2 is box + False + >>> box2.corner is box.corner + True + +.. figure:: figs/rectangle2.pdf + :alt: Object diagram. + + Object diagram. + +Figure [fig.rectangle2] shows what the object diagram looks like. This +operation is called a **shallow copy** because it copies the object and +any references it contains, but not the embedded objects. + +For most applications, this is not what you want. In this example, +invoking ``grow_rectangle`` on one of the Rectangles would not affect +the other, but invoking ``move_rectangle`` on either would affect both! +This behavior is confusing and error-prone. + +Fortunately, the copy module provides a method named deepcopy that +copies not only the object but also the objects it refers to, and the +objects *they* refer to, and so on. You will not be surprised to learn +that this operation is called a **deep copy**. + +:: + + >>> box3 = copy.deepcopy(box) + >>> box3 is box + False + >>> box3.corner is box.corner + False + +box3 and box are completely separate objects. + +As an exercise, write a version of ``move_rectangle`` that creates and +returns a new Rectangle instead of modifying the old one. + +Debugging +--------- + +When you start working with objects, you are likely to encounter some +new exceptions. If you try to access an attribute that doesn’t exist, +you get an AttributeError: + +:: + + >>> p = Point() + >>> p.x = 3 + >>> p.y = 4 + >>> p.z + AttributeError: Point instance has no attribute 'z' + +If you are not sure what type an object is, you can ask: + +:: + + >>> type(p) + + +You can also use isinstance to check whether an object is an instance of +a class: + +:: + + >>> isinstance(p, Point) + True + +If you are not sure whether an object has a particular attribute, you +can use the built-in function hasattr: + +:: + + >>> hasattr(p, 'x') + True + >>> hasattr(p, 'z') + False + +The first argument can be any object; the second argument is a *string* +that contains the name of the attribute. + +You can also use a try statement to see if the object has the attributes +you need: + +:: + + try: + x = p.x + except AttributeError: + x = 0 + +This approach can make it easier to write functions that work with +different types; more on that topic is coming up in +Section [polymorphism]. + +Glossary +-------- + +class: + A programmer-defined type. A class definition creates a new class + object. + +class object: + An object that contains information about a programmer-defined type. + The class object can be used to create instances of the type. + +instance: + An object that belongs to a class. + +instantiate: + To create a new object. + +attribute: + One of the named values associated with an object. + +embedded object: + An object that is stored as an attribute of another object. + +shallow copy: + To copy the contents of an object, including any references to + embedded objects; implemented by the copy function in the copy + module. + +deep copy: + To copy the contents of an object as well as any embedded objects, + and any objects embedded in them, and so on; implemented by the + deepcopy function in the copy module. + +object diagram: + A diagram that shows objects, their attributes, and the values of + the attributes. + +Exercises +--------- + +Write a definition for a class named Circle with attributes center and +radius, where center is a Point object and radius is a number. + +Instantiate a Circle object that represents a circle with its center at +:math:`(150, 100)` and radius 75. + +Write a function named ``point_in_circle`` that takes a Circle and a +Point and returns True if the Point lies in or on the boundary of the +circle. + +Write a function named ``rect_in_circle`` that takes a Circle and a +Rectangle and returns True if the Rectangle lies entirely in or on the +boundary of the circle. + +Write a function named ``rect_circle_overlap`` that takes a Circle and a +Rectangle and returns True if any of the corners of the Rectangle fall +inside the circle. Or as a more challenging version, return True if any +part of the Rectangle falls inside the circle. + +Solution: http://thinkpython2.com/code/Circle.py. + +Write a function called ``draw_rect`` that takes a Turtle object and a +Rectangle and uses the Turtle to draw the Rectangle. See +Chapter [turtlechap] for examples using Turtle objects. + +Write a function called ``draw_circle`` that takes a Turtle and a Circle +and draws the Circle. + +Solution: http://thinkpython2.com/code/draw.py. + +Classes and functions +===================== + +Now that we know how to create new types, the next step is to write +functions that take programmer-defined objects as parameters and return +them as results. In this chapter I also present “functional programming +style” and two new program development plans. + +Code examples from this chapter are available from +http://thinkpython2.com/code/Time1.py. Solutions to the exercises are at +http://thinkpython2.com/code/Time1_soln.py. + +Time +---- + +As another example of a programmer-defined type, we’ll define a class +called Time that records the time of day. The class definition looks +like this: + +:: + + class Time: + """Represents the time of day. + + attributes: hour, minute, second + """ + +We can create a new Time object and assign attributes for hours, +minutes, and seconds: + +:: + + time = Time() + time.hour = 11 + time.minute = 59 + time.second = 30 + +The state diagram for the Time object looks like Figure [fig.time]. + +As an exercise, write a function called ``print_time`` that takes a Time +object and prints it in the form hour:minute:second. Hint: the format +sequence ``'%.2d'`` prints an integer using at least two digits, +including a leading zero if necessary. + +Write a boolean function called ``is_after`` that takes two Time +objects, t1 and t2, and returns True if t1 follows t2 chronologically +and False otherwise. Challenge: don’t use an if statement. + +.. figure:: figs/time.pdf + :alt: Object diagram. + + Object diagram. + +Pure functions +-------------- + +In the next few sections, we’ll write two functions that add time +values. They demonstrate two kinds of functions: pure functions and +modifiers. They also demonstrate a development plan I’ll call +**prototype and patch**, which is a way of tackling a complex problem by +starting with a simple prototype and incrementally dealing with the +complications. + +Here is a simple prototype of ``add_time``: + +:: + + def add_time(t1, t2): + sum = Time() + sum.hour = t1.hour + t2.hour + sum.minute = t1.minute + t2.minute + sum.second = t1.second + t2.second + return sum + +The function creates a new Time object, initializes its attributes, and +returns a reference to the new object. This is called a **pure +function** because it does not modify any of the objects passed to it as +arguments and it has no effect, like displaying a value or getting user +input, other than returning a value. + +To test this function, I’ll create two Time objects: start contains the +start time of a movie, like *Monty Python and the Holy Grail*, and +duration contains the run time of the movie, which is one hour 35 +minutes. + +``add_time`` figures out when the movie will be done. + +:: + + >>> start = Time() + >>> start.hour = 9 + >>> start.minute = 45 + >>> start.second = 0 + + >>> duration = Time() + >>> duration.hour = 1 + >>> duration.minute = 35 + >>> duration.second = 0 + + >>> done = add_time(start, duration) + >>> print_time(done) + 10:80:00 + +The result, 10:80:00 might not be what you were hoping for. The problem +is that this function does not deal with cases where the number of +seconds or minutes adds up to more than sixty. When that happens, we +have to “carry” the extra seconds into the minute column or the extra +minutes into the hour column. + +Here’s an improved version: + +:: + + def add_time(t1, t2): + sum = Time() + sum.hour = t1.hour + t2.hour + sum.minute = t1.minute + t2.minute + sum.second = t1.second + t2.second + + if sum.second >= 60: + sum.second -= 60 + sum.minute += 1 + + if sum.minute >= 60: + sum.minute -= 60 + sum.hour += 1 + + return sum + +Although this function is correct, it is starting to get big. We will +see a shorter alternative later. + +Modifiers +--------- + +Sometimes it is useful for a function to modify the objects it gets as +parameters. In that case, the changes are visible to the caller. +Functions that work this way are called **modifiers**. + +increment, which adds a given number of seconds to a Time object, can be +written naturally as a modifier. Here is a rough draft: + +:: + + def increment(time, seconds): + time.second += seconds + + if time.second >= 60: + time.second -= 60 + time.minute += 1 + + if time.minute >= 60: + time.minute -= 60 + time.hour += 1 + +The first line performs the basic operation; the remainder deals with +the special cases we saw before. + +Is this function correct? What happens if seconds is much greater than +sixty? + +In that case, it is not enough to carry once; we have to keep doing it +until time.second is less than sixty. One solution is to replace the if +statements with while statements. That would make the function correct, +but not very efficient. As an exercise, write a correct version of +increment that doesn’t contain any loops. + +Anything that can be done with modifiers can also be done with pure +functions. In fact, some programming languages only allow pure +functions. There is some evidence that programs that use pure functions +are faster to develop and less error-prone than programs that use +modifiers. But modifiers are convenient at times, and functional +programs tend to be less efficient. + +In general, I recommend that you write pure functions whenever it is +reasonable and resort to modifiers only if there is a compelling +advantage. This approach might be called a **functional programming +style**. + +As an exercise, write a “pure” version of increment that creates and +returns a new Time object rather than modifying the parameter. + +Prototyping versus planning +--------------------------- + +The development plan I am demonstrating is called “prototype and patch”. +For each function, I wrote a prototype that performed the basic +calculation and then tested it, patching errors along the way. + +This approach can be effective, especially if you don’t yet have a deep +understanding of the problem. But incremental corrections can generate +code that is unnecessarily complicated—since it deals with many special +cases—and unreliable—since it is hard to know if you have found all the +errors. + +An alternative is **designed development**, in which high-level insight +into the problem can make the programming much easier. In this case, the +insight is that a Time object is really a three-digit number in base 60 +(see http://en.wikipedia.org/wiki/Sexagesimal.)! The second attribute is +the “ones column”, the minute attribute is the “sixties column”, and the +hour attribute is the “thirty-six hundreds column”. + +When we wrote ``add_time`` and increment, we were effectively doing +addition in base 60, which is why we had to carry from one column to the +next. + +This observation suggests another approach to the whole problem—we can +convert Time objects to integers and take advantage of the fact that the +computer knows how to do integer arithmetic. + +Here is a function that converts Times to integers: + +:: + + def time_to_int(time): + minutes = time.hour * 60 + time.minute + seconds = minutes * 60 + time.second + return seconds + +And here is a function that converts an integer to a Time (recall that +divmod divides the first argument by the second and returns the quotient +and remainder as a tuple). + +:: + + def int_to_time(seconds): + time = Time() + minutes, time.second = divmod(seconds, 60) + time.hour, time.minute = divmod(minutes, 60) + return time + +You might have to think a bit, and run some tests, to convince yourself +that these functions are correct. One way to test them is to check that +``time_to_int(int_to_time(x)) == x`` for many values of x. This is an +example of a consistency check. + +Once you are convinced they are correct, you can use them to rewrite +``add_time``: + +:: + + def add_time(t1, t2): + seconds = time_to_int(t1) + time_to_int(t2) + return int_to_time(seconds) + +This version is shorter than the original, and easier to verify. As an +exercise, rewrite increment using ``time_to_int`` and ``int_to_time``. + +In some ways, converting from base 60 to base 10 and back is harder than +just dealing with times. Base conversion is more abstract; our intuition +for dealing with time values is better. + +But if we have the insight to treat times as base 60 numbers and make +the investment of writing the conversion functions (``time_to_int`` and +``int_to_time``), we get a program that is shorter, easier to read and +debug, and more reliable. + +It is also easier to add features later. For example, imagine +subtracting two Times to find the duration between them. The naive +approach would be to implement subtraction with borrowing. Using the +conversion functions would be easier and more likely to be correct. + +Ironically, sometimes making a problem harder (or more general) makes it +easier (because there are fewer special cases and fewer opportunities +for error). + +Debugging +--------- + +A Time object is well-formed if the values of minute and second are +between 0 and 60 (including 0 but not 60) and if hour is positive. hour +and minute should be integral values, but we might allow second to have +a fraction part. + +Requirements like these are called **invariants** because they should +always be true. To put it a different way, if they are not true, +something has gone wrong. + +Writing code to check invariants can help detect errors and find their +causes. For example, you might have a function like ``valid_time`` that +takes a Time object and returns False if it violates an invariant: + +:: + + def valid_time(time): + if time.hour < 0 or time.minute < 0 or time.second < 0: + return False + if time.minute >= 60 or time.second >= 60: + return False + return True + +At the beginning of each function you could check the arguments to make +sure they are valid: + +:: + + def add_time(t1, t2): + if not valid_time(t1) or not valid_time(t2): + raise ValueError('invalid Time object in add_time') + seconds = time_to_int(t1) + time_to_int(t2) + return int_to_time(seconds) + +Or you could use an **assert statement**, which checks a given invariant +and raises an exception if it fails: + +:: + + def add_time(t1, t2): + assert valid_time(t1) and valid_time(t2) + seconds = time_to_int(t1) + time_to_int(t2) + return int_to_time(seconds) + +assert statements are useful because they distinguish code that deals +with normal conditions from code that checks for errors. + +Glossary +-------- + +prototype and patch: + A development plan that involves writing a rough draft of a program, + testing, and correcting errors as they are found. + +designed development: + A development plan that involves high-level insight into the problem + and more planning than incremental development or prototype + development. + +pure function: + A function that does not modify any of the objects it receives as + arguments. Most pure functions are fruitful. + +modifier: + A function that changes one or more of the objects it receives as + arguments. Most modifiers are void; that is, they return None. + +functional programming style: + A style of program design in which the majority of functions are + pure. + +invariant: + A condition that should always be true during the execution of a + program. + +assert statement: + A statement that check a condition and raises an exception if it + fails. + +Exercises +--------- + +Code examples from this chapter are available from +http://thinkpython2.com/code/Time1.py; solutions to the exercises are +available from http://thinkpython2.com/code/Time1_soln.py. + +Write a function called ``mul_time`` that takes a Time object and a +number and returns a new Time object that contains the product of the +original Time and the number. + +Then use ``mul_time`` to write a function that takes a Time object that +represents the finishing time in a race, and a number that represents +the distance, and returns a Time object that represents the average pace +(time per mile). + +The datetime module provides time objects that are similar to the Time +objects in this chapter, but they provide a rich set of methods and +operators. Read the documentation at +http://docs.python.org/3/library/datetime.html. + +#. Use the datetime module to write a program that gets the current date + and prints the day of the week. + +#. Write a program that takes a birthday as input and prints the user’s + age and the number of days, hours, minutes and seconds until their + next birthday. + +#. For two people born on different days, there is a day when one is + twice as old as the other. That’s their Double Day. Write a program + that takes two birthdays and computes their Double Day. + +#. For a little more challenge, write the more general version that + computes the day when one person is :math:`n` times older than the + other. + +Solution: http://thinkpython2.com/code/double.py + +Classes and methods +=================== + +Although we are using some of Python’s object-oriented features, the +programs from the last two chapters are not really object-oriented +because they don’t represent the relationships between +programmer-defined types and the functions that operate on them. The +next step is to transform those functions into methods that make the +relationships explicit. + +Code examples from this chapter are available from +http://thinkpython2.com/code/Time2.py, and solutions to the exercises +are in http://thinkpython2.com/code/Point2_soln.py. + +Object-oriented features +------------------------ + +Python is an **object-oriented programming language**, which means that +it provides features that support object-oriented programming, which has +these defining characteristics: + +- Programs include class and method definitions. + +- Most of the computation is expressed in terms of operations on + objects. + +- Objects often represent things in the real world, and methods often + correspond to the ways things in the real world interact. + +For example, the Time class defined in Chapter [time] corresponds to the +way people record the time of day, and the functions we defined +correspond to the kinds of things people do with times. Similarly, the +Point and Rectangle classes in Chapter [clobjects] correspond to the +mathematical concepts of a point and a rectangle. + +So far, we have not taken advantage of the features Python provides to +support object-oriented programming. These features are not strictly +necessary; most of them provide alternative syntax for things we have +already done. But in many cases, the alternative is more concise and +more accurately conveys the structure of the program. + +For example, in Time1.py there is no obvious connection between the +class definition and the function definitions that follow. With some +examination, it is apparent that every function takes at least one Time +object as an argument. + +This observation is the motivation for **methods**; a method is a +function that is associated with a particular class. We have seen +methods for strings, lists, dictionaries and tuples. In this chapter, we +will define methods for programmer-defined types. + +Methods are semantically the same as functions, but there are two +syntactic differences: + +- Methods are defined inside a class definition in order to make the + relationship between the class and the method explicit. + +- The syntax for invoking a method is different from the syntax for + calling a function. + +In the next few sections, we will take the functions from the previous +two chapters and transform them into methods. This transformation is +purely mechanical; you can do it by following a sequence of steps. If +you are comfortable converting from one form to another, you will be +able to choose the best form for whatever you are doing. + +Printing objects +---------------- + +In Chapter [time], we defined a class named Time and in +Section [isafter], you wrote a function named ``print_time``: + +:: + + class Time: + """Represents the time of day.""" + + def print_time(time): + print('%.2d:%.2d:%.2d' % (time.hour, time.minute, time.second)) + +To call this function, you have to pass a Time object as an argument: + +:: + + >>> start = Time() + >>> start.hour = 9 + >>> start.minute = 45 + >>> start.second = 00 + >>> print_time(start) + 09:45:00 + +To make ``print_time`` a method, all we have to do is move the function +definition inside the class definition. Notice the change in +indentation. + +:: + + class Time: + def print_time(time): + print('%.2d:%.2d:%.2d' % (time.hour, time.minute, time.second)) + +Now there are two ways to call ``print_time``. The first (and less +common) way is to use function syntax: + +:: + + >>> Time.print_time(start) + 09:45:00 + +In this use of dot notation, Time is the name of the class, and +``print_time`` is the name of the method. start is passed as a +parameter. + +The second (and more concise) way is to use method syntax: + +:: + + >>> start.print_time() + 09:45:00 + +In this use of dot notation, ``print_time`` is the name of the method +(again), and start is the object the method is invoked on, which is +called the **subject**. Just as the subject of a sentence is what the +sentence is about, the subject of a method invocation is what the method +is about. + +Inside the method, the subject is assigned to the first parameter, so in +this case start is assigned to time. + +By convention, the first parameter of a method is called self, so it +would be more common to write ``print_time`` like this: + +:: + + class Time: + def print_time(self): + print('%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second)) + +The reason for this convention is an implicit metaphor: + +- The syntax for a function call, ``print_time(start)``, suggests that + the function is the active agent. It says something like, “Hey + ``print_time``! Here’s an object for you to print.” + +- In object-oriented programming, the objects are the active agents. A + method invocation like ``start.print_time()`` says “Hey start! Please + print yourself.” + +This change in perspective might be more polite, but it is not obvious +that it is useful. In the examples we have seen so far, it may not be. +But sometimes shifting responsibility from the functions onto the +objects makes it possible to write more versatile functions (or +methods), and makes it easier to maintain and reuse code. + +As an exercise, rewrite ``time_to_int`` (from Section [prototype]) as a +method. You might be tempted to rewrite ``int_to_time`` as a method, +too, but that doesn’t really make sense because there would be no object +to invoke it on. + +Another example +--------------- + +Here’s a version of increment (from Section [increment]) rewritten as a +method: + +:: + + # inside class Time: + + def increment(self, seconds): + seconds += self.time_to_int() + return int_to_time(seconds) + +This version assumes that ``time_to_int`` is written as a method. Also, +note that it is a pure function, not a modifier. + +Here’s how you would invoke increment: + +:: + + >>> start.print_time() + 09:45:00 + >>> end = start.increment(1337) + >>> end.print_time() + 10:07:17 + +The subject, start, gets assigned to the first parameter, self. The +argument, 1337, gets assigned to the second parameter, seconds. + +This mechanism can be confusing, especially if you make an error. For +example, if you invoke increment with two arguments, you get: + +:: + + >>> end = start.increment(1337, 460) + TypeError: increment() takes 2 positional arguments but 3 were given + +The error message is initially confusing, because there are only two +arguments in parentheses. But the subject is also considered an +argument, so all together that’s three. + +By the way, a **positional argument** is an argument that doesn’t have a +parameter name; that is, it is not a keyword argument. In this function +call: + +:: + + sketch(parrot, cage, dead=True) + +parrot and cage are positional, and dead is a keyword argument. + +A more complicated example +-------------------------- + +Rewriting ``is_after`` (from Section [isafter]) is slightly more +complicated because it takes two Time objects as parameters. In this +case it is conventional to name the first parameter self and the second +parameter other: + +:: + + # inside class Time: + + def is_after(self, other): + return self.time_to_int() > other.time_to_int() + +To use this method, you have to invoke it on one object and pass the +other as an argument: + +:: + + >>> end.is_after(start) + True + +One nice thing about this syntax is that it almost reads like English: +“end is after start?” + +The init method +--------------- + +The init method (short for “initialization”) is a special method that +gets invoked when an object is instantiated. Its full name is +``__init__`` (two underscore characters, followed by init, and then two +more underscores). An init method for the Time class might look like +this: + +:: + + # inside class Time: + + def __init__(self, hour=0, minute=0, second=0): + self.hour = hour + self.minute = minute + self.second = second + +It is common for the parameters of ``__init__`` to have the same names +as the attributes. The statement + +:: + + self.hour = hour + +stores the value of the parameter hour as an attribute of self. + +The parameters are optional, so if you call Time with no arguments, you +get the default values. + +:: + + >>> time = Time() + >>> time.print_time() + 00:00:00 + +If you provide one argument, it overrides hour: + +:: + + >>> time = Time (9) + >>> time.print_time() + 09:00:00 + +If you provide two arguments, they override hour and minute. + +:: + + >>> time = Time(9, 45) + >>> time.print_time() + 09:45:00 + +And if you provide three arguments, they override all three default +values. + +As an exercise, write an init method for the Point class that takes x +and y as optional parameters and assigns them to the corresponding +attributes. + +The \_\_str\_\_ method +---------------------- + +``__str__`` is a special method, like ``__init__``, that is supposed to +return a string representation of an object. + +For example, here is a str method for Time objects: + +:: + + # inside class Time: + + def __str__(self): + return '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) + +When you print an object, Python invokes the str method: + +:: + + >>> time = Time(9, 45) + >>> print(time) + 09:45:00 + +When I write a new class, I almost always start by writing ``__init__``, +which makes it easier to instantiate objects, and ``__str__``, which is +useful for debugging. + +As an exercise, write a str method for the Point class. Create a Point +object and print it. + +Operator overloading +-------------------- + +By defining other special methods, you can specify the behavior of +operators on programmer-defined types. For example, if you define a +method named ``__add__`` for the Time class, you can use the + operator +on Time objects. + +Here is what the definition might look like: + +:: + + # inside class Time: + + def __add__(self, other): + seconds = self.time_to_int() + other.time_to_int() + return int_to_time(seconds) + +And here is how you could use it: + +:: + + >>> start = Time(9, 45) + >>> duration = Time(1, 35) + >>> print(start + duration) + 11:20:00 + +When you apply the + operator to Time objects, Python invokes +``__add__``. When you print the result, Python invokes ``__str__``. So +there is a lot happening behind the scenes! + +Changing the behavior of an operator so that it works with +programmer-defined types is called **operator overloading**. For every +operator in Python there is a corresponding special method, like +``__add__``. For more details, see +http://docs.python.org/3/reference/datamodel.html#specialnames. + +As an exercise, write an add method for the Point class. + +Type-based dispatch +------------------- + +In the previous section we added two Time objects, but you also might +want to add an integer to a Time object. The following is a version of +``__add__`` that checks the type of other and invokes either +``add_time`` or increment: + +:: + + # inside class Time: + + def __add__(self, other): + if isinstance(other, Time): + return self.add_time(other) + else: + return self.increment(other) + + def add_time(self, other): + seconds = self.time_to_int() + other.time_to_int() + return int_to_time(seconds) + + def increment(self, seconds): + seconds += self.time_to_int() + return int_to_time(seconds) + +The built-in function isinstance takes a value and a class object, and +returns True if the value is an instance of the class. + +If other is a Time object, ``__add__`` invokes ``add_time``. Otherwise +it assumes that the parameter is a number and invokes increment. This +operation is called a **type-based dispatch** because it dispatches the +computation to different methods based on the type of the arguments. + +Here are examples that use the + operator with different types: + +:: + + >>> start = Time(9, 45) + >>> duration = Time(1, 35) + >>> print(start + duration) + 11:20:00 + >>> print(start + 1337) + 10:07:17 + +Unfortunately, this implementation of addition is not commutative. If +the integer is the first operand, you get + +:: + + >>> print(1337 + start) + TypeError: unsupported operand type(s) for +: 'int' and 'instance' + +The problem is, instead of asking the Time object to add an integer, +Python is asking an integer to add a Time object, and it doesn’t know +how. But there is a clever solution for this problem: the special method +``__radd__``, which stands for “right-side add”. This method is invoked +when a Time object appears on the right side of the + operator. Here’s +the definition: + +:: + + # inside class Time: + + def __radd__(self, other): + return self.__add__(other) + +And here’s how it’s used: + +:: + + >>> print(1337 + start) + 10:07:17 + +As an exercise, write an add method for Points that works with either a +Point object or a tuple: + +- If the second operand is a Point, the method should return a new + Point whose :math:`x` coordinate is the sum of the :math:`x` + coordinates of the operands, and likewise for the :math:`y` + coordinates. + +- If the second operand is a tuple, the method should add the first + element of the tuple to the :math:`x` coordinate and the second + element to the :math:`y` coordinate, and return a new Point with the + result. + +Polymorphism +------------ + +Type-based dispatch is useful when it is necessary, but (fortunately) it +is not always necessary. Often you can avoid it by writing functions +that work correctly for arguments with different types. + +Many of the functions we wrote for strings also work for other sequence +types. For example, in Section [histogram] we used histogram to count +the number of times each letter appears in a word. + +:: + + def histogram(s): + d = dict() + for c in s: + if c not in d: + d[c] = 1 + else: + d[c] = d[c]+1 + return d + +This function also works for lists, tuples, and even dictionaries, as +long as the elements of s are hashable, so they can be used as keys in +d. + +:: + + >>> t = ['spam', 'egg', 'spam', 'spam', 'bacon', 'spam'] + >>> histogram(t) + {'bacon': 1, 'egg': 1, 'spam': 4} + +Functions that work with several types are called **polymorphic**. +Polymorphism can facilitate code reuse. For example, the built-in +function sum, which adds the elements of a sequence, works as long as +the elements of the sequence support addition. + +Since Time objects provide an add method, they work with sum: + +:: + + >>> t1 = Time(7, 43) + >>> t2 = Time(7, 41) + >>> t3 = Time(7, 37) + >>> total = sum([t1, t2, t3]) + >>> print(total) + 23:01:00 + +In general, if all of the operations inside a function work with a given +type, the function works with that type. + +The best kind of polymorphism is the unintentional kind, where you +discover that a function you already wrote can be applied to a type you +never planned for. + +Debugging +--------- + +It is legal to add attributes to objects at any point in the execution +of a program, but if you have objects with the same type that don’t have +the same attributes, it is easy to make mistakes. It is considered a +good idea to initialize all of an object’s attributes in the init +method. + +If you are not sure whether an object has a particular attribute, you +can use the built-in function hasattr (see Section [hasattr]). + +Another way to access attributes is the built-in function vars, which +takes an object and returns a dictionary that maps from attribute names +(as strings) to their values: + +:: + + >>> p = Point(3, 4) + >>> vars(p) + {'y': 4, 'x': 3} + +For purposes of debugging, you might find it useful to keep this +function handy: + +:: + + def print_attributes(obj): + for attr in vars(obj): + print(attr, getattr(obj, attr)) + +``print_attributes`` traverses the dictionary and prints each attribute +name and its corresponding value. + +The built-in function getattr takes an object and an attribute name (as +a string) and returns the attribute’s value. + +Interface and implementation +---------------------------- + +One of the goals of object-oriented design is to make software more +maintainable, which means that you can keep the program working when +other parts of the system change, and modify the program to meet new +requirements. + +A design principle that helps achieve that goal is to keep interfaces +separate from implementations. For objects, that means that the methods +a class provides should not depend on how the attributes are +represented. + +For example, in this chapter we developed a class that represents a time +of day. Methods provided by this class include ``time_to_int``, +``is_after``, and ``add_time``. + +We could implement those methods in several ways. The details of the +implementation depend on how we represent time. In this chapter, the +attributes of a Time object are hour, minute, and second. + +As an alternative, we could replace these attributes with a single +integer representing the number of seconds since midnight. This +implementation would make some methods, like ``is_after``, easier to +write, but it makes other methods harder. + +After you deploy a new class, you might discover a better +implementation. If other parts of the program are using your class, it +might be time-consuming and error-prone to change the interface. + +But if you designed the interface carefully, you can change the +implementation without changing the interface, which means that other +parts of the program don’t have to change. + +Glossary +-------- + +object-oriented language: + A language that provides features, such as programmer-defined types + and methods, that facilitate object-oriented programming. + +object-oriented programming: + A style of programming in which data and the operations that + manipulate it are organized into classes and methods. + +method: + A function that is defined inside a class definition and is invoked + on instances of that class. + +subject: + The object a method is invoked on. + +positional argument: + An argument that does not include a parameter name, so it is not a + keyword argument. + +operator overloading: + Changing the behavior of an operator like + so it works with a + programmer-defined type. + +type-based dispatch: + A programming pattern that checks the type of an operand and invokes + different functions for different types. + +polymorphic: + Pertaining to a function that can work with more than one type. + +information hiding: + The principle that the interface provided by an object should not + depend on its implementation, in particular the representation of + its attributes. + +Exercises +--------- + +Download the code from this chapter from +http://thinkpython2.com/code/Time2.py. Change the attributes of Time to +be a single integer representing seconds since midnight. Then modify the +methods (and the function ``int_to_time``) to work with the new +implementation. You should not have to modify the test code in main. +When you are done, the output should be the same as before. Solution: +http://thinkpython2.com/code/Time2_soln.py. + +[kangaroo] + +This exercise is a cautionary tale about one of the most common, and +difficult to find, errors in Python. Write a definition for a class +named Kangaroo with the following methods: + +#. An ``__init__`` method that initializes an attribute named + ``pouch_contents`` to an empty list. + +#. A method named ``put_in_pouch`` that takes an object of any type and + adds it to ``pouch_contents``. + +#. A ``__str__`` method that returns a string representation of the + Kangaroo object and the contents of the pouch. + +Test your code by creating two Kangaroo objects, assigning them to +variables named kanga and roo, and then adding roo to the contents of +kanga’s pouch. + +Download http://thinkpython2.com/code/BadKangaroo.py. It contains a +solution to the previous problem with one big, nasty bug. Find and fix +the bug. + +If you get stuck, you can download +http://thinkpython2.com/code/GoodKangaroo.py, which explains the problem +and demonstrates a solution. + +Inheritance +=========== + +The language feature most often associated with object-oriented +programming is **inheritance**. Inheritance is the ability to define a +new class that is a modified version of an existing class. In this +chapter I demonstrate inheritance using classes that represent playing +cards, decks of cards, and poker hands. + +If you don’t play poker, you can read about it at +http://en.wikipedia.org/wiki/Poker, but you don’t have to; I’ll tell you +what you need to know for the exercises. + +Code examples from this chapter are available from +http://thinkpython2.com/code/Card.py. + +Card objects +------------ + +There are fifty-two cards in a deck, each of which belongs to one of +four suits and one of thirteen ranks. The suits are Spades, Hearts, +Diamonds, and Clubs (in descending order in bridge). The ranks are Ace, +2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, and King. Depending on the game +that you are playing, an Ace may be higher than King or lower than 2. + +If we want to define a new object to represent a playing card, it is +obvious what the attributes should be: rank and suit. It is not as +obvious what type the attributes should be. One possibility is to use +strings containing words like ``'Spade'`` for suits and ``'Queen'`` for +ranks. One problem with this implementation is that it would not be easy +to compare cards to see which had a higher rank or suit. + +An alternative is to use integers to **encode** the ranks and suits. In +this context, “encode” means that we are going to define a mapping +between numbers and suits, or between numbers and ranks. This kind of +encoding is not meant to be a secret (that would be “encryption”). + +For example, this table shows the suits and the corresponding integer +codes: + ++------------+-------------------+-----+ +| Spades | :math:`\mapsto` | 3 | ++------------+-------------------+-----+ +| Hearts | :math:`\mapsto` | 2 | ++------------+-------------------+-----+ +| Diamonds | :math:`\mapsto` | 1 | ++------------+-------------------+-----+ +| Clubs | :math:`\mapsto` | 0 | ++------------+-------------------+-----+ + +This code makes it easy to compare cards; because higher suits map to +higher numbers, we can compare suits by comparing their codes. + +The mapping for ranks is fairly obvious; each of the numerical ranks +maps to the corresponding integer, and for face cards: + ++---------+-------------------+------+ +| Jack | :math:`\mapsto` | 11 | ++---------+-------------------+------+ +| Queen | :math:`\mapsto` | 12 | ++---------+-------------------+------+ +| King | :math:`\mapsto` | 13 | ++---------+-------------------+------+ + +I am using the :math:`\mapsto` symbol to make it clear that these +mappings are not part of the Python program. They are part of the +program design, but they don’t appear explicitly in the code. + +The class definition for Card looks like this: + +:: + + class Card: + """Represents a standard playing card.""" + + def __init__(self, suit=0, rank=2): + self.suit = suit + self.rank = rank + +As usual, the init method takes an optional parameter for each +attribute. The default card is the 2 of Clubs. + +To create a Card, you call Card with the suit and rank of the card you +want. + +:: + + queen_of_diamonds = Card(1, 12) + +Class attributes +---------------- + +In order to print Card objects in a way that people can easily read, we +need a mapping from the integer codes to the corresponding ranks and +suits. A natural way to do that is with lists of strings. We assign +these lists to **class attributes**: + +:: + + # inside class Card: + + suit_names = ['Clubs', 'Diamonds', 'Hearts', 'Spades'] + rank_names = [None, 'Ace', '2', '3', '4', '5', '6', '7', + '8', '9', '10', 'Jack', 'Queen', 'King'] + + def __str__(self): + return '%s of %s' % (Card.rank_names[self.rank], + Card.suit_names[self.suit]) + +Variables like ``suit_names`` and ``rank_names``, which are defined +inside a class but outside of any method, are called class attributes +because they are associated with the class object Card. + +This term distinguishes them from variables like suit and rank, which +are called **instance attributes** because they are associated with a +particular instance. + +Both kinds of attribute are accessed using dot notation. For example, in +``__str__``, self is a Card object, and self.rank is its rank. +Similarly, Card is a class object, and ``Card.rank_names`` is a list of +strings associated with the class. + +Every card has its own suit and rank, but there is only one copy of +``suit_names`` and ``rank_names``. + +Putting it all together, the expression ``Card.rank_names[self.rank]`` +means “use the attribute rank from the object self as an index into the +list ``rank_names`` from the class Card, and select the appropriate +string.” + +The first element of ``rank_names`` is None because there is no card +with rank zero. By including None as a place-keeper, we get a mapping +with the nice property that the index 2 maps to the string ``'2'``, and +so on. To avoid this tweak, we could have used a dictionary instead of a +list. + +With the methods we have so far, we can create and print cards: + +:: + + >>> card1 = Card(2, 11) + >>> print(card1) + Jack of Hearts + +.. figure:: figs/card1.pdf + :alt: Object diagram. + + Object diagram. + +Figure [fig.card1] is a diagram of the Card class object and one Card +instance. Card is a class object; its type is type. card1 is an instance +of Card, so its type is Card. To save space, I didn’t draw the contents +of ``suit_names`` and ``rank_names``. + +Comparing cards +--------------- + +For built-in types, there are relational operators (<, >, ==, etc.) that +compare values and determine when one is greater than, less than, or +equal to another. For programmer-defined types, we can override the +behavior of the built-in operators by providing a method named +``__lt__``, which stands for “less than”. + +``__lt__`` takes two parameters, self and other, and True if self is +strictly less than other. + +The correct ordering for cards is not obvious. For example, which is +better, the 3 of Clubs or the 2 of Diamonds? One has a higher rank, but +the other has a higher suit. In order to compare cards, you have to +decide whether rank or suit is more important. + +The answer might depend on what game you are playing, but to keep things +simple, we’ll make the arbitrary choice that suit is more important, so +all of the Spades outrank all of the Diamonds, and so on. + +With that decided, we can write ``__lt__``: + +:: + + # inside class Card: + + def __lt__(self, other): + # check the suits + if self.suit < other.suit: return True + if self.suit > other.suit: return False + + # suits are the same... check ranks + return self.rank < other.rank + +You can write this more concisely using tuple comparison: + +:: + + # inside class Card: + + def __lt__(self, other): + t1 = self.suit, self.rank + t2 = other.suit, other.rank + return t1 < t2 + +As an exercise, write an ``__lt__`` method for Time objects. You can use +tuple comparison, but you also might consider comparing integers. + +Decks +----- + +Now that we have Cards, the next step is to define Decks. Since a deck +is made up of cards, it is natural for each Deck to contain a list of +cards as an attribute. + +The following is a class definition for Deck. The init method creates +the attribute cards and generates the standard set of fifty-two cards: + +:: + + class Deck: + + def __init__(self): + self.cards = [] + for suit in range(4): + for rank in range(1, 14): + card = Card(suit, rank) + self.cards.append(card) + +The easiest way to populate the deck is with a nested loop. The outer +loop enumerates the suits from 0 to 3. The inner loop enumerates the +ranks from 1 to 13. Each iteration creates a new Card with the current +suit and rank, and appends it to self.cards. + +Printing the deck +----------------- + +Here is a ``__str__`` method for Deck: + +:: + + #inside class Deck: + + def __str__(self): + res = [] + for card in self.cards: + res.append(str(card)) + return '\n'.join(res) + +This method demonstrates an efficient way to accumulate a large string: +building a list of strings and then using the string method join. The +built-in function str invokes the ``__str__`` method on each card and +returns the string representation. + +Since we invoke join on a newline character, the cards are separated by +newlines. Here’s what the result looks like: + +:: + + >>> deck = Deck() + >>> print(deck) + Ace of Clubs + 2 of Clubs + 3 of Clubs + ... + 10 of Spades + Jack of Spades + Queen of Spades + King of Spades + +Even though the result appears on 52 lines, it is one long string that +contains newlines. + +Add, remove, shuffle and sort +----------------------------- + +To deal cards, we would like a method that removes a card from the deck +and returns it. The list method pop provides a convenient way to do +that: + +:: + + #inside class Deck: + + def pop_card(self): + return self.cards.pop() + +Since pop removes the *last* card in the list, we are dealing from the +bottom of the deck. + +To add a card, we can use the list method append: + +:: + + #inside class Deck: + + def add_card(self, card): + self.cards.append(card) + +A method like this that uses another method without doing much work is +sometimes called a **veneer**. The metaphor comes from woodworking, +where a veneer is a thin layer of good quality wood glued to the surface +of a cheaper piece of wood to improve the appearance. + +In this case ``add_card`` is a “thin” method that expresses a list +operation in terms appropriate for decks. It improves the appearance, or +interface, of the implementation. + +As another example, we can write a Deck method named shuffle using the +function shuffle from the random module: + +:: + + # inside class Deck: + + def shuffle(self): + random.shuffle(self.cards) + +Don’t forget to import random. + +As an exercise, write a Deck method named sort that uses the list method +sort to sort the cards in a Deck. sort uses the ``__lt__`` method we +defined to determine the order. + +Inheritance +----------- + +Inheritance is the ability to define a new class that is a modified +version of an existing class. As an example, let’s say we want a class +to represent a “hand”, that is, the cards held by one player. A hand is +similar to a deck: both are made up of a collection of cards, and both +require operations like adding and removing cards. + +A hand is also different from a deck; there are operations we want for +hands that don’t make sense for a deck. For example, in poker we might +compare two hands to see which one wins. In bridge, we might compute a +score for a hand in order to make a bid. + +This relationship between classes—similar, but different—lends itself to +inheritance. To define a new class that inherits from an existing class, +you put the name of the existing class in parentheses: + +:: + + class Hand(Deck): + """Represents a hand of playing cards.""" + +This definition indicates that Hand inherits from Deck; that means we +can use methods like ``pop_card`` and ``add_card`` for Hands as well as +Decks. + +When a new class inherits from an existing one, the existing one is +called the **parent** and the new class is called the **child**. + +In this example, Hand inherits ``__init__`` from Deck, but it doesn’t +really do what we want: instead of populating the hand with 52 new +cards, the init method for Hands should initialize cards with an empty +list. + +If we provide an init method in the Hand class, it overrides the one in +the Deck class: + +:: + + # inside class Hand: + + def __init__(self, label=''): + self.cards = [] + self.label = label + +When you create a Hand, Python invokes this init method, not the one in +Deck. + +:: + + >>> hand = Hand('new hand') + >>> hand.cards + [] + >>> hand.label + 'new hand' + +The other methods are inherited from Deck, so we can use ``pop_card`` +and ``add_card`` to deal a card: + +:: + + >>> deck = Deck() + >>> card = deck.pop_card() + >>> hand.add_card(card) + >>> print(hand) + King of Spades + +A natural next step is to encapsulate this code in a method called +``move_cards``: + +:: + + #inside class Deck: + + def move_cards(self, hand, num): + for i in range(num): + hand.add_card(self.pop_card()) + +``move_cards`` takes two arguments, a Hand object and the number of +cards to deal. It modifies both self and hand, and returns None. + +In some games, cards are moved from one hand to another, or from a hand +back to the deck. You can use ``move_cards`` for any of these +operations: self can be either a Deck or a Hand, and hand, despite the +name, can also be a Deck. + +Inheritance is a useful feature. Some programs that would be repetitive +without inheritance can be written more elegantly with it. Inheritance +can facilitate code reuse, since you can customize the behavior of +parent classes without having to modify them. In some cases, the +inheritance structure reflects the natural structure of the problem, +which makes the design easier to understand. + +On the other hand, inheritance can make programs difficult to read. When +a method is invoked, it is sometimes not clear where to find its +definition. The relevant code may be spread across several modules. +Also, many of the things that can be done using inheritance can be done +as well or better without it. + +Class diagrams +-------------- + +So far we have seen stack diagrams, which show the state of a program, +and object diagrams, which show the attributes of an object and their +values. These diagrams represent a snapshot in the execution of a +program, so they change as the program runs. + +They are also highly detailed; for some purposes, too detailed. A class +diagram is a more abstract representation of the structure of a program. +Instead of showing individual objects, it shows classes and the +relationships between them. + +There are several kinds of relationship between classes: + +- Objects in one class might contain references to objects in another + class. For example, each Rectangle contains a reference to a Point, + and each Deck contains references to many Cards. This kind of + relationship is called **HAS-A**, as in, “a Rectangle has a Point.” + +- One class might inherit from another. This relationship is called + **IS-A**, as in, “a Hand is a kind of a Deck.” + +- One class might depend on another in the sense that objects in one + class take objects in the second class as parameters, or use objects + in the second class as part of a computation. This kind of + relationship is called a **dependency**. + +A **class diagram** is a graphical representation of these +relationships. For example, Figure [fig.class1] shows the relationships +between Card, Deck and Hand. + +.. figure:: figs/class1.pdf + :alt: Class diagram. + + Class diagram. + +The arrow with a hollow triangle head represents an IS-A relationship; +in this case it indicates that Hand inherits from Deck. + +The standard arrow head represents a HAS-A relationship; in this case a +Deck has references to Card objects. + +The star () near the arrow head is a **multiplicity**; it indicates how +many Cards a Deck has. A multiplicity can be a simple number, like 52, a +range, like 5..7 or a star, which indicates that a Deck can have any +number of Cards. + +There are no dependencies in this diagram. They would normally be shown +with a dashed arrow. Or if there are a lot of dependencies, they are +sometimes omitted. + +A more detailed diagram might show that a Deck actually contains a +*list* of Cards, but built-in types like list and dict are usually not +included in class diagrams. + +Debugging +--------- + +Inheritance can make debugging difficult because when you invoke a +method on an object, it might be hard to figure out which method will be +invoked. + +Suppose you are writing a function that works with Hand objects. You +would like it to work with all kinds of Hands, like PokerHands, +BridgeHands, etc. If you invoke a method like shuffle, you might get the +one defined in Deck, but if any of the subclasses override this method, +you’ll get that version instead. This behavior is usually a good thing, +but it can be confusing. + +Any time you are unsure about the flow of execution through your +program, the simplest solution is to add print statements at the +beginning of the relevant methods. If Deck.shuffle prints a message that +says something like Running Deck.shuffle, then as the program runs it +traces the flow of execution. + +As an alternative, you could use this function, which takes an object +and a method name (as a string) and returns the class that provides the +definition of the method: + +:: + + def find_defining_class(obj, meth_name): + for ty in type(obj).mro(): + if meth_name in ty.__dict__: + return ty + +Here’s an example: + +:: + + >>> hand = Hand() + >>> find_defining_class(hand, 'shuffle') + + +So the shuffle method for this Hand is the one in Deck. + +``find_defining_class`` uses the mro method to get the list of class +objects (types) that will be searched for methods. “MRO” stands for +“method resolution order”, which is the sequence of classes Python +searches to “resolve” a method name. + +Here’s a design suggestion: when you override a method, the interface of +the new method should be the same as the old. It should take the same +parameters, return the same type, and obey the same preconditions and +postconditions. If you follow this rule, you will find that any function +designed to work with an instance of a parent class, like a Deck, will +also work with instances of child classes like a Hand and PokerHand. + +If you violate this rule, which is called the “Liskov substitution +principle”, your code will collapse like (sorry) a house of cards. + +Data encapsulation +------------------ + +The previous chapters demonstrate a development plan we might call +“object-oriented design”. We identified objects we needed—like Point, +Rectangle and Time—and defined classes to represent them. In each case +there is an obvious correspondence between the object and some entity in +the real world (or at least a mathematical world). + +But sometimes it is less obvious what objects you need and how they +should interact. In that case you need a different development plan. In +the same way that we discovered function interfaces by encapsulation and +generalization, we can discover class interfaces by **data +encapsulation**. + +Markov analysis, from Section [markov], provides a good example. If you +download my code from http://thinkpython2.com/code/markov.py, you’ll see +that it uses two global variables—\ ``suffix_map`` and ``prefix``—that +are read and written from several functions. + +:: + + suffix_map = {} + prefix = () + +Because these variables are global, we can only run one analysis at a +time. If we read two texts, their prefixes and suffixes would be added +to the same data structures (which makes for some interesting generated +text). + +To run multiple analyses, and keep them separate, we can encapsulate the +state of each analysis in an object. Here’s what that looks like: + +:: + + class Markov: + + def __init__(self): + self.suffix_map = {} + self.prefix = () + +Next, we transform the functions into methods. For example, here’s +``process_word``: + +:: + + def process_word(self, word, order=2): + if len(self.prefix) < order: + self.prefix += (word,) + return + + try: + self.suffix_map[self.prefix].append(word) + except KeyError: + # if there is no entry for this prefix, make one + self.suffix_map[self.prefix] = [word] + + self.prefix = shift(self.prefix, word) + +Transforming a program like this—changing the design without changing +the behavior—is another example of refactoring (see +Section [refactoring]). + +This example suggests a development plan for designing objects and +methods: + +#. Start by writing functions that read and write global variables (when + necessary). + +#. Once you get the program working, look for associations between + global variables and the functions that use them. + +#. Encapsulate related variables as attributes of an object. + +#. Transform the associated functions into methods of the new class. + +As an exercise, download my Markov code from +http://thinkpython2.com/code/markov.py, and follow the steps described +above to encapsulate the global variables as attributes of a new class +called Markov. Solution: http://thinkpython2.com/code/Markov.py (note +the capital M). + +Glossary +-------- + +encode: + To represent one set of values using another set of values by + constructing a mapping between them. + +class attribute: + An attribute associated with a class object. Class attributes are + defined inside a class definition but outside any method. + +instance attribute: + An attribute associated with an instance of a class. + +veneer: + A method or function that provides a different interface to another + function without doing much computation. + +inheritance: + The ability to define a new class that is a modified version of a + previously defined class. + +parent class: + The class from which a child class inherits. + +child class: + A new class created by inheriting from an existing class; also + called a “subclass”. + +IS-A relationship: + A relationship between a child class and its parent class. + +HAS-A relationship: + A relationship between two classes where instances of one class + contain references to instances of the other. + +dependency: + A relationship between two classes where instances of one class use + instances of the other class, but do not store them as attributes. + +class diagram: + A diagram that shows the classes in a program and the relationships + between them. + +multiplicity: + A notation in a class diagram that shows, for a HAS-A relationship, + how many references there are to instances of another class. + +data encapsulation: + A program development plan that involves a prototype using global + variables and a final version that makes the global variables into + instance attributes. + +Exercises +--------- + +For the following program, draw a UML class diagram that shows these +classes and the relationships among them. + +:: + + class PingPongParent: + pass + + class Ping(PingPongParent): + def __init__(self, pong): + self.pong = pong + + + class Pong(PingPongParent): + def __init__(self, pings=None): + if pings is None: + self.pings = [] + else: + self.pings = pings + + def add_ping(self, ping): + self.pings.append(ping) + + pong = Pong() + ping = Ping(pong) + pong.add_ping(ping) + +Write a Deck method called ``deal_hands`` that takes two parameters, the +number of hands and the number of cards per hand. It should create the +appropriate number of Hand objects, deal the appropriate number of cards +per hand, and return a list of Hands. + +[poker] + +The following are the possible hands in poker, in increasing order of +value and decreasing order of probability: + +pair: + two cards with the same rank + +two pair: + two pairs of cards with the same rank + +three of a kind: + three cards with the same rank + +straight: + five cards with ranks in sequence (aces can be high or low, so + Ace-2-3-4-5 is a straight and so is 10-Jack-Queen-King-Ace, but + Queen-King-Ace-2-3 is not.) + +flush: + five cards with the same suit + +full house: + three cards with one rank, two cards with another + +four of a kind: + four cards with the same rank + +straight flush: + five cards in sequence (as defined above) and with the same suit + +The goal of these exercises is to estimate the probability of drawing +these various hands. + +#. Download the following files from http://thinkpython2.com/code: + + Card.py + : A complete version of the Card, Deck and Hand classes in this + chapter. + + PokerHand.py + : An incomplete implementation of a class that represents a poker + hand, and some code that tests it. + +#. If you run PokerHand.py, it deals seven 7-card poker hands and checks + to see if any of them contains a flush. Read this code carefully + before you go on. + +#. Add methods to PokerHand.py named ``has_pair``, ``has_twopair``, etc. + that return True or False according to whether or not the hand meets + the relevant criteria. Your code should work correctly for “hands” + that contain any number of cards (although 5 and 7 are the most + common sizes). + +#. Write a method named classify that figures out the highest-value + classification for a hand and sets the label attribute accordingly. + For example, a 7-card hand might contain a flush and a pair; it + should be labeled “flush”. + +#. When you are convinced that your classification methods are working, + the next step is to estimate the probabilities of the various hands. + Write a function in PokerHand.py that shuffles a deck of cards, + divides it into hands, classifies the hands, and counts the number of + times various classifications appear. + +#. Print a table of the classifications and their probabilities. Run + your program with larger and larger numbers of hands until the output + values converge to a reasonable degree of accuracy. Compare your + results to the values at http://en.wikipedia.org/wiki/Hand_rankings. + +Solution: http://thinkpython2.com/code/PokerHandSoln.py. + +The Goodies +=========== + +One of my goals for this book has been to teach you as little Python as +possible. When there were two ways to do something, I picked one and +avoided mentioning the other. Or sometimes I put the second one into an +exercise. + +Now I want to go back for some of the good bits that got left behind. +Python provides a number of features that are not really necessary—you +can write good code without them—but with them you can sometimes write +code that’s more concise, readable or efficient, and sometimes all +three. + +Conditional expressions +----------------------- + +We saw conditional statements in Section [conditional.execution]. +Conditional statements are often used to choose one of two values; for +example: + +:: + + if x > 0: + y = math.log(x) + else: + y = float('nan') + +This statement checks whether x is positive. If so, it computes +math.log. If not, math.log would raise a ValueError. To avoid stopping +the program, we generate a “NaN”, which is a special floating-point +value that represents “Not a Number”. + +We can write this statement more concisely using a **conditional +expression**: + +:: + + y = math.log(x) if x > 0 else float('nan') + +You can almost read this line like English: “y gets log-x if x is +greater than 0; otherwise it gets NaN”. + +Recursive functions can sometimes be rewritten using conditional +expressions. For example, here is a recursive version of factorial: + +:: + + def factorial(n): + if n == 0: + return 1 + else: + return n * factorial(n-1) + +We can rewrite it like this: + +:: + + def factorial(n): + return 1 if n == 0 else n * factorial(n-1) + +Another use of conditional expressions is handling optional arguments. +For example, here is the init method from GoodKangaroo (see +Exercise [kangaroo]): + +:: + + def __init__(self, name, contents=None): + self.name = name + if contents == None: + contents = [] + self.pouch_contents = contents + +We can rewrite this one like this: + +:: + + def __init__(self, name, contents=None): + self.name = name + self.pouch_contents = [] if contents == None else contents + +In general, you can replace a conditional statement with a conditional +expression if both branches contain simple expressions that are either +returned or assigned to the same variable. + +List comprehensions +------------------- + +In Section [filter] we saw the map and filter patterns. For example, +this function takes a list of strings, maps the string method capitalize +to the elements, and returns a new list of strings: + +:: + + def capitalize_all(t): + res = [] + for s in t: + res.append(s.capitalize()) + return res + +We can write this more concisely using a **list comprehension**: + +:: + + def capitalize_all(t): + return [s.capitalize() for s in t] + +The bracket operators indicate that we are constructing a new list. The +expression inside the brackets specifies the elements of the list, and +the for clause indicates what sequence we are traversing. + +The syntax of a list comprehension is a little awkward because the loop +variable, s in this example, appears in the expression before we get to +the definition. + +List comprehensions can also be used for filtering. For example, this +function selects only the elements of t that are upper case, and returns +a new list: + +:: + + def only_upper(t): + res = [] + for s in t: + if s.isupper(): + res.append(s) + return res + +We can rewrite it using a list comprehension + +:: + + def only_upper(t): + return [s for s in t if s.isupper()] + +List comprehensions are concise and easy to read, at least for simple +expressions. And they are usually faster than the equivalent for loops, +sometimes much faster. So if you are mad at me for not mentioning them +earlier, I understand. + +But, in my defense, list comprehensions are harder to debug because you +can’t put a print statement inside the loop. I suggest that you use them +only if the computation is simple enough that you are likely to get it +right the first time. And for beginners that means never. + +Generator expressions +--------------------- + +**Generator expressions** are similar to list comprehensions, but with +parentheses instead of square brackets: + +:: + + >>> g = (x**2 for x in range(5)) + >>> g + at 0x7f4c45a786c0> + +The result is a generator object that knows how to iterate through a +sequence of values. But unlike a list comprehension, it does not compute +the values all at once; it waits to be asked. The built-in function next +gets the next value from the generator: + +:: + + >>> next(g) + 0 + >>> next(g) + 1 + +When you get to the end of the sequence, next raises a StopIteration +exception. You can also use a for loop to iterate through the values: + +:: + + >>> for val in g: + ... print(val) + 4 + 9 + 16 + +The generator object keeps track of where it is in the sequence, so the +for loop picks up where next left off. Once the generator is exhausted, +it continues to raise StopException: + +:: + + >>> next(g) + StopIteration + +Generator expressions are often used with functions like sum, max, and +min: + +:: + + >>> sum(x**2 for x in range(5)) + 30 + +any and all +----------- + +Python provides a built-in function, any, that takes a sequence of +boolean values and returns True if any of the values are True. It works +on lists: + +:: + + >>> any([False, False, True]) + True + +But it is often used with generator expressions: + +:: + + >>> any(letter == 't' for letter in 'monty') + True + +That example isn’t very useful because it does the same thing as the in +operator. But we could use any to rewrite some of the search functions +we wrote in Section [search]. For example, we could write avoids like +this: + +:: + + def avoids(word, forbidden): + return not any(letter in forbidden for letter in word) + +The function almost reads like English, “word avoids forbidden if there +are not any forbidden letters in word.” + +Using any with a generator expression is efficient because it stops +immediately if it finds a True value, so it doesn’t have to evaluate the +whole sequence. + +Python provides another built-in function, all, that returns True if +every element of the sequence is True. As an exercise, use all to +re-write ``uses_all`` from Section [search]. + +Sets +---- + +In Section [dictsub] I use dictionaries to find the words that appear in +a document but not in a word list. The function I wrote takes d1, which +contains the words from the document as keys, and d2, which contains the +list of words. It returns a dictionary that contains the keys from d1 +that are not in d2. + +:: + + def subtract(d1, d2): + res = dict() + for key in d1: + if key not in d2: + res[key] = None + return res + +In all of these dictionaries, the values are None because we never use +them. As a result, we waste some storage space. + +Python provides another built-in type, called a set, that behaves like a +collection of dictionary keys with no values. Adding elements to a set +is fast; so is checking membership. And sets provide methods and +operators to compute common set operations. + +For example, set subtraction is available as a method called difference +or as an operator, -. So we can rewrite subtract like this: + +:: + + def subtract(d1, d2): + return set(d1) - set(d2) + +The result is a set instead of a dictionary, but for operations like +iteration, the behavior is the same. + +Some of the exercises in this book can be done concisely and efficiently +with sets. For example, here is a solution to ``has_duplicates``, from +Exercise [duplicate], that uses a dictionary: + +:: + + def has_duplicates(t): + d = {} + for x in t: + if x in d: + return True + d[x] = True + return False + +When an element appears for the first time, it is added to the +dictionary. If the same element appears again, the function returns +True. + +Using sets, we can write the same function like this: + +:: + + def has_duplicates(t): + return len(set(t)) < len(t) + +An element can only appear in a set once, so if an element in t appears +more than once, the set will be smaller than t. If there are no +duplicates, the set will be the same size as t. + +We can also use sets to do some of the exercises in Chapter [wordplay]. +For example, here’s a version of ``uses_only`` with a loop: + +:: + + def uses_only(word, available): + for letter in word: + if letter not in available: + return False + return True + +``uses_only`` checks whether all letters in word are in available. We +can rewrite it like this: + +:: + + def uses_only(word, available): + return set(word) <= set(available) + +The ``<=`` operator checks whether one set is a subset or another, +including the possibility that they are equal, which is true if all the +letters in word appear in available. + +As an exercise, rewrite ``avoids`` using sets. + +Counters +-------- + +A Counter is like a set, except that if an element appears more than +once, the Counter keeps track of how many times it appears. If you are +familiar with the mathematical idea of a **multiset**, a Counter is a +natural way to represent a multiset. + +Counter is defined in a standard module called collections, so you have +to import it. You can initialize a Counter with a string, list, or +anything else that supports iteration: + +:: + + >>> from collections import Counter + >>> count = Counter('parrot') + >>> count + Counter({'r': 2, 't': 1, 'o': 1, 'p': 1, 'a': 1}) + +Counters behave like dictionaries in many ways; they map from each key +to the number of times it appears. As in dictionaries, the keys have to +be hashable. + +Unlike dictionaries, Counters don’t raise an exception if you access an +element that doesn’t appear. Instead, they return 0: + +:: + + >>> count['d'] + 0 + +We can use Counters to rewrite ``is_anagram`` from Exercise [anagram]: + +:: + + def is_anagram(word1, word2): + return Counter(word1) == Counter(word2) + +If two words are anagrams, they contain the same letters with the same +counts, so their Counters are equivalent. + +Counters provide methods and operators to perform set-like operations, +including addition, subtraction, union and intersection. And they +provide an often-useful method, ``most_common``, which returns a list of +value-frequency pairs, sorted from most common to least: + +:: + + >>> count = Counter('parrot') + >>> for val, freq in count.most_common(3): + ... print(val, freq) + r 2 + p 1 + a 1 + +defaultdict +----------- + +The collections module also provides defaultdict, which is like a +dictionary except that if you access a key that doesn’t exist, it can +generate a new value on the fly. + +When you create a defaultdict, you provide a function that’s used to +create new values. A function used to create objects is sometimes called +a **factory**. The built-in functions that create lists, sets, and other +types can be used as factories: + +:: + + >>> from collections import defaultdict + >>> d = defaultdict(list) + +Notice that the argument is list, which is a class object, not list(), +which is a new list. The function you provide doesn’t get called unless +you access a key that doesn’t exist. + +:: + + >>> t = d['new key'] + >>> t + [] + +The new list, which we’re calling t, is also added to the dictionary. So +if we modify t, the change appears in d: + +:: + + >>> t.append('new value') + >>> d + defaultdict(, {'new key': ['new value']}) + +If you are making a dictionary of lists, you can often write simpler +code using defaultdict. In my solution to Exercise [anagrams], which you +can get from http://thinkpython2.com/code/anagram_sets.py, I make a +dictionary that maps from a sorted string of letters to the list of +words that can be spelled with those letters. For example, ’opst’ maps +to the list . + +Here’s the original code: + +:: + + def all_anagrams(filename): + d = {} + for line in open(filename): + word = line.strip().lower() + t = signature(word) + if t not in d: + d[t] = [word] + else: + d[t].append(word) + return d + +This can be simplified using setdefault, which you might have used in +Exercise [setdefault]: + +:: + + def all_anagrams(filename): + d = {} + for line in open(filename): + word = line.strip().lower() + t = signature(word) + d.setdefault(t, []).append(word) + return d + +This solution has the drawback that it makes a new list every time, +regardless of whether it is needed. For lists, that’s no big deal, but +if the factory function is complicated, it might be. + +We can avoid this problem and simplify the code using a defaultdict: + +:: + + def all_anagrams(filename): + d = defaultdict(list) + for line in open(filename): + word = line.strip().lower() + t = signature(word) + d[t].append(word) + return d + +My solution to Exercise [poker], which you can download from +http://thinkpython2.com/code/PokerHandSoln.py, uses setdefault in the +function ``has_straightflush``. This solution has the drawback of +creating a Hand object every time through the loop, whether it is needed +or not. As an exercise, rewrite it using a defaultdict. + +Named tuples +------------ + +Many simple objects are basically collections of related values. For +example, the Point object defined in Chapter [clobjects] contains two +numbers, x and y. When you define a class like this, you usually start +with an init method and a str method: + +:: + + class Point: + + def __init__(self, x=0, y=0): + self.x = x + self.y = y + + def __str__(self): + return '(%g, %g)' % (self.x, self.y) + +This is a lot of code to convey a small amount of information. Python +provides a more concise way to say the same thing: + +:: + + from collections import namedtuple + Point = namedtuple('Point', ['x', 'y']) + +The first argument is the name of the class you want to create. The +second is a list of the attributes Point objects should have, as +strings. The return value from namedtuple is a class object: + +:: + + >>> Point + + +Point automatically provides methods like ``__init__`` and ``__str__`` +so you don’t have to write them. + +To create a Point object, you use the Point class as a function: + +:: + + >>> p = Point(1, 2) + >>> p + Point(x=1, y=2) + +The init method assigns the arguments to attributes using the names you +provided. The str method prints a representation of the Point object and +its attributes. + +You can access the elements of the named tuple by name: + +:: + + >>> p.x, p.y + (1, 2) + +But you can also treat a named tuple as a tuple: + +:: + + >>> p[0], p[1] + (1, 2) + + >>> x, y = p + >>> x, y + (1, 2) + +Named tuples provide a quick way to define simple classes. The drawback +is that simple classes don’t always stay simple. You might decide later +that you want to add methods to a named tuple. In that case, you could +define a new class that inherits from the named tuple: + +:: + + class Pointier(Point): + # add more methods here + +Or you could switch to a conventional class definition. + +Gathering keyword args +---------------------- + +In Section [gather], we saw how to write a function that gathers its +arguments into a tuple: + +:: + + def printall(*args): + print(args) + +You can call this function with any number of positional arguments (that +is, arguments that don’t have keywords): + +:: + + >>> printall(1, 2.0, '3') + (1, 2.0, '3') + +But the operator doesn’t gather keyword arguments: + +:: + + >>> printall(1, 2.0, third='3') + TypeError: printall() got an unexpected keyword argument 'third' + +To gather keyword arguments, you can use the \* operator: + +:: + + def printall(*args, **kwargs): + print(args, kwargs) + +You can call the keyword gathering parameter anything you want, but +kwargs is a common choice. The result is a dictionary that maps keywords +to values: + +:: + + >>> printall(1, 2.0, third='3') + (1, 2.0) {'third': '3'} + +If you have a dictionary of keywords and values, you can use the scatter +operator, \* to call a function: + +:: + + >>> d = dict(x=1, y=2) + >>> Point(**d) + Point(x=1, y=2) + +Without the scatter operator, the function would treat d as a single +positional argument, so it would assign d to x and complain because +there’s nothing to assign to y: + +:: + + >>> d = dict(x=1, y=2) + >>> Point(d) + Traceback (most recent call last): + File "", line 1, in + TypeError: __new__() missing 1 required positional argument: 'y' + +When you are working with functions that have a large number of +parameters, it is often useful to create and pass around dictionaries +that specify frequently used options. + +Glossary +-------- + +conditional expression: + An expression that has one of two values, depending on a condition. + +list comprehension: + An expression with a for loop in square brackets that yields a new + list. + +generator expression: + An expression with a for loop in parentheses that yields a generator + object. + +multiset: + A mathematical entity that represents a mapping between the elements + of a set and the number of times they appear. + +factory: + A function, usually passed as a parameter, used to create objects. + +Exercises +--------- + +The following is a function computes the binomial coefficient +recursively. + +:: + + def binomial_coeff(n, k): + """Compute the binomial coefficient "n choose k". + + n: number of trials + k: number of successes + + returns: int + """ + if k == 0: + return 1 + if n == 0: + return 0 + + res = binomial_coeff(n-1, k) + binomial_coeff(n-1, k-1) + return res + +Rewrite the body of the function using nested conditional expressions. + +One note: this function is not very efficient because it ends up +computing the same values over and over. You could make it more +efficient by memoizing (see Section [memoize]). But you will find that +it’s harder to memoize if you write it using conditional expressions. + +Debugging +========= + +When you are debugging, you should distinguish among different kinds of +errors in order to track them down more quickly: + +- Syntax errors are discovered by the interpreter when it is + translating the source code into byte code. They indicate that there + is something wrong with the structure of the program. Example: + Omitting the colon at the end of a def statement generates the + somewhat redundant message SyntaxError: invalid syntax. + +- Runtime errors are produced by the interpreter if something goes + wrong while the program is running. Most runtime error messages + include information about where the error occurred and what functions + were executing. Example: An infinite recursion eventually causes the + runtime error “maximum recursion depth exceeded”. + +- Semantic errors are problems with a program that runs without + producing error messages but doesn’t do the right thing. Example: An + expression may not be evaluated in the order you expect, yielding an + incorrect result. + +The first step in debugging is to figure out which kind of error you are +dealing with. Although the following sections are organized by error +type, some techniques are applicable in more than one situation. + +Syntax errors +------------- + +Syntax errors are usually easy to fix once you figure out what they are. +Unfortunately, the error messages are often not helpful. The most common +messages are SyntaxError: invalid syntax and SyntaxError: invalid token, +neither of which is very informative. + +On the other hand, the message does tell you where in the program the +problem occurred. Actually, it tells you where Python noticed a problem, +which is not necessarily where the error is. Sometimes the error is +prior to the location of the error message, often on the preceding line. + +If you are building the program incrementally, you should have a good +idea about where the error is. It will be in the last line you added. + +If you are copying code from a book, start by comparing your code to the +book’s code very carefully. Check every character. At the same time, +remember that the book might be wrong, so if you see something that +looks like a syntax error, it might be. + +Here are some ways to avoid the most common syntax errors: + +#. Make sure you are not using a Python keyword for a variable name. + +#. Check that you have a colon at the end of the header of every + compound statement, including for, while, if, and def statements. + +#. Make sure that any strings in the code have matching quotation marks. + Make sure that all quotation marks are “straight quotes”, not “curly + quotes”. + +#. If you have multiline strings with triple quotes (single or double), + make sure you have terminated the string properly. An unterminated + string may cause an invalid token error at the end of your program, + or it may treat the following part of the program as a string until + it comes to the next string. In the second case, it might not produce + an error message at all! + +#. An unclosed opening operator—\ ``(``, ``{``, or ``[``—makes Python + continue with the next line as part of the current statement. + Generally, an error occurs almost immediately in the next line. + +#. Check for the classic = instead of == inside a conditional. + +#. Check the indentation to make sure it lines up the way it is supposed + to. Python can handle space and tabs, but if you mix them it can + cause problems. The best way to avoid this problem is to use a text + editor that knows about Python and generates consistent indentation. + +#. If you have non-ASCII characters in the code (including strings and + comments), that might cause a problem, although Python 3 usually + handles non-ASCII characters. Be careful if you paste in text from a + web page or other source. + +If nothing works, move on to the next section... + +I keep making changes and it makes no difference. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If the interpreter says there is an error and you don’t see it, that +might be because you and the interpreter are not looking at the same +code. Check your programming environment to make sure that the program +you are editing is the one Python is trying to run. + +If you are not sure, try putting an obvious and deliberate syntax error +at the beginning of the program. Now run it again. If the interpreter +doesn’t find the new error, you are not running the new code. + +There are a few likely culprits: + +- You edited the file and forgot to save the changes before running it + again. Some programming environments do this for you, but some don’t. + +- You changed the name of the file, but you are still running the old + name. + +- Something in your development environment is configured incorrectly. + +- If you are writing a module and using import, make sure you don’t + give your module the same name as one of the standard Python modules. + +- If you are using import to read a module, remember that you have to + restart the interpreter or use reload to read a modified file. If you + import the module again, it doesn’t do anything. + +If you get stuck and you can’t figure out what is going on, one approach +is to start again with a new program like “Hello, World!”, and make sure +you can get a known program to run. Then gradually add the pieces of the +original program to the new one. + +Runtime errors +-------------- + +Once your program is syntactically correct, Python can read it and at +least start running it. What could possibly go wrong? + +My program does absolutely nothing. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This problem is most common when your file consists of functions and +classes but does not actually invoke a function to start execution. This +may be intentional if you only plan to import this module to supply +classes and functions. + +If it is not intentional, make sure there is a function call in the +program, and make sure the flow of execution reaches it (see “Flow of +Execution” below). + +My program hangs. +~~~~~~~~~~~~~~~~~ + +If a program stops and seems to be doing nothing, it is “hanging”. Often +that means that it is caught in an infinite loop or infinite recursion. + +- If there is a particular loop that you suspect is the problem, add a + print statement immediately before the loop that says “entering the + loop” and another immediately after that says “exiting the loop”. + + Run the program. If you get the first message and not the second, + you’ve got an infinite loop. Go to the “Infinite Loop” section below. + +- Most of the time, an infinite recursion will cause the program to run + for a while and then produce a “RuntimeError: Maximum recursion depth + exceeded” error. If that happens, go to the “Infinite Recursion” + section below. + + If you are not getting this error but you suspect there is a problem + with a recursive method or function, you can still use the techniques + in the “Infinite Recursion” section. + +- If neither of those steps works, start testing other loops and other + recursive functions and methods. + +- If that doesn’t work, then it is possible that you don’t understand + the flow of execution in your program. Go to the “Flow of Execution” + section below. + +Infinite Loop +^^^^^^^^^^^^^ + +If you think you have an infinite loop and you think you know what loop +is causing the problem, add a print statement at the end of the loop +that prints the values of the variables in the condition and the value +of the condition. + +For example: + +:: + + while x > 0 and y < 0 : + # do something to x + # do something to y + + print('x: ', x) + print('y: ', y) + print("condition: ", (x > 0 and y < 0)) + +Now when you run the program, you will see three lines of output for +each time through the loop. The last time through the loop, the +condition should be False. If the loop keeps going, you will be able to +see the values of x and y, and you might figure out why they are not +being updated correctly. + +Infinite Recursion +^^^^^^^^^^^^^^^^^^ + +Most of the time, infinite recursion causes the program to run for a +while and then produce a Maximum recursion depth exceeded error. + +If you suspect that a function is causing an infinite recursion, make +sure that there is a base case. There should be some condition that +causes the function to return without making a recursive invocation. If +not, you need to rethink the algorithm and identify a base case. + +If there is a base case but the program doesn’t seem to be reaching it, +add a print statement at the beginning of the function that prints the +parameters. Now when you run the program, you will see a few lines of +output every time the function is invoked, and you will see the +parameter values. If the parameters are not moving toward the base case, +you will get some ideas about why not. + +Flow of Execution +^^^^^^^^^^^^^^^^^ + +If you are not sure how the flow of execution is moving through your +program, add print statements to the beginning of each function with a +message like “entering function foo”, where foo is the name of the +function. + +Now when you run the program, it will print a trace of each function as +it is invoked. + +When I run the program I get an exception. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If something goes wrong during runtime, Python prints a message that +includes the name of the exception, the line of the program where the +problem occurred, and a traceback. + +The traceback identifies the function that is currently running, and +then the function that called it, and then the function that called +*that*, and so on. In other words, it traces the sequence of function +calls that got you to where you are, including the line number in your +file where each call occurred. + +The first step is to examine the place in the program where the error +occurred and see if you can figure out what happened. These are some of +the most common runtime errors: + +NameError: + You are trying to use a variable that doesn’t exist in the current + environment. Check if the name is spelled right, or at least + consistently. And remember that local variables are local; you + cannot refer to them from outside the function where they are + defined. + +TypeError: + There are several possible causes: + + - You are trying to use a value improperly. Example: indexing a + string, list, or tuple with something other than an integer. + + - There is a mismatch between the items in a format string and the + items passed for conversion. This can happen if either the number + of items does not match or an invalid conversion is called for. + + - You are passing the wrong number of arguments to a function. For + methods, look at the method definition and check that the first + parameter is self. Then look at the method invocation; make sure + you are invoking the method on an object with the right type and + providing the other arguments correctly. + +KeyError: + You are trying to access an element of a dictionary using a key that + the dictionary does not contain. If the keys are strings, remember + that capitalization matters. + +AttributeError: + You are trying to access an attribute or method that does not exist. + Check the spelling! You can use the built-in function vars to list + the attributes that do exist. + + If an AttributeError indicates that an object has NoneType, that + means that it is None. So the problem is not the attribute name, but + the object. + + The reason the object is none might be that you forgot to return a + value from a function; if you get to the end of a function without + hitting a return statement, it returns None. Another common cause is + using the result from a list method, like sort, that returns None. + +IndexError: + The index you are using to access a list, string, or tuple is + greater than its length minus one. Immediately before the site of + the error, add a print statement to display the value of the index + and the length of the array. Is the array the right size? Is the + index the right value? + +The Python debugger (pdb) is useful for tracking down exceptions because +it allows you to examine the state of the program immediately before the +error. You can read about pdb at +https://docs.python.org/3/library/pdb.html. + +I added so many print statements I get inundated with output. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +One of the problems with using print statements for debugging is that +you can end up buried in output. There are two ways to proceed: simplify +the output or simplify the program. + +To simplify the output, you can remove or comment out print statements +that aren’t helping, or combine them, or format the output so it is +easier to understand. + +To simplify the program, there are several things you can do. First, +scale down the problem the program is working on. For example, if you +are searching a list, search a *small* list. If the program takes input +from the user, give it the simplest input that causes the problem. + +Second, clean up the program. Remove dead code and reorganize the +program to make it as easy to read as possible. For example, if you +suspect that the problem is in a deeply nested part of the program, try +rewriting that part with simpler structure. If you suspect a large +function, try splitting it into smaller functions and testing them +separately. + +Often the process of finding the minimal test case leads you to the bug. +If you find that a program works in one situation but not in another, +that gives you a clue about what is going on. + +Similarly, rewriting a piece of code can help you find subtle bugs. If +you make a change that you think shouldn’t affect the program, and it +does, that can tip you off. + +Semantic errors +--------------- + +In some ways, semantic errors are the hardest to debug, because the +interpreter provides no information about what is wrong. Only you know +what the program is supposed to do. + +The first step is to make a connection between the program text and the +behavior you are seeing. You need a hypothesis about what the program is +actually doing. One of the things that makes that hard is that computers +run so fast. + +You will often wish that you could slow the program down to human speed, +and with some debuggers you can. But the time it takes to insert a few +well-placed print statements is often short compared to setting up the +debugger, inserting and removing breakpoints, and “stepping” the program +to where the error is occurring. + +My program doesn’t work. +~~~~~~~~~~~~~~~~~~~~~~~~ + +You should ask yourself these questions: + +- Is there something the program was supposed to do but which doesn’t + seem to be happening? Find the section of the code that performs that + function and make sure it is executing when you think it should. + +- Is something happening that shouldn’t? Find code in your program that + performs that function and see if it is executing when it shouldn’t. + +- Is a section of code producing an effect that is not what you + expected? Make sure that you understand the code in question, + especially if it involves functions or methods in other Python + modules. Read the documentation for the functions you call. Try them + out by writing simple test cases and checking the results. + +In order to program, you need a mental model of how programs work. If +you write a program that doesn’t do what you expect, often the problem +is not in the program; it’s in your mental model. + +The best way to correct your mental model is to break the program into +its components (usually the functions and methods) and test each +component independently. Once you find the discrepancy between your +model and reality, you can solve the problem. + +Of course, you should be building and testing components as you develop +the program. If you encounter a problem, there should be only a small +amount of new code that is not known to be correct. + +I’ve got a big hairy expression and it doesn’t do what I expect. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Writing complex expressions is fine as long as they are readable, but +they can be hard to debug. It is often a good idea to break a complex +expression into a series of assignments to temporary variables. + +For example: + +:: + + self.hands[i].addCard(self.hands[self.findNeighbor(i)].popCard()) + +This can be rewritten as: + +:: + + neighbor = self.findNeighbor(i) + pickedCard = self.hands[neighbor].popCard() + self.hands[i].addCard(pickedCard) + +The explicit version is easier to read because the variable names +provide additional documentation, and it is easier to debug because you +can check the types of the intermediate variables and display their +values. + +Another problem that can occur with big expressions is that the order of +evaluation may not be what you expect. For example, if you are +translating the expression :math:`\frac{x}{2 \pi}` into Python, you +might write: + +:: + + y = x / 2 * math.pi + +That is not correct because multiplication and division have the same +precedence and are evaluated from left to right. So this expression +computes :math:`x \pi / 2`. + +A good way to debug expressions is to add parentheses to make the order +of evaluation explicit: + +:: + + y = x / (2 * math.pi) + +Whenever you are not sure of the order of evaluation, use parentheses. +Not only will the program be correct (in the sense of doing what you +intended), it will also be more readable for other people who haven’t +memorized the order of operations. + +I’ve got a function that doesn’t return what I expect. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you have a return statement with a complex expression, you don’t have +a chance to print the result before returning. Again, you can use a +temporary variable. For example, instead of: + +:: + + return self.hands[i].removeMatches() + +you could write: + +:: + + count = self.hands[i].removeMatches() + return count + +Now you have the opportunity to display the value of count before +returning. + +I’m really, really stuck and I need help. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +First, try getting away from the computer for a few minutes. Computers +emit waves that affect the brain, causing these symptoms: + +- Frustration and rage. + +- Superstitious beliefs (“the computer hates me”) and magical thinking + (“the program only works when I wear my hat backward”). + +- Random walk programming (the attempt to program by writing every + possible program and choosing the one that does the right thing). + +If you find yourself suffering from any of these symptoms, get up and go +for a walk. When you are calm, think about the program. What is it +doing? What are some possible causes of that behavior? When was the last +time you had a working program, and what did you do next? + +Sometimes it just takes time to find a bug. I often find bugs when I am +away from the computer and let my mind wander. Some of the best places +to find bugs are trains, showers, and in bed, just before you fall +asleep. + +No, I really need help. +~~~~~~~~~~~~~~~~~~~~~~~ + +It happens. Even the best programmers occasionally get stuck. Sometimes +you work on a program so long that you can’t see the error. You need a +fresh pair of eyes. + +Before you bring someone else in, make sure you are prepared. Your +program should be as simple as possible, and you should be working on +the smallest input that causes the error. You should have print +statements in the appropriate places (and the output they produce should +be comprehensible). You should understand the problem well enough to +describe it concisely. + +When you bring someone in to help, be sure to give them the information +they need: + +- If there is an error message, what is it and what part of the program + does it indicate? + +- What was the last thing you did before this error occurred? What were + the last lines of code that you wrote, or what is the new test case + that fails? + +- What have you tried so far, and what have you learned? + +When you find the bug, take a second to think about what you could have +done to find it faster. Next time you see something similar, you will be +able to find the bug more quickly. + +Remember, the goal is not just to make the program work. The goal is to +learn how to make the program work. + +Analysis of Algorithms +====================== + + This appendix is an edited excerpt from *Think Complexity*, by Allen + B. Downey, also published by O’Reilly Media (2012). When you are + done with this book, you might want to move on to that one. + +**Analysis of algorithms** is a branch of computer science that studies +the performance of algorithms, especially their run time and space +requirements. See http://en.wikipedia.org/wiki/Analysis_of_algorithms. + +The practical goal of algorithm analysis is to predict the performance +of different algorithms in order to guide design decisions. + +During the 2008 United States Presidential Campaign, candidate Barack +Obama was asked to perform an impromptu analysis when he visited Google. +Chief executive Eric Schmidt jokingly asked him for “the most efficient +way to sort a million 32-bit integers.” Obama had apparently been tipped +off, because he quickly replied, “I think the bubble sort would be the +wrong way to go.” See http://www.youtube.com/watch?v=k4RRi_ntQc8. + +This is true: bubble sort is conceptually simple but slow for large +datasets. The answer Schmidt was probably looking for is “radix sort” +(http://en.wikipedia.org/wiki/Radix_sort) [2]_. + +The goal of algorithm analysis is to make meaningful comparisons between +algorithms, but there are some problems: + +- The relative performance of the algorithms might depend on + characteristics of the hardware, so one algorithm might be faster on + Machine A, another on Machine B. The general solution to this problem + is to specify a **machine model** and analyze the number of steps, or + operations, an algorithm requires under a given model. + +- Relative performance might depend on the details of the dataset. For + example, some sorting algorithms run faster if the data are already + partially sorted; other algorithms run slower in this case. A common + way to avoid this problem is to analyze the **worst case** scenario. + It is sometimes useful to analyze average case performance, but + that’s usually harder, and it might not be obvious what set of cases + to average over. + +- Relative performance also depends on the size of the problem. A + sorting algorithm that is fast for small lists might be slow for long + lists. The usual solution to this problem is to express run time (or + number of operations) as a function of problem size, and group + functions into categories depending on how quickly they grow as + problem size increases. + +The good thing about this kind of comparison is that it lends itself to +simple classification of algorithms. For example, if I know that the run +time of Algorithm A tends to be proportional to the size of the input, +:math:`n`, and Algorithm B tends to be proportional to :math:`n^2`, then +I expect A to be faster than B, at least for large values of :math:`n`. + +This kind of analysis comes with some caveats, but we’ll get to that +later. + +Order of growth +--------------- + +Suppose you have analyzed two algorithms and expressed their run times +in terms of the size of the input: Algorithm A takes :math:`100n+1` +steps to solve a problem with size :math:`n`; Algorithm B takes +:math:`n^2 + n + 1` steps. + +The following table shows the run time of these algorithms for different +problem sizes: + ++----------+---------------+---------------------+ +| Input | Run time of | Run time of | ++----------+---------------+---------------------+ +| size | Algorithm A | Algorithm B | ++----------+---------------+---------------------+ +| 10 | 1 001 | 111 | ++----------+---------------+---------------------+ +| 100 | 10 001 | 10 101 | ++----------+---------------+---------------------+ +| 1 000 | 100 001 | 1 001 001 | ++----------+---------------+---------------------+ +| 10 000 | 1 000 001 | :math:`> 10^{10}` | ++----------+---------------+---------------------+ + +At :math:`n=10`, Algorithm A looks pretty bad; it takes almost 10 times +longer than Algorithm B. But for :math:`n=100` they are about the same, +and for larger values A is much better. + +The fundamental reason is that for large values of :math:`n`, any +function that contains an :math:`n^2` term will grow faster than a +function whose leading term is :math:`n`. The **leading term** is the +term with the highest exponent. + +For Algorithm A, the leading term has a large coefficient, 100, which is +why B does better than A for small :math:`n`. But regardless of the +coefficients, there will always be some value of :math:`n` where +:math:`a n^2 > b n`, for any values of :math:`a` and :math:`b`. + +The same argument applies to the non-leading terms. Even if the run time +of Algorithm A were :math:`n+1000000`, it would still be better than +Algorithm B for sufficiently large :math:`n`. + +In general, we expect an algorithm with a smaller leading term to be a +better algorithm for large problems, but for smaller problems, there may +be a **crossover point** where another algorithm is better. The location +of the crossover point depends on the details of the algorithms, the +inputs, and the hardware, so it is usually ignored for purposes of +algorithmic analysis. But that doesn’t mean you can forget about it. + +If two algorithms have the same leading order term, it is hard to say +which is better; again, the answer depends on the details. So for +algorithmic analysis, functions with the same leading term are +considered equivalent, even if they have different coefficients. + +An **order of growth** is a set of functions whose growth behavior is +considered equivalent. For example, :math:`2n`, :math:`100n` and +:math:`n+1` belong to the same order of growth, which is written +:math:`O(n)` in **Big-Oh notation** and often called **linear** because +every function in the set grows linearly with :math:`n`. + +All functions with the leading term :math:`n^2` belong to +:math:`O(n^2)`; they are called **quadratic**. + +The following table shows some of the orders of growth that appear most +commonly in algorithmic analysis, in increasing order of badness. + ++-------------------------+-----------------------------------+----+ +| Order of | Name | | ++-------------------------+-----------------------------------+----+ +| growth | | | ++-------------------------+-----------------------------------+----+ +| :math:`O(1)` | constant | | ++-------------------------+-----------------------------------+----+ +| :math:`O(\log_b n)` | logarithmic (for any :math:`b`) | | ++-------------------------+-----------------------------------+----+ +| :math:`O(n)` | linear | | ++-------------------------+-----------------------------------+----+ +| :math:`O(n \log_b n)` | linearithmic | | ++-------------------------+-----------------------------------+----+ +| :math:`O(n^2)` | quadratic | | ++-------------------------+-----------------------------------+----+ +| :math:`O(n^3)` | cubic | | ++-------------------------+-----------------------------------+----+ +| :math:`O(c^n)` | exponential (for any :math:`c`) | | ++-------------------------+-----------------------------------+----+ + +For the logarithmic terms, the base of the logarithm doesn’t matter; +changing bases is the equivalent of multiplying by a constant, which +doesn’t change the order of growth. Similarly, all exponential functions +belong to the same order of growth regardless of the base of the +exponent. Exponential functions grow very quickly, so exponential +algorithms are only useful for small problems. + +Read the Wikipedia page on Big-Oh notation at +http://en.wikipedia.org/wiki/Big_O_notation and answer the following +questions: + +#. What is the order of growth of :math:`n^3 + n^2`? What about + :math:`1000000 n^3 + n^2`? What about :math:`n^3 + 1000000 n^2`? + +#. What is the order of growth of :math:`(n^2 + n) \cdot (n + 1)`? + Before you start multiplying, remember that you only need the leading + term. + +#. If :math:`f` is in :math:`O(g)`, for some unspecified function + :math:`g`, what can we say about :math:`af+b`? + +#. If :math:`f_1` and :math:`f_2` are in :math:`O(g)`, what can we say + about :math:`f_1 + f_2`? + +#. If :math:`f_1` is in :math:`O(g)` and :math:`f_2` is in :math:`O(h)`, + what can we say about :math:`f_1 + f_2`? + +#. If :math:`f_1` is in :math:`O(g)` and :math:`f_2` is :math:`O(h)`, + what can we say about :math:`f_1 \cdot f_2`? + +Programmers who care about performance often find this kind of analysis +hard to swallow. They have a point: sometimes the coefficients and the +non-leading terms make a real difference. Sometimes the details of the +hardware, the programming language, and the characteristics of the input +make a big difference. And for small problems asymptotic behavior is +irrelevant. + +But if you keep those caveats in mind, algorithmic analysis is a useful +tool. At least for large problems, the “better” algorithms is usually +better, and sometimes it is *much* better. The difference between two +algorithms with the same order of growth is usually a constant factor, +but the difference between a good algorithm and a bad algorithm is +unbounded! + +Analysis of basic Python operations +----------------------------------- + +In Python, most arithmetic operations are constant time; multiplication +usually takes longer than addition and subtraction, and division takes +even longer, but these run times don’t depend on the magnitude of the +operands. Very large integers are an exception; in that case the run +time increases with the number of digits. + +Indexing operations—reading or writing elements in a sequence or +dictionary—are also constant time, regardless of the size of the data +structure. + +A for loop that traverses a sequence or dictionary is usually linear, as +long as all of the operations in the body of the loop are constant time. +For example, adding up the elements of a list is linear: + +:: + + total = 0 + for x in t: + total += x + +The built-in function sum is also linear because it does the same thing, +but it tends to be faster because it is a more efficient implementation; +in the language of algorithmic analysis, it has a smaller leading +coefficient. + +As a rule of thumb, if the body of a loop is in :math:`O(n^a)` then the +whole loop is in :math:`O(n^{a+1})`. The exception is if you can show +that the loop exits after a constant number of iterations. If a loop +runs :math:`k` times regardless of :math:`n`, then the loop is in +:math:`O(n^a)`, even for large :math:`k`. + +Multiplying by :math:`k` doesn’t change the order of growth, but neither +does dividing. So if the body of a loop is in :math:`O(n^a)` and it runs +:math:`n/k` times, the loop is in :math:`O(n^{a+1})`, even for large +:math:`k`. + +Most string and tuple operations are linear, except indexing and len, +which are constant time. The built-in functions min and max are linear. +The run-time of a slice operation is proportional to the length of the +output, but independent of the size of the input. + +String concatenation is linear; the run time depends on the sum of the +lengths of the operands. + +All string methods are linear, but if the lengths of the strings are +bounded by a constant—for example, operations on single characters—they +are considered constant time. The string method join is linear; the run +time depends on the total length of the strings. + +Most list methods are linear, but there are some exceptions: + +- Adding an element to the end of a list is constant time on average; + when it runs out of room it occasionally gets copied to a bigger + location, but the total time for :math:`n` operations is + :math:`O(n)`, so the average time for each operation is :math:`O(1)`. + +- Removing an element from the end of a list is constant time. + +- Sorting is :math:`O(n \log n)`. + +Most dictionary operations and methods are constant time, but there are +some exceptions: + +- The run time of update is proportional to the size of the dictionary + passed as a parameter, not the dictionary being updated. + +- keys, values and items are constant time because they return + iterators. But if you loop through the iterators, the loop will be + linear. + +The performance of dictionaries is one of the minor miracles of computer +science. We will see how they work in Section [hashtable]. + +Read the Wikipedia page on sorting algorithms at +http://en.wikipedia.org/wiki/Sorting_algorithm and answer the following +questions: + +#. What is a “comparison sort?” What is the best worst-case order of + growth for a comparison sort? What is the best worst-case order of + growth for any sort algorithm? + +#. What is the order of growth of bubble sort, and why does Barack Obama + think it is “the wrong way to go?” + +#. What is the order of growth of radix sort? What preconditions do we + need to use it? + +#. What is a stable sort and why might it matter in practice? + +#. What is the worst sorting algorithm (that has a name)? + +#. What sort algorithm does the C library use? What sort algorithm does + Python use? Are these algorithms stable? You might have to Google + around to find these answers. + +#. Many of the non-comparison sorts are linear, so why does does Python + use an :math:`O(n \log n)` comparison sort? + +Analysis of search algorithms +----------------------------- + +A **search** is an algorithm that takes a collection and a target item +and determines whether the target is in the collection, often returning +the index of the target. + +The simplest search algorithm is a “linear search”, which traverses the +items of the collection in order, stopping if it finds the target. In +the worst case it has to traverse the entire collection, so the run time +is linear. + +The in operator for sequences uses a linear search; so do string methods +like find and count. + +If the elements of the sequence are in order, you can use a **bisection +search**, which is :math:`O(\log n)`. Bisection search is similar to the +algorithm you might use to look a word up in a dictionary (a paper +dictionary, not the data structure). Instead of starting at the +beginning and checking each item in order, you start with the item in +the middle and check whether the word you are looking for comes before +or after. If it comes before, then you search the first half of the +sequence. Otherwise you search the second half. Either way, you cut the +number of remaining items in half. + +If the sequence has 1,000,000 items, it will take about 20 steps to find +the word or conclude that it’s not there. So that’s about 50,000 times +faster than a linear search. + +Bisection search can be much faster than linear search, but it requires +the sequence to be in order, which might require extra work. + +There is another data structure, called a **hashtable** that is even +faster—it can do a search in constant time—and it doesn’t require the +items to be sorted. Python dictionaries are implemented using +hashtables, which is why most dictionary operations, including the in +operator, are constant time. + +Hashtables +---------- + +To explain how hashtables work and why their performance is so good, I +start with a simple implementation of a map and gradually improve it +until it’s a hashtable. + +I use Python to demonstrate these implementations, but in real life you +wouldn’t write code like this in Python; you would just use a +dictionary! So for the rest of this chapter, you have to imagine that +dictionaries don’t exist and you want to implement a data structure that +maps from keys to values. The operations you have to implement are: + +add(k, v): + Add a new item that maps from key k to value v. With a Python + dictionary, d, this operation is written d[k] = v. + +get(k): + Look up and return the value that corresponds to key k. With a + Python dictionary, d, this operation is written d[k] or d.get(k). + +For now, I assume that each key only appears once. The simplest +implementation of this interface uses a list of tuples, where each tuple +is a key-value pair. + +:: + + class LinearMap: + + def __init__(self): + self.items = [] + + def add(self, k, v): + self.items.append((k, v)) + + def get(self, k): + for key, val in self.items: + if key == k: + return val + raise KeyError + +add appends a key-value tuple to the list of items, which takes constant +time. + +get uses a for loop to search the list: if it finds the target key it +returns the corresponding value; otherwise it raises a KeyError. So get +is linear. + +An alternative is to keep the list sorted by key. Then get could use a +bisection search, which is :math:`O(\log n)`. But inserting a new item +in the middle of a list is linear, so this might not be the best option. +There are other data structures that can implement add and get in log +time, but that’s still not as good as constant time, so let’s move on. + +One way to improve LinearMap is to break the list of key-value pairs +into smaller lists. Here’s an implementation called BetterMap, which is +a list of 100 LinearMaps. As we’ll see in a second, the order of growth +for get is still linear, but BetterMap is a step on the path toward +hashtables: + +:: + + class BetterMap: + + def __init__(self, n=100): + self.maps = [] + for i in range(n): + self.maps.append(LinearMap()) + + def find_map(self, k): + index = hash(k) % len(self.maps) + return self.maps[index] + + def add(self, k, v): + m = self.find_map(k) + m.add(k, v) + + def get(self, k): + m = self.find_map(k) + return m.get(k) + +``__init__`` makes a list of n LinearMaps. + +``find_map`` is used by add and get to figure out which map to put the +new item in, or which map to search. + +``find_map`` uses the built-in function hash, which takes almost any +Python object and returns an integer. A limitation of this +implementation is that it only works with hashable keys. Mutable types +like lists and dictionaries are unhashable. + +Hashable objects that are considered equivalent return the same hash +value, but the converse is not necessarily true: two objects with +different values can return the same hash value. + +``find_map`` uses the modulus operator to wrap the hash values into the +range from 0 to len(self.maps), so the result is a legal index into the +list. Of course, this means that many different hash values will wrap +onto the same index. But if the hash function spreads things out pretty +evenly (which is what hash functions are designed to do), then we expect +:math:`n/100` items per LinearMap. + +Since the run time of LinearMap.get is proportional to the number of +items, we expect BetterMap to be about 100 times faster than LinearMap. +The order of growth is still linear, but the leading coefficient is +smaller. That’s nice, but still not as good as a hashtable. + +Here (finally) is the crucial idea that makes hashtables fast: if you +can keep the maximum length of the LinearMaps bounded, LinearMap.get is +constant time. All you have to do is keep track of the number of items +and when the number of items per LinearMap exceeds a threshold, resize +the hashtable by adding more LinearMaps. + +Here is an implementation of a hashtable: + +:: + + class HashMap: + + def __init__(self): + self.maps = BetterMap(2) + self.num = 0 + + def get(self, k): + return self.maps.get(k) + + def add(self, k, v): + if self.num == len(self.maps.maps): + self.resize() + + self.maps.add(k, v) + self.num += 1 + + def resize(self): + new_maps = BetterMap(self.num * 2) + + for m in self.maps.maps: + for k, v in m.items: + new_maps.add(k, v) + + self.maps = new_maps + +Each HashMap contains a BetterMap; ``__init__`` starts with just 2 +LinearMaps and initializes num, which keeps track of the number of +items. + +get just dispatches to BetterMap. The real work happens in add, which +checks the number of items and the size of the BetterMap: if they are +equal, the average number of items per LinearMap is 1, so it calls +resize. + +resize make a new BetterMap, twice as big as the previous one, and then +“rehashes” the items from the old map to the new. + +Rehashing is necessary because changing the number of LinearMaps changes +the denominator of the modulus operator in ``find_map``. That means that +some objects that used to hash into the same LinearMap will get split up +(which is what we wanted, right?). + +Rehashing is linear, so resize is linear, which might seem bad, since I +promised that add would be constant time. But remember that we don’t +have to resize every time, so add is usually constant time and only +occasionally linear. The total amount of work to run add :math:`n` times +is proportional to :math:`n`, so the average time of each add is +constant time! + +To see how this works, think about starting with an empty HashTable and +adding a sequence of items. We start with 2 LinearMaps, so the first 2 +adds are fast (no resizing required). Let’s say that they take one unit +of work each. The next add requires a resize, so we have to rehash the +first two items (let’s call that 2 more units of work) and then add the +third item (one more unit). Adding the next item costs 1 unit, so the +total so far is 6 units of work for 4 items. + +The next add costs 5 units, but the next three are only one unit each, +so the total is 14 units for the first 8 adds. + +The next add costs 9 units, but then we can add 7 more before the next +resize, so the total is 30 units for the first 16 adds. + +After 32 adds, the total cost is 62 units, and I hope you are starting +to see a pattern. After :math:`n` adds, where :math:`n` is a power of +two, the total cost is :math:`2n-2` units, so the average work per add +is a little less than 2 units. When :math:`n` is a power of two, that’s +the best case; for other values of :math:`n` the average work is a +little higher, but that’s not important. The important thing is that it +is :math:`O(1)`. + +Figure [fig.hash] shows how this works graphically. Each block +represents a unit of work. The columns show the total work for each add +in order from left to right: the first two adds cost 1 units, the third +costs 3 units, etc. + +.. figure:: figs/towers.pdf + :alt: The cost of a hashtable add.[fig.hash] + + The cost of a hashtable add.[fig.hash] + +The extra work of rehashing appears as a sequence of increasingly tall +towers with increasing space between them. Now if you knock over the +towers, spreading the cost of resizing over all adds, you can see +graphically that the total cost after :math:`n` adds is :math:`2n - 2`. + +An important feature of this algorithm is that when we resize the +HashTable it grows geometrically; that is, we multiply the size by a +constant. If you increase the size arithmetically—adding a fixed number +each time—the average time per add is linear. + +You can download my implementation of HashMap from +http://thinkpython2.com/code/Map.py, but remember that there is no +reason to use it; if you want a map, just use a Python dictionary. + +Glossary +-------- + +analysis of algorithms: + A way to compare algorithms in terms of their run time and/or space + requirements. + +machine model: + A simplified representation of a computer used to describe + algorithms. + +worst case: + The input that makes a given algorithm run slowest (or require the + most space. + +leading term: + In a polynomial, the term with the highest exponent. + +crossover point: + The problem size where two algorithms require the same run time or + space. + +order of growth: + A set of functions that all grow in a way considered equivalent for + purposes of analysis of algorithms. For example, all functions that + grow linearly belong to the same order of growth. + +Big-Oh notation: + Notation for representing an order of growth; for example, + :math:`O(n)` represents the set of functions that grow linearly. + +linear: + An algorithm whose run time is proportional to problem size, at + least for large problem sizes. + +quadratic: + An algorithm whose run time is proportional to :math:`n^2`, where + :math:`n` is a measure of problem size. + +search: + The problem of locating an element of a collection (like a list or + dictionary) or determining that it is not present. + +hashtable: + A data structure that represents a collection of key-value pairs and + performs search in constant time. + +.. [1] + popen is deprecated now, which means we are supposed to stop using it + and start using the subprocess module. But for simple cases, I find + subprocess more complicated than necessary. So I am going to keep + using popen until they take it away. + +.. [2] + But if you get a question like this in an interview, I think a better + answer is, “The fastest way to sort a million integers is to use + whatever sort function is provided by the language I’m using. Its + performance is good enough for the vast majority of applications, but + if it turned out that my application was too slow, I would use a + profiler to see where the time was being spent. If it looked like a + faster sort algorithm would have a significant effect on performance, + then I would look around for a good implementation of radix sort.” diff --git a/book/conf.py b/book/conf.py new file mode 100644 index 0000000..6f14880 --- /dev/null +++ b/book/conf.py @@ -0,0 +1,359 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Pense Python documentation build configuration file, created by +# sphinx-quickstart on Sun Nov 15 23:39:59 2015. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +import os +import shlex + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.doctest', + 'sphinx.ext.todo', + 'sphinx.ext.pngmath', +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'Pense Python' +copyright = '2015, Allen B. Downey' +author = 'Allen B. Downey' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '2e' +# The full version, including alpha/beta/rc tags. +release = '2e' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = 'pt-br' + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'alabaster' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +#html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr' +#html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# Now only 'ja' uses this config value +#html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +#html_search_scorer = 'scorer.js' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'PensePythondoc' + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', + +# Latex figure (float) alignment +#'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'PensePython.tex', 'Pense Python Documentation', + 'Allen B. Downey', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'pensepython', 'Pense Python Documentation', + [author], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'PensePython', 'Pense Python Documentation', + author, 'PensePython', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False + + +# -- Options for Epub output ---------------------------------------------- + +# Bibliographic Dublin Core info. +epub_title = project +epub_author = author +epub_publisher = author +epub_copyright = copyright + +# The basename for the epub file. It defaults to the project name. +#epub_basename = project + +# The HTML theme for the epub output. Since the default themes are not optimized +# for small screen space, using the same theme for HTML and epub output is +# usually not wise. This defaults to 'epub', a theme designed to save visual +# space. +#epub_theme = 'epub' + +# The language of the text. It defaults to the language option +# or 'en' if the language is not set. +#epub_language = '' + +# The scheme of the identifier. Typical schemes are ISBN or URL. +#epub_scheme = '' + +# The unique identifier of the text. This can be a ISBN number +# or the project homepage. +#epub_identifier = '' + +# A unique identification for the text. +#epub_uid = '' + +# A tuple containing the cover image and cover page html template filenames. +#epub_cover = () + +# A sequence of (type, uri, title) tuples for the guide element of content.opf. +#epub_guide = () + +# HTML files that should be inserted before the pages created by sphinx. +# The format is a list of tuples containing the path and title. +#epub_pre_files = [] + +# HTML files shat should be inserted after the pages created by sphinx. +# The format is a list of tuples containing the path and title. +#epub_post_files = [] + +# A list of files that should not be packed into the epub file. +epub_exclude_files = ['search.html'] + +# The depth of the table of contents in toc.ncx. +#epub_tocdepth = 3 + +# Allow duplicate toc entries. +#epub_tocdup = True + +# Choose between 'default' and 'includehidden'. +#epub_tocscope = 'default' + +# Fix unsupported image types using the Pillow. +#epub_fix_images = False + +# Scale large images. +#epub_max_image_width = 0 + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#epub_show_urls = 'inline' + +# If false, no index is generated. +#epub_use_index = True diff --git a/book/figs/assign2.eps b/book/figs/assign2.eps new file mode 100644 index 0000000..e0d56f6 --- /dev/null +++ b/book/figs/assign2.eps @@ -0,0 +1,141 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: assign2.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5d +%%CreationDate: Mon Oct 19 10:19:36 2015 +%%BoundingBox: 0 0 60 42 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 42 moveto 0 0 lineto 60 0 lineto 60 42 lineto closepath clip newpath +-147.8 99.7 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 2475 975 m 3450 975 l 3450 1650 l 2475 1650 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2995 1451 m 3139 1500 l 3158 1443 l 3015 1394 l 3015 1394 l 3119 1462 l 2995 1451 l cp +eoclip +n 2760 1339 m + 3135 1467 l gs col0 s gr gr + +% arrowhead +n 2995 1451 m 3119 1462 l 3015 1394 l col0 s +% Polyline + [15 45] 45 sd +n 2766 1271 m + 3141 1174 l gs col0 s gr [] 0 sd +% Polyline +n 3075 1080 m + 3300 1230 l gs col0 s gr +% Polyline +n 3300 1080 m + 3075 1230 l gs col0 s gr +/Helvetica ff 183.33 scf sf +3150 1530 m +gs 1 -1 sc (7) col0 sh gr +/Helvetica ff 183.33 scf sf +3150 1230 m +gs 1 -1 sc (5) col0 sh gr +/Helvetica ff 183.33 scf sf +2730 1340 m +gs 1 -1 sc (x) dup sw pop neg 0 rm col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book/figs/assign2.fig b/book/figs/assign2.fig new file mode 100644 index 0000000..b239db3 --- /dev/null +++ b/book/figs/assign2.fig @@ -0,0 +1,23 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2760 1339 3135 1467 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 2766 1271 3141 1174 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 + 3075 1080 3300 1230 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 + 3300 1080 3075 1230 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2475 975 3450 975 3450 1650 2475 1650 2475 975 +4 0 0 50 0 16 11 0.0000 4 120 105 3150 1530 7\001 +4 0 0 50 0 16 11 0.0000 4 120 105 3150 1230 5\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2730 1340 x\001 diff --git a/book/figs/assign2.fig.bak b/book/figs/assign2.fig.bak new file mode 100644 index 0000000..df54f87 --- /dev/null +++ b/book/figs/assign2.fig.bak @@ -0,0 +1,25 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 2325 1080 3300 1530 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2760 1339 3135 1467 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 2766 1271 3141 1174 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 + 3075 1080 3300 1230 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 + 3300 1080 3075 1230 +4 0 0 50 0 16 11 0.0000 4 120 90 3150 1530 7\001 +4 0 0 50 0 16 11 0.0000 4 120 90 3150 1230 5\001 +4 2 0 50 0 16 11 0.0000 4 120 375 2730 1340 bruce\001 +-6 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2175 975 3450 975 3450 1650 2175 1650 2175 975 diff --git a/book/figs/assign2.pdf b/book/figs/assign2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a57a3ac11d80b97482f95db7f58315e17c70e6cd GIT binary patch literal 3893 zcmb_f3s6+&6}I)&xe`;+sGTI{_rWYycJFK7-CYa2tRSosphz@SFL&=QS9bSq@4d+4 zb7GyTnUYeS@tql~M)R6JY-%P65f#)*1hL~|FlcEe4;yVXYN|$v_WXBuVL_+1Gh7Dv z|MQ=7{_~&job#VQqsZgc(*`4v@z;Mf>?TZzLQ>^Y!r>qbg-B4XLS~>8lU^~T3Nj+S zAx;%M0x$Ummy1wTS>VD%?A7q|C+D^NH0{HlSu3+Peb9Mz)zJkrj=t}kG4_quH&5I( zV&><=b~eNjHWs)n9bHn7(kbev;#pBAau@y#ph!e=>62Qx|l)k0*D$cJ555^>C}{=!xdv z{OpNw`!hEbeD=rbn|>^uf9p!e+%07d1uKW2^3qGkZCYKq);MNi`Qo-)^Z)kFKD}et z?vD5Lhn&$C)2A7|A7=X2-b@yD9iFMQ|N&eIzocwg6d{mA=|)}8H< z!;Pm5Rql@uoZY@`^j5>k$(?m=^Y%ZzWP|j@R-@kJ<+$===2`9k_I~KbW|7WZ$ksulSeO_7@704nkD3CtEFLF6j3@xHy*-RlL zQ$fIzEJReqVoV6KSWu)InHLm5t4Nmk51IB`P3>XsiW9yb_4h zv^D_%NjJlC5NN2uDpN$U_CyTD zCEc9Lg`{9oMZ$WYpmKg#L3EtZzqe(eg8pL==<%Rt~=jTJS$HKEfZ9c=QMYD1cjHys4B_GhE-_p&{n{mqO7Ry zDo#cwmMr8FW16AJ1)^WAQWhbT2_qi=i!tc?A^JxBwA9g%ubU_eheQN&SBwO~z({sP z5&PyPHI*ukJ`5RnI2i}{$SGhB@`yH_$AyJQyDkR;7~)sYu*k$v$U@mFa0Lk}fH_T5 zMuN;%cpT8M0(=kuyLWF+aYmu{NX7vx>ztqc#EHy;_Ez$QuYK13vgoL{PPMicmgRN4nROzwEUz#> z-}gOnOhH?Ids*~kTWeP439{sL^n5ABP}JFx>HAi1dq02gG2+O}b;k%7k^SbEdu=c0 zX0A<3OKW>--xq0V8`3J%($li)>qF)<4Qm#kYj3`@XU~cw4L857@2*|BIP2b}&wD&& z74LTE9Qx(zF{_@eJjeB1>s@h0>h8Yv!s7j_w)9TvspzfEy85)a>ABH!Bdgb_w;JzH zKmOeL`P`)f2byO6^Wc5`_-!w4*)ii#?}`am?_5HAUK+c+XZOaop4j%_+E2QJX62wRy%d&z9OVbQm9%~ z5o53!Xg$qlp@0m@TPw-ch&GsYpi=e+?8R_}#1+EKsjE`esGTHhYikX)tU;24ByF?V zNQxmDMh_f%r7og!F?~dt4*O|_h~<4^5yha{WZ>?(^xFge%7BGtSUo3Lt$LacP8=4U_V%Z4O#F5jO=hn z`fGSWcIxI76{0y+lA^{-JF*!li;hejf2gbiY#!|e05stS2k_W^P>=(49=N7m3`Lvt zG^M9)r8H%yZFVE8r;K)ra*%^K0eld3L;nT+*#97!!kHo}$)ykyu7DV1{K7I+CddlL zf;BLxh*SBh5ERT1GWp}%YdR7l4iW>F;;Nx`9vAib{=56aVI1F>&+d`_aq~u{|V9TUmHwB=xB>2i=+s&r(E|h|A$UV?<=JB*DW2w{M8dj|3#7 zwQ|rade9<=o6V+jY?Oy#nQY3!ux_v0YRS&Ad2J>yoomi@J)WZiziAYelT{5M)@Y`P KjEvm*UgAH{Q0!s= literal 0 HcmV?d00001 diff --git a/book/figs/banana.eps b/book/figs/banana.eps new file mode 100644 index 0000000..653aa97 --- /dev/null +++ b/book/figs/banana.eps @@ -0,0 +1,194 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: banana.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5-alpha7 +%%CreationDate: Thu Jan 3 09:25:45 2008 +%%For: downey@rocky (Allen Downey,,,) +%%BoundingBox: 0 0 195 52 +%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 52 moveto 0 0 lineto 195 0 lineto 195 52 lineto closepath clip newpath +-93.8 99.9 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 1575 825 m 4800 825 l 4800 1350 l 1575 1350 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2338 1110 m 2490 1110 l 2490 1050 l 2338 1050 l 2338 1050 l 2458 1080 l 2338 1110 l cp +eoclip +n 2100 1080 m + 2475 1080 l gs col0 s gr gr + +% arrowhead +n 2338 1110 m 2458 1080 l 2338 1050 l col0 s +% Polyline + [15 45] 45 sd +n 2700 825 m + 2700 1500 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 3000 825 m + 3000 1500 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 3300 825 m + 3300 1500 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 3600 825 m + 3600 1500 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 3900 825 m + 3900 1500 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 4200 825 m + 4200 1500 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 4500 825 m + 4500 1500 l gs col0 s gr [] 0 sd +/Helvetica ff 183.33 scf sf +2025 1125 m +gs 1 -1 sc (fruit) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 366.67 scf sf +2775 1200 m +gs 1 -1 sc (b) col0 sh gr +/Helvetica ff 366.67 scf sf +3075 1200 m +gs 1 -1 sc (a) col0 sh gr +/Helvetica ff 366.67 scf sf +3375 1200 m +gs 1 -1 sc (n) col0 sh gr +/Helvetica ff 366.67 scf sf +3975 1200 m +gs 1 -1 sc (n) col0 sh gr +/Helvetica ff 366.67 scf sf +3675 1200 m +gs 1 -1 sc (a) col0 sh gr +/Helvetica ff 366.67 scf sf +4275 1200 m +gs 1 -1 sc (a) col0 sh gr +/Helvetica ff 366.67 scf sf +4575 1200 m +gs 1 -1 sc (') col0 sh gr +/Helvetica ff 183.33 scf sf +2625 1650 m +gs 1 -1 sc (0) col0 sh gr +/Helvetica ff 183.33 scf sf +2925 1650 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +3225 1650 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 183.33 scf sf +3525 1650 m +gs 1 -1 sc (3) col0 sh gr +/Helvetica ff 183.33 scf sf +3825 1650 m +gs 1 -1 sc (4) col0 sh gr +/Helvetica ff 183.33 scf sf +4125 1650 m +gs 1 -1 sc (5) col0 sh gr +/Helvetica ff 183.33 scf sf +4425 1650 m +gs 1 -1 sc (6) col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1650 m +gs 1 -1 sc (index) col0 sh gr +/Helvetica ff 366.67 scf sf +2550 1200 m +gs 1 -1 sc (') col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage +%%Trailer +%EOF diff --git a/book/figs/banana.fig b/book/figs/banana.fig new file mode 100644 index 0000000..f6fc430 --- /dev/null +++ b/book/figs/banana.fig @@ -0,0 +1,45 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1080 2475 1080 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 2700 825 2700 1500 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 3000 825 3000 1500 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 3300 825 3300 1500 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 3600 825 3600 1500 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 3900 825 3900 1500 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 4200 825 4200 1500 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 4500 825 4500 1500 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1575 825 4800 825 4800 1350 1575 1350 1575 825 +4 2 0 50 0 16 11 0.0000 4 135 300 2025 1125 fruit\001 +4 0 0 50 0 16 22 0.0000 4 285 210 2775 1200 b\001 +4 0 0 50 0 16 22 0.0000 4 210 195 3075 1200 a\001 +4 0 0 50 0 16 22 0.0000 4 210 210 3375 1200 n\001 +4 0 0 50 0 16 22 0.0000 4 210 210 3975 1200 n\001 +4 0 0 50 0 16 22 0.0000 4 210 195 3675 1200 a\001 +4 0 0 50 0 16 22 0.0000 4 210 195 4275 1200 a\001 +4 0 0 50 0 16 22 0.0000 4 90 90 4575 1200 '\001 +4 0 0 50 0 16 11 0.0000 4 135 105 2625 1650 0\001 +4 0 0 50 0 16 11 0.0000 4 135 105 2925 1650 1\001 +4 0 0 50 0 16 11 0.0000 4 135 105 3225 1650 2\001 +4 0 0 50 0 16 11 0.0000 4 135 105 3525 1650 3\001 +4 0 0 50 0 16 11 0.0000 4 135 105 3825 1650 4\001 +4 0 0 50 0 16 11 0.0000 4 135 105 4125 1650 5\001 +4 0 0 50 0 16 11 0.0000 4 135 105 4425 1650 6\001 +4 0 0 50 0 16 11 0.0000 4 135 450 2025 1650 index\001 +4 0 0 50 0 16 22 0.0000 4 90 90 2550 1200 '\001 diff --git a/book/figs/banana.pdf b/book/figs/banana.pdf new file mode 100644 index 0000000000000000000000000000000000000000..70c6225ffc083e7f039ce261281704b4465b17ea GIT binary patch literal 5443 zcmb_gd0dR^9=BwhETQBO-Y8Qtz4OjAYtt~TN+naNPDRtqJJV=3GjG#Ws8pPitt;eQ zq;5x%5S6&$AX(Dl*rG#+Y==U!lE4Y`0kpG4!+zE1Rzi65@VJ9__GZ{o4vW~2#!s2t#>=mrn8kW?x%$b|z&{VJxnaFCVV%1` zs#r^3HX1HFcYj^R1+xhg>x_@4pP95=TDK{4@4Vga)+>mvOI^H5eaCBykqWaz{~*0q zpY_&OEII9M8(WpUzcC~=idK9uOB>rhgkm7^~q_ma`4WX<-cSY+y9Ebp1lTk zEohPt4>f7bEByJvgPq7$>Vl}N*HS#kL=0^n*pi@_yNjcKbD3X!Mq1G^rNJVyAw+2N zG~=Dna?ENK@&2@AqIUyKTceFPE|_CiHcfum9f z1(U%v!lFSmN+otYnDkdjI)a1(`9z{nAsUqiF{qSKe3z7Hz=9Am zgHC{X8X=xvUprt~dLLx(f&tP8+l`n#rpyegiXn=?G z=;IzFz=7RDXjB%E2|@*AsTC}M!(kDO!eUq~)q)?8$FLMuz)A($Z{e^S)<|_Q24fLw z6os*9B^(9o;8;|xwAQZ`?DZ%WLU0iK2R`2K_EOhr(El(1=Jv=pt?jJ+`E9HH-HsEQ zn&_egHI{8K=+_LZl2RXe-LnAF%9ysIL3b`E#s~d0@L6|J-w-nsWX|YwCiw7wzqxpHmlvg=KU0zl)D=zJ0A@ zd$n1)eT=nVq~-Gcf&ljcj~{a799JkH`BLD~KfK0e%-V`WRM^~q*$+fr0h_fFCF z>h6c_Wn)|_`6I4QowezftEKNBeg-D)*7*@>xr?(cu6kTd2`@0&ye&2nTa#1Ja&_6> z4V~_)h2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zIQWjjosYWeQ&SN&wp4O%^&)5#PU^U#)9$lYSLIZb-#4GN~%wHi_qKa zT4z+Qa9^N90~YuQ#0x^j z90}2pM{sZyfie~)8AMu=)YxL_A#nY2$2cH_4WoX(MVzs z#yA)zLPiuUluHzP`$3pSqYPDG5S7d!BP4|O10>afG9f~v3xyCelL%PqBvN~SP}FuX z1T!vCj$vAR7>0t-ME4VVCo>_NdU2@|6_E^(Tl7c@<-(PJHTCd4MQ5F*^U^KYOK z@W|iq9k{V`^9}&V-WwEr(nuH3F7T)ngi4|?KuIP*nD$hPJ(WeG(CsM{2lxw2;Br9f z3>s_DX#WS&ZkXLjH97$Z1fEnOqe{?lC=k?FxCdxtD&!}^#BwDXjw&IBs6)JwM<LM?Y0LzS*Q({D(SfrC6WZ1EWyki7`ga(d+KOPr60`!f(Z^!7< z8421=E-?Z>0m10=Gq_ug-<8qUf0xiUpvAzG1XvtT6KfZcRS1>Bpi&Vgm10aUB85T( zXdn&$1w(*4%KD=Vx>##;*8iG7HXnOugASE~&Jnam_(|6BK}-gN#(<+|zP0QhcUjB1Dgu($W`xh`e=wQEuQD|S| zQJ7!DSd_0|G#VW|UUbR8bRy8#>A>S61P3SN%o(-kmqWw1Cd6jzqB3yb3HLgTaCocT0Y+EiB;8t>mRX5$YjdQ7Clj1Ho6Xl%ly KNv^(bg#Q7RC(9H7 literal 0 HcmV?d00001 diff --git a/book/figs/class1.eps b/book/figs/class1.eps new file mode 100644 index 0000000..0bd9600 --- /dev/null +++ b/book/figs/class1.eps @@ -0,0 +1,142 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: class1.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5-alpha7 +%%CreationDate: Thu Aug 16 11:40:34 2007 +%%For: downey@rocky (Allen Downey,,,) +%%BoundingBox: 0 0 150 87 +%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 87 moveto 0 0 lineto 150 0 lineto 150 87 lineto closepath clip newpath +-156.8 149.2 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 2625 1050 m 3525 1050 l 3525 1500 l 2625 1500 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 2625 2025 m 3525 2025 l 3525 2475 l 2625 2475 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4200 1050 m 5100 1050 l 5100 1500 l 4200 1500 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +3150 1627 m 3150 1485 l 3000 1485 l 3000 1627 l 3000 1627 l 3075 1507 l 3150 1627 l cp +eoclip +n 3075 2025 m + 3075 1500 l gs col0 s gr gr + +% arrowhead +n 3150 1627 m 3075 1507 l 3000 1627 l 3150 1627 l cp gs col7 1.00 shd ef gr col0 s +% Polyline +gs clippath +4071 1335 m 4215 1335 l 4215 1215 l 4071 1215 l 4071 1215 l 4191 1275 l 4071 1335 l cp +eoclip +n 3525 1275 m + 4200 1275 l gs col0 s gr gr + +% arrowhead +n 4071 1335 m 4191 1275 l 4071 1215 l col0 s +/Helvetica ff 183.33 scf sf +2850 2325 m +gs 1 -1 sc (Hand) col0 sh gr +/Helvetica ff 183.33 scf sf +2850 1350 m +gs 1 -1 sc (Deck) col0 sh gr +/Helvetica ff 233.33 scf sf +4125 1275 m +gs 1 -1 sc (*) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4800 1350 m +gs 1 -1 sc (Card) dup sw pop neg 0 rm col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage +%%Trailer +%EOF diff --git a/book/figs/class1.fig b/book/figs/class1.fig new file mode 100644 index 0000000..1dbd926 --- /dev/null +++ b/book/figs/class1.fig @@ -0,0 +1,25 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2625 1050 3525 1050 3525 1500 2625 1500 2625 1050 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2625 2025 3525 2025 3525 2475 2625 2475 2625 2025 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 1 0 1.00 150.00 120.00 + 3075 2025 3075 1500 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 120.00 120.00 + 3525 1275 4200 1275 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4200 1050 5100 1050 5100 1500 4200 1500 4200 1050 +4 0 0 50 0 16 11 0.0000 4 135 450 2850 2325 Hand\001 +4 0 0 50 0 16 11 0.0000 4 135 435 2850 1350 Deck\001 +4 2 0 50 0 16 14 0.0000 4 75 90 4125 1275 *\001 +4 2 0 50 0 16 11 0.0000 4 135 405 4800 1350 Card\001 diff --git a/book/figs/class1.pdf b/book/figs/class1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..16091c76eecac09a1c1eb1c123a4e7f71037a746 GIT binary patch literal 4630 zcmb_gd0Z3M6K_$hT`N_JC-`H%8bFiH<{*b82*hv(Xh1=b>XK|iAjzh?3q)E_t9W3o zRPY3^)&nit;z2z?iWddEia+tJ3RbBH9@MI6)!*9?F7@+k|8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Ljy^uZ)$>q`=pbaF+_Q{Yrbh=|+2k za+SFyz~#(6@lZ&aOU4!Q_^3c2w%solm&*cd;2!=1M>KS$yak}qU>?}qP7`pMwyZmiD-^#@6YyWBaZ%8wz9K7N z%JNreBJS&aVlHTjy7Pfj9JGwxX;fbTs4xB~nJ-HL)M5c`XH-l6~$ h1q-ORKq>!cjs&I;r)Z3%Z2$>Si3l1!dP0N}`X8u-P3Qms literal 0 HcmV?d00001 diff --git a/book/figs/compile.eps b/book/figs/compile.eps new file mode 100644 index 0000000..901f239 --- /dev/null +++ b/book/figs/compile.eps @@ -0,0 +1,222 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: compile.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5a +%%CreationDate: Wed May 30 11:14:49 2012 +%%BoundingBox: 0 0 385 61 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 61 moveto 0 0 lineto 385 0 lineto 385 61 lineto closepath clip newpath +-2.7 86.0 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 63 +% Polyline +0 slj +0 slc +15.000 slw +n 3936 655 m 3840 548 l 3840 915 l + 3936 813 l gs col0 s gr +% Polyline +n 1304 647 m 1207 540 l 1207 907 l + 1304 805 l gs col0 s gr +% here ends figure; +% +% here starts figure with depth 50 +% Polyline +0 slj +0 slc +7.500 slw +gs clippath +3657 795 m 3869 795 l 3869 705 l 3657 705 l 3657 705 l 3837 750 l 3657 795 l cp +eoclip +n 3525 750 m + 3854 750 l gs col0 s gr gr + +% arrowhead +n 3657 795 m 3837 750 l 3657 705 l col0 s +% Polyline +15.000 slw +n 5002 1248 m 5100 1350 l 5100 984 l + 5002 1089 l gs col0 s gr +% Polyline +7.500 slw +gs clippath +5232 1170 m 5444 1170 l 5444 1080 l 5232 1080 l 5232 1080 l 5412 1125 l 5232 1170 l cp +eoclip +n 5100 1125 m + 5429 1125 l gs col0 s gr gr + +% arrowhead +n 5232 1170 m 5412 1125 l 5232 1080 l col0 s +% Polyline +15.000 slw +n 3936 548 m 5010 548 l 5010 1342 l 3936 1342 l + cp gs col0 s gr +% Polyline +n 2700 525 m 3525 525 l 3525 1350 l 2700 1350 l + cp gs col0 s gr +% Polyline +7.500 slw +gs clippath +1024 787 m 1236 787 l 1236 697 l 1024 697 l 1024 697 l 1204 742 l 1024 787 l cp +eoclip +n 892 742 m + 1221 742 l gs col0 s gr gr + +% arrowhead +n 1024 787 m 1204 742 l 1024 697 l col0 s +% Polyline +15.000 slw +n 67 442 m 742 442 l 892 592 l 892 1342 l 67 1342 l + 67 442 l cp gs col0 s gr +% Polyline +7.500 slw +n 742 442 m 742 592 l + 892 592 l gs col0 s gr +% Polyline +15.000 slw +n 1304 540 m 2274 540 l 2274 1327 l 1304 1327 l + cp gs col0 s gr +% Polyline +n 2274 1225 m 2371 1327 l 2371 961 l + 2274 1066 l gs col0 s gr +% Polyline +7.500 slw +gs clippath +2509 1162 m 2721 1162 l 2721 1072 l 2509 1072 l 2509 1072 l 2689 1117 l 2509 1162 l cp +eoclip +n 2377 1117 m + 2706 1117 l gs col0 s gr gr + +% arrowhead +n 2509 1162 m 2689 1117 l 2509 1072 l col0 s +% Polyline +15.000 slw +n 5694 1296 m 6151 1296 l 6151 1356 l 5694 1356 l + cp gs col0 s gr +% Polyline +n 5598 1357 m 6259 1357 l 6259 1412 l 5598 1412 l + cp gs col0 s gr +% Polyline +n 5413 463 m 6437 463 l 6437 1296 l 5413 1296 l + cp gs col7 1.00 shd ef gr gs col0 s gr +% Polyline +7.500 slw +n 5467 519 m 6381 519 l 6381 1237 l 5467 1237 l + cp gs col7 1.00 shd ef gr gs col0 s gr +/Helvetica ff 166.67 scf sf +2775 1125 m +gs 1 -1 sc (CODE) col0 sh gr +/Helvetica ff 166.67 scf sf +2775 900 m +gs 1 -1 sc (OBJECT) col0 sh gr +/Helvetica ff 166.67 scf sf +4005 975 m +gs 1 -1 sc (EXECUTOR) col0 sh gr +/Helvetica ff 166.67 scf sf +142 1117 m +gs 1 -1 sc (CODE) col0 sh gr +/Helvetica ff 166.67 scf sf +142 892 m +gs 1 -1 sc (SOURCE) col0 sh gr +/Helvetica ff 166.67 scf sf +1342 967 m +gs 1 -1 sc (COMPILER) col0 sh gr +/Helvetica ff 166.67 scf sf +5588 953 m +gs 1 -1 sc (OUTPUT) col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book/figs/compile.fig b/book/figs/compile.fig new file mode 100644 index 0000000..cf882be --- /dev/null +++ b/book/figs/compile.fig @@ -0,0 +1,54 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 180.00 + 3525 750 3854 750 +2 1 0 2 0 7 63 0 -1 0.000 0 0 -1 0 0 4 + 3936 655 3840 548 3840 915 3936 813 +2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 4 + 5002 1248 5100 1350 5100 984 5002 1089 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 180.00 + 5100 1125 5429 1125 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 3936 548 5010 548 5010 1342 3936 1342 3936 548 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 2700 525 3525 525 3525 1350 2700 1350 2700 525 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 180.00 + 892 742 1221 742 +2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 6 + 67 442 742 442 892 592 892 1342 67 1342 67 442 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3 + 742 442 742 592 892 592 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 1304 540 2274 540 2274 1327 1304 1327 1304 540 +2 1 0 2 0 7 63 0 -1 0.000 0 0 -1 0 0 4 + 1304 647 1207 540 1207 907 1304 805 +2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 4 + 2274 1225 2371 1327 2371 961 2274 1066 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 180.00 + 2377 1117 2706 1117 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 5694 1296 6151 1296 6151 1356 5694 1356 5694 1296 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 5598 1357 6259 1357 6259 1412 5598 1412 5598 1357 +2 2 0 2 0 7 50 0 20 0.000 0 0 -1 0 0 5 + 5413 463 6437 463 6437 1296 5413 1296 5413 463 +2 2 0 1 0 7 50 0 20 0.000 0 0 -1 0 0 5 + 5467 519 6381 519 6381 1237 5467 1237 5467 519 +4 0 0 50 0 16 10 0.0000 4 120 465 2775 1125 CODE\001 +4 0 0 50 0 16 10 0.0000 4 120 600 2775 900 OBJECT\001 +4 0 0 50 0 16 10 0.0000 4 120 855 4005 975 EXECUTOR\001 +4 0 0 50 0 16 10 0.0000 4 120 465 142 1117 CODE\001 +4 0 0 50 0 16 10 0.0000 4 120 675 142 892 SOURCE\001 +4 0 0 50 0 16 10 0.0000 4 120 825 1342 967 COMPILER\001 +4 0 0 50 0 16 10 0.0000 4 120 615 5588 953 OUTPUT\001 diff --git a/book/figs/compile.pdf b/book/figs/compile.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2c888eaf30fd677b4eef531aae9aa1355e8ae0fa GIT binary patch literal 5098 zcmb^#dt6LuJ90frB;-R*B~zHrIdh*;W1FUnG`iQ2R@2OxX*4%8r;Cu>g_Ls3b&ITa zqp+V_kje>}VSpX7lFm9GLVk61_DUsIl?@cCnZY1qyU-$OPvrLwW73Km(tdGm5mo61qO z8Cmj?laMvZmhzak&}YtsC)L#>Mx9&Te$;bTWy}Wg-1FfdCo2Se%z5jj?RAjTW3P@O>2Gk2tSgqm zij03U>dF6Xlm&Hx7@t!kc)kut{3Qw;5#chWM4(N8!%=Wd=P+Rw76E}XJ+2{OI+;5V z5{MhLv3e1=_{LIF9&F)hU z#QE}++;$xbBnF%`3=$UTD)rj?n61F3G}Z4&wjb{8K*Q6Uzn8xP7Oq5(PnJkz?Ck?=6bD&NP z5}#bLzy-)Pi3j$iKQ-WiRB9A}y~a&rP=4A6#YPci?2z^b=IM4Ksc#QYe03e;c7{Za z|NXrMApAh|QE7CT%>tS*un6**Rv2Iw(3%4wZU!kCjNkyokwoW>D;3dQTheCa86bv` zX~6qRshdWj!eJCbf(Tq43Sy7}AtI&00Ip*+7HJf~2iOvXu_Gct+z}z-flNbu5MM-u z_#ysCAQFTGBO!>`$*4N09XK7vNCWlsI=Szp`QyJY6;|CRfGPzTmGd-17s=MSPPZ!C5z7zK+Z?qYH3`#tZ; z8DW8&82zu<=J~AiIuLa-t!yYKc#ydX&F=mM&l~RgY%fpQn1zDmG0@73$$yM1HL=>z zYt)4kDbs8Q|EDlBENuX4*EoRAEbx+>Ts6;*p}LMNy3%oQPp?LH`{*L8e=U4A`(bLw z{rz<}V_FO2MkJl;=j1((lI})rS#I_wmN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^7nc`>gwDWYogPpr z`JD?RDe{@!-}uJ}0x1n#g?xH2_z?V!zHi6q^D7D7URO#y`3C;w74FdkcjvU@-=(w@ z=(x!=0X8QS#Zky3vkYa@Q4BQb#ss6FCL-LoqP_ zeg$K5!65r33`03!?)?gef#LjX7=tW>U*pmKiia`(3S%+BnD`|v9cA^9OXwva%=O^6 zG#Cj|CW7If0V9E0EttZ|Q3yt+Y2;eiI2M87O9+R%a5*d%!$T-wx^cKHHj2{R+}JcW klZ^_wECEx<=KnKB1UcXv2#KCBI*7qyF(C&B4?j=nzkSL;`Tzg` literal 0 HcmV?d00001 diff --git a/book/figs/dict1.eps b/book/figs/dict1.eps new file mode 100644 index 0000000..7987e4d --- /dev/null +++ b/book/figs/dict1.eps @@ -0,0 +1,321 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: dict1.fig +%%Creator: fig2dev Version 3.2 Patchlevel 4 +%%CreationDate: Tue Jul 31 12:32:19 2007 +%%For: downey@rocky.olin.edu (Allen Downey) +%%BoundingBox: 0 0 316 134 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 134 moveto 0 0 lineto 316 0 lineto 316 134 lineto closepath clip newpath +-27.0 225.7 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +7.500 slw +n 1125 1725 m 2400 1725 l 2400 3300 l 1125 3300 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4350 1725 m 5700 1725 l 5700 3000 l 4350 3000 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 3375 1725 m 4050 1725 l 4050 3750 l 3375 3750 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4350 3375 m 5700 3375 l 5700 3750 l 4350 3750 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +1965 2227 m 1965 2167 l 1813 2167 l 1933 2197 l 1813 2227 l cp +eoclip +n 1575 2197 m + 1950 2197 l gs col0 s gr gr + +% arrowhead +n 1813 2227 m 1933 2197 l 1813 2167 l col0 s +% Polyline +gs clippath +1965 1927 m 1965 1867 l 1813 1867 l 1933 1897 l 1813 1927 l cp +eoclip +n 1575 1897 m + 1950 1897 l gs col0 s gr gr + +% arrowhead +n 1813 1927 m 1933 1897 l 1813 1867 l col0 s +% Polyline +gs clippath +1140 1905 m 1140 1845 l 988 1845 l 1108 1875 l 988 1905 l cp +eoclip +n 750 1875 m + 1125 1875 l gs col0 s gr gr + +% arrowhead +n 988 1905 m 1108 1875 l 988 1845 l col0 s +% Polyline +gs clippath +1965 2827 m 1965 2767 l 1813 2767 l 1933 2797 l 1813 2827 l cp +eoclip +n 1575 2797 m + 1950 2797 l gs col0 s gr gr + +% arrowhead +n 1813 2827 m 1933 2797 l 1813 2767 l col0 s +% Polyline +gs clippath +1965 3127 m 1965 3067 l 1813 3067 l 1933 3097 l 1813 3127 l cp +eoclip +n 1575 3097 m + 1950 3097 l gs col0 s gr gr + +% arrowhead +n 1813 3127 m 1933 3097 l 1813 3067 l col0 s +% Polyline +gs clippath +1965 2527 m 1965 2467 l 1813 2467 l 1933 2497 l 1813 2527 l cp +eoclip +n 1575 2497 m + 1950 2497 l gs col0 s gr gr + +% arrowhead +n 1813 2527 m 1933 2497 l 1813 2467 l col0 s +/Helvetica ff 165.00 scf sf +1500 1950 m +gs 1 -1 sc ('a') dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 1950 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +2025 2250 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +1125 1650 m +gs 1 -1 sc (dict) col0 sh gr +/Helvetica ff 165.00 scf sf +450 1950 m +gs 1 -1 sc (hist) col0 sh gr +/Helvetica ff 165.00 scf sf +1500 2250 m +gs 1 -1 sc ('p') dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 2850 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +1500 3150 m +gs 1 -1 sc ('o') dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 3150 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +1500 2550 m +gs 1 -1 sc ('r') dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 2550 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 165.00 scf sf +1500 2850 m +gs 1 -1 sc ('t') dup sw pop neg 0 rm col0 sh gr +% Polyline +gs clippath +5190 2227 m 5190 2167 l 5038 2167 l 5158 2197 l 5038 2227 l cp +eoclip +n 4800 2197 m + 5175 2197 l gs col0 s gr gr + +% arrowhead +n 5038 2227 m 5158 2197 l 5038 2167 l col0 s +% Polyline +gs clippath +5190 1927 m 5190 1867 l 5038 1867 l 5158 1897 l 5038 1927 l cp +eoclip +n 4800 1897 m + 5175 1897 l gs col0 s gr gr + +% arrowhead +n 5038 1927 m 5158 1897 l 5038 1867 l col0 s +% Polyline +gs clippath +5190 2527 m 5190 2467 l 5038 2467 l 5158 2497 l 5038 2527 l cp +eoclip +n 4800 2497 m + 5175 2497 l gs col0 s gr gr + +% arrowhead +n 5038 2527 m 5158 2497 l 5038 2467 l col0 s +% Polyline +gs clippath +5190 2827 m 5190 2767 l 5038 2767 l 5158 2797 l 5038 2827 l cp +eoclip +n 4800 2797 m + 5175 2797 l gs col0 s gr gr + +% arrowhead +n 5038 2827 m 5158 2797 l 5038 2767 l col0 s +/Helvetica ff 165.00 scf sf +4725 1950 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4725 2250 m +gs 1 -1 sc (1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +5250 1950 m +gs 1 -1 sc ('a') col0 sh gr +/Helvetica ff 165.00 scf sf +5250 2250 m +gs 1 -1 sc ('p') col0 sh gr +/Helvetica ff 165.00 scf sf +4350 1650 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 165.00 scf sf +4725 2550 m +gs 1 -1 sc (2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +5250 2550 m +gs 1 -1 sc ('t') col0 sh gr +/Helvetica ff 165.00 scf sf +5250 2850 m +gs 1 -1 sc ('o') col0 sh gr +/Helvetica ff 165.00 scf sf +4725 2850 m +gs 1 -1 sc (3) dup sw pop neg 0 rm col0 sh gr +% Polyline +gs clippath +4365 1919 m 4364 1859 l 4212 1861 l 4333 1890 l 4213 1921 l cp +eoclip +n 3825 1897 m + 4350 1890 l gs col0 s gr gr + +% arrowhead +n 4213 1921 m 4333 1890 l 4212 1861 l col0 s +% Polyline +gs clippath +3390 1905 m 3390 1845 l 3238 1845 l 3358 1875 l 3238 1905 l cp +eoclip +n 3000 1875 m + 3375 1875 l gs col0 s gr gr + +% arrowhead +n 3238 1905 m 3358 1875 l 3238 1845 l col0 s +% Polyline +gs clippath +4365 3551 m 4364 3491 l 4212 3493 l 4333 3522 l 4213 3553 l cp +eoclip +n 3825 3529 m + 4350 3522 l gs col0 s gr gr + +% arrowhead +n 4213 3553 m 4333 3522 l 4212 3493 l col0 s +% Polyline +gs clippath +5190 3577 m 5190 3517 l 5038 3517 l 5158 3547 l 5038 3577 l cp +eoclip +n 4800 3547 m + 5175 3547 l gs col0 s gr gr + +% arrowhead +n 5038 3577 m 5158 3547 l 5038 3517 l col0 s +/Helvetica ff 165.00 scf sf +3750 1950 m +gs 1 -1 sc (1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3375 1650 m +gs 1 -1 sc (dict) col0 sh gr +/Helvetica ff 165.00 scf sf +2700 1950 m +gs 1 -1 sc (inv) col0 sh gr +/Helvetica ff 165.00 scf sf +3750 3600 m +gs 1 -1 sc (2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4725 3600 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4350 3300 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 165.00 scf sf +5250 3600 m +gs 1 -1 sc ('r') col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage diff --git a/book/figs/dict1.fig b/book/figs/dict1.fig new file mode 100644 index 0000000..f1cf02e --- /dev/null +++ b/book/figs/dict1.fig @@ -0,0 +1,91 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 450 1500 2400 3300 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 2197 1950 2197 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 1897 1950 1897 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 750 1875 1125 1875 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 2797 1950 2797 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 3097 1950 3097 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 2497 1950 2497 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1125 1725 2400 1725 2400 3300 1125 3300 1125 1725 +4 2 0 50 0 16 11 0.0000 4 120 135 1500 1950 'a'\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 1950 1\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 2250 1\001 +4 0 0 50 0 16 11 0.0000 4 120 255 1125 1650 dict\001 +4 0 0 50 0 16 11 0.0000 4 120 255 450 1950 hist\001 +4 2 0 50 0 16 11 0.0000 4 150 150 1500 2250 'p'\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 2850 1\001 +4 2 0 50 0 16 11 0.0000 4 120 150 1500 3150 'o'\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 3150 1\001 +4 2 0 50 0 16 11 0.0000 4 120 120 1500 2550 'r'\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 2550 2\001 +4 2 0 50 0 16 11 0.0000 4 120 120 1500 2850 't'\001 +-6 +6 4350 1500 5700 3000 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 2197 5175 2197 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 1897 5175 1897 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 2497 5175 2497 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 2797 5175 2797 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4350 1725 5700 1725 5700 3000 4350 3000 4350 1725 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 1950 0\001 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 2250 1\001 +4 0 0 50 0 16 11 0.0000 4 120 135 5250 1950 'a'\001 +4 0 0 50 0 16 11 0.0000 4 150 150 5250 2250 'p'\001 +4 0 0 50 0 16 11 0.0000 4 120 195 4350 1650 list\001 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 2550 2\001 +4 0 0 50 0 16 11 0.0000 4 120 120 5250 2550 't'\001 +4 0 0 50 0 16 11 0.0000 4 120 150 5250 2850 'o'\001 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 2850 3\001 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3825 1897 4350 1890 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 1875 3375 1875 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 3375 1725 4050 1725 4050 3750 3375 3750 3375 1725 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3825 3529 4350 3522 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 3547 5175 3547 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4350 3375 5700 3375 5700 3750 4350 3750 4350 3375 +4 2 0 50 0 16 11 0.0000 4 120 90 3750 1950 1\001 +4 0 0 50 0 16 11 0.0000 4 120 255 3375 1650 dict\001 +4 0 0 50 0 16 11 0.0000 4 120 210 2700 1950 inv\001 +4 2 0 50 0 16 11 0.0000 4 120 90 3750 3600 2\001 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 3600 0\001 +4 0 0 50 0 16 11 0.0000 4 120 195 4350 3300 list\001 +4 0 0 50 0 16 11 0.0000 4 120 120 5250 3600 'r'\001 diff --git a/book/figs/dict1.pdf b/book/figs/dict1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..db7af312ddf9627f06ac79f9d91e02b35cf9c8aa GIT binary patch literal 5915 zcmb_Ad0bP+^YyA44?sn$csxM}h{?-KNFXr;xdi2q`#ucG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^4&!rx06V$F2K4(6?cIM1AwW=zEKLdN8Xx89&{l`_Us(u@P zHIG$xA1)s+2mALo4~<5DfAg@-lrk+qQN5D zXgTT{?dZmf4&gERL^BS7ZN>%VG)hu(Wh8;B-Bv*0o;KCCbg^HnjUy;o%1~J-C@>*q zs92(4DNTtg5*8TaV3-K0P_PhFqL+gcgh{315D^AZ$xJdrLTIZXfgBVQky3dGgpe6T zz*5c^uv|cGJ;D&oOo_o5CS$>HWMm{cl17%wg)qWoGGPi8rcy}&gQSR(U|c0hqR;{R zsRR*uy(g0>$SRr0JZUH_@`4dE1s>aItgsPDB@n(bH%JPSj*iN!>5`MH5SO9y`fC|8f1^NblI1iPZ5^bF9A)8>S0vjoJ zArrDOLWD<8{vQYgEb{kf2WA{SJR9J!96+Thh_V7*3x`TUs3Z!VM5VeR3>KBbqSHwf zBNm0ihW~;IOb$pb!6OTJbom#g<1ojOO66|A5jX;okjh6RAP-coz%4){Qz0iV#tRms z5vUlVb4RvU@famx!?>BoY3V=I8&~Gw@c(NrG!%De9FJus<%NfWiglgUzjT-X(87G) zdog9*^IQh6vB_%l}~1NAf)14@R0GZHy$u!xB;G0IWJ zo4FVp8Hh!A{IJAaiO`g&B=J!JH(ZPnIeZZhL&(5hBl;JMI3oiUA^d^a-&jWl0s##S z1;0-h90K$oeg7S!4>=NKUQ=Quo&i6}!Q+~Mv540HyMQ(T%?KVOK;w9r=v#rPLZ}ov zXj2*B2M;eIg+c^qAPoNj!wol-{(BRQv6jm9|1p3J-nZ~dIVu2+EJ7#XnQY{P7<9Zz z6F{RdgoZcK_y?(=|?>lq|c9BZK zLk!*>Lhw3?Knmeb0p5JpSwX&RV=D^9m~L%pVPb_?QY=i2EljB3P05IEWNE}?GR!&u bjNy;J@hC8^98(#MZp5GxbakyatR?&p!#}$$ literal 0 HcmV?d00001 diff --git a/book/figs/dict2.eps b/book/figs/dict2.eps new file mode 100644 index 0000000..b1023b7 --- /dev/null +++ b/book/figs/dict2.eps @@ -0,0 +1,195 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: dict2.fig +%%Creator: fig2dev Version 3.2 Patchlevel 4 +%%CreationDate: Tue Jul 31 12:39:25 2007 +%%For: downey@rocky.olin.edu (Allen Downey) +%%BoundingBox: 0 0 231 125 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 125 moveto 0 0 lineto 231 0 lineto 231 125 lineto closepath clip newpath +-75.8 194.2 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +7.500 slw +n 1275 1350 m 5100 1350 l 5100 3225 l 1275 3225 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +3690 1852 m 3690 1792 l 3538 1792 l 3658 1822 l 3538 1852 l cp +eoclip +n 3300 1822 m + 3675 1822 l gs col0 s gr gr + +% arrowhead +n 3538 1852 m 3658 1822 l 3538 1792 l col0 s +% Polyline +gs clippath +3690 1552 m 3690 1492 l 3538 1492 l 3658 1522 l 3538 1552 l cp +eoclip +n 3300 1522 m + 3675 1522 l gs col0 s gr gr + +% arrowhead +n 3538 1552 m 3658 1522 l 3538 1492 l col0 s +% Polyline +gs clippath +3690 2452 m 3690 2392 l 3538 2392 l 3658 2422 l 3538 2452 l cp +eoclip +n 3300 2422 m + 3675 2422 l gs col0 s gr gr + +% arrowhead +n 3538 2452 m 3658 2422 l 3538 2392 l col0 s +% Polyline +gs clippath +3690 2752 m 3690 2692 l 3538 2692 l 3658 2722 l 3538 2752 l cp +eoclip +n 3300 2722 m + 3675 2722 l gs col0 s gr gr + +% arrowhead +n 3538 2752 m 3658 2722 l 3538 2692 l col0 s +% Polyline +gs clippath +3690 2152 m 3690 2092 l 3538 2092 l 3658 2122 l 3538 2152 l cp +eoclip +n 3300 2122 m + 3675 2122 l gs col0 s gr gr + +% arrowhead +n 3538 2152 m 3658 2122 l 3538 2092 l col0 s +% Polyline +gs clippath +3690 3030 m 3690 2970 l 3538 2970 l 3658 3000 l 3538 3030 l cp +eoclip +n 3300 3000 m + 3675 3000 l gs col0 s gr gr + +% arrowhead +n 3538 3030 m 3658 3000 l 3538 2970 l col0 s +/Helvetica ff 165.00 scf sf +3225 1575 m +gs 1 -1 sc (\('Cleese', 'John'\)) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3750 1575 m +gs 1 -1 sc ('08700 100 222') col0 sh gr +/Helvetica ff 165.00 scf sf +3750 1875 m +gs 1 -1 sc ('08700 100 222') col0 sh gr +/Helvetica ff 165.00 scf sf +3750 2175 m +gs 1 -1 sc ('08700 100 222') col0 sh gr +/Helvetica ff 165.00 scf sf +3750 2475 m +gs 1 -1 sc ('08700 100 222') col0 sh gr +/Helvetica ff 165.00 scf sf +3750 2775 m +gs 1 -1 sc ('08700 100 222') col0 sh gr +/Helvetica ff 165.00 scf sf +3225 1875 m +gs 1 -1 sc (\('Chapman', 'Graham'\)) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3225 2175 m +gs 1 -1 sc (\('Idle', 'Eric'\)) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3225 2775 m +gs 1 -1 sc (\('Jones', 'Terry'\)) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3225 2475 m +gs 1 -1 sc (\('Gilliam', 'Terry'\)) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3225 3075 m +gs 1 -1 sc (\('Palin', 'Michael'\)) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3750 3075 m +gs 1 -1 sc ('08700 100 222') col0 sh gr +/Helvetica ff 165.00 scf sf +1275 1275 m +gs 1 -1 sc (dict) col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage diff --git a/book/figs/dict2.fig b/book/figs/dict2.fig new file mode 100644 index 0000000..d376f55 --- /dev/null +++ b/book/figs/dict2.fig @@ -0,0 +1,42 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3300 1822 3675 1822 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3300 1522 3675 1522 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3300 2422 3675 2422 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3300 2722 3675 2722 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3300 2122 3675 2122 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3300 3000 3675 3000 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1275 1350 5100 1350 5100 3225 1275 3225 1275 1350 +4 2 0 50 0 16 11 0.0000 4 150 1125 3225 1575 ('Cleese', 'John')\001 +4 0 0 50 0 16 11 0.0000 4 120 1140 3750 1575 '08700 100 222'\001 +4 0 0 50 0 16 11 0.0000 4 120 1140 3750 1875 '08700 100 222'\001 +4 0 0 50 0 16 11 0.0000 4 120 1140 3750 2175 '08700 100 222'\001 +4 0 0 50 0 16 11 0.0000 4 120 1140 3750 2475 '08700 100 222'\001 +4 0 0 50 0 16 11 0.0000 4 120 1140 3750 2775 '08700 100 222'\001 +4 2 0 50 0 16 11 0.0000 4 150 1530 3225 1875 ('Chapman', 'Graham')\001 +4 2 0 50 0 16 11 0.0000 4 150 840 3225 2175 ('Idle', 'Eric')\001 +4 2 0 50 0 16 11 0.0000 4 150 1080 3225 2775 ('Jones', 'Terry')\001 +4 2 0 50 0 16 11 0.0000 4 150 1110 3225 2475 ('Gilliam', 'Terry')\001 +4 2 0 50 0 16 11 0.0000 4 150 1170 3225 3075 ('Palin', 'Michael')\001 +4 0 0 50 0 16 11 0.0000 4 120 1140 3750 3075 '08700 100 222'\001 +4 0 0 50 0 16 11 0.0000 4 120 255 1275 1275 dict\001 diff --git a/book/figs/dict2.pdf b/book/figs/dict2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..114a87a715acbfb6335ea937c3ca5f139eb1af29 GIT binary patch literal 6487 zcmb_Bc|26>`?=9FEhbVC?ulybXLd`BWREF^G)Ohg98AW{m^rqTN|rY5i*5>)EoI4# z>RL*)Dk+Jmr%ddj_StpWprdagUFg_kH&FS>E%$&&+eNu`?tYQE~IGzutWU zM}vrvXw6!jxjF2N2>nohhz=ku*p4qi5eWp_2{oW{DIiW5)fjK$5O=(^lu`A_P3w@H4CVu!t z&y!ouveG6{HO|=WOs_tn|1iVmfYUab|B~GKH77D1;&OXauJ)wFJ#(0l?X&2`v}PO6 z6FG{x_6JBoQ5Q?fZ2qc!ar;1leq;LE(AnwHUcF5X_Q6}DU!UAmJfrWD4(D^x+xj)v zHCv`671%^-J1+O%(D2tCTyV&(IXxk6WV0IYZ7ct{cXIzM9d4Ce8&mNwtw(tU{I@Cn zPp%y?rD!e^CFbv~0yOFb?Vz!U!2EJiH)lD|yq12)0xfO0;9Rvc?%wRf>ssD>oR~>y zb!c3uI$Mz_T3@H4y8FD(^V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Nb3b-Et literal 0 HcmV?d00001 diff --git a/book/figs/fibonacci.eps b/book/figs/fibonacci.eps new file mode 100644 index 0000000..ed1a8e3 --- /dev/null +++ b/book/figs/fibonacci.eps @@ -0,0 +1,356 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: fibonacci.eps +%%Creator: fig2dev Version 3.2 Patchlevel 3c +%%CreationDate: Fri Dec 7 17:25:43 2001 +%%For: downey@rocky.wellesley.edu (Allen B. Downey) +%%BoundingBox: 0 0 308 218 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 218 moveto 0 0 lineto 308 0 lineto 308 218 lineto closepath clip newpath +-62.0 244.0 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +%%Page: 1 1 +10 setmiterlimit + 0.06000 0.06000 sc +% +% Fig objects follow +% +% Polyline +7.500 slw +n 3450 450 m 4350 450 l 4350 1125 l 3450 1125 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 2250 1425 m 3150 1425 l 3150 2100 l 2250 2100 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4650 1425 m 5550 1425 l 5550 2100 l 4650 2100 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 5250 2400 m 6150 2400 l 6150 3075 l 5250 3075 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4050 2400 m 4950 2400 l 4950 3075 l 4050 3075 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 2850 2400 m 3750 2400 l 3750 3075 l 2850 3075 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1650 2400 m 2550 2400 l 2550 3075 l 1650 3075 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 2250 3375 m 3150 3375 l 3150 4050 l 2250 4050 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1050 3375 m 1950 3375 l 1950 4050 l 1050 4050 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +4095 929 m 4095 869 l 3943 869 l 4063 899 l 3943 929 l cp +eoclip +n 3705 899 m + 4080 899 l gs col0 s gr gr + +% arrowhead +n 3943 929 m 4063 899 l 3943 869 l col0 s +/Helvetica ff 165.00 scf sf +3555 705 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +3630 952 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4155 952 m +gs 1 -1 sc (4) col0 sh gr +% Polyline +gs clippath +3118 1414 m 3160 1456 l 3268 1349 l 3162 1413 l 3225 1306 l cp +eoclip +n 3450 1125 m + 3150 1425 l gs col0 s gr gr + +% arrowhead +n 3225 1306 m 3162 1413 l 3268 1349 l col0 s +% Polyline +gs clippath +2068 2389 m 2110 2431 l 2218 2324 l 2112 2388 l 2175 2281 l cp +eoclip +n 2400 2100 m + 2100 2400 l gs col0 s gr gr + +% arrowhead +n 2175 2281 m 2112 2388 l 2218 2324 l col0 s +% Polyline +gs clippath +1468 3364 m 1510 3406 l 1618 3299 l 1512 3363 l 1575 3256 l cp +eoclip +n 1800 3075 m + 1500 3375 l gs col0 s gr gr + +% arrowhead +n 1575 3256 m 1512 3363 l 1618 3299 l col0 s +% Polyline +gs clippath +4468 2389 m 4510 2431 l 4618 2324 l 4512 2388 l 4575 2281 l cp +eoclip +n 4800 2100 m + 4500 2400 l gs col0 s gr gr + +% arrowhead +n 4575 2281 m 4512 2388 l 4618 2324 l col0 s +% Polyline +gs clippath +4639 1456 m 4681 1414 l 4574 1306 l 4638 1413 l 4531 1349 l cp +eoclip +n 4350 1125 m + 4650 1425 l gs col0 s gr gr + +% arrowhead +n 4531 1349 m 4638 1413 l 4574 1306 l col0 s +% Polyline +gs clippath +3289 2431 m 3331 2389 l 3224 2281 l 3288 2388 l 3181 2324 l cp +eoclip +n 3000 2100 m + 3300 2400 l gs col0 s gr gr + +% arrowhead +n 3181 2324 m 3288 2388 l 3224 2281 l col0 s +% Polyline +gs clippath +2689 3406 m 2731 3364 l 2624 3256 l 2688 3363 l 2581 3299 l cp +eoclip +n 2400 3075 m + 2700 3375 l gs col0 s gr gr + +% arrowhead +n 2581 3299 m 2688 3363 l 2624 3256 l col0 s +% Polyline +gs clippath +5689 2431 m 5731 2389 l 5624 2281 l 5688 2388 l 5581 2324 l cp +eoclip +n 5400 2100 m + 5700 2400 l gs col0 s gr gr + +% arrowhead +n 5581 2324 m 5688 2388 l 5624 2281 l col0 s +% Polyline +gs clippath +2895 1904 m 2895 1844 l 2743 1844 l 2863 1874 l 2743 1904 l cp +eoclip +n 2505 1874 m + 2880 1874 l gs col0 s gr gr + +% arrowhead +n 2743 1904 m 2863 1874 l 2743 1844 l col0 s +% Polyline +gs clippath +5295 1904 m 5295 1844 l 5143 1844 l 5263 1874 l 5143 1904 l cp +eoclip +n 4905 1874 m + 5280 1874 l gs col0 s gr gr + +% arrowhead +n 5143 1904 m 5263 1874 l 5143 1844 l col0 s +% Polyline +gs clippath +5895 2879 m 5895 2819 l 5743 2819 l 5863 2849 l 5743 2879 l cp +eoclip +n 5505 2849 m + 5880 2849 l gs col0 s gr gr + +% arrowhead +n 5743 2879 m 5863 2849 l 5743 2819 l col0 s +% Polyline +gs clippath +4695 2879 m 4695 2819 l 4543 2819 l 4663 2849 l 4543 2879 l cp +eoclip +n 4305 2849 m + 4680 2849 l gs col0 s gr gr + +% arrowhead +n 4543 2879 m 4663 2849 l 4543 2819 l col0 s +% Polyline +gs clippath +3495 2879 m 3495 2819 l 3343 2819 l 3463 2849 l 3343 2879 l cp +eoclip +n 3105 2849 m + 3480 2849 l gs col0 s gr gr + +% arrowhead +n 3343 2879 m 3463 2849 l 3343 2819 l col0 s +% Polyline +gs clippath +2295 2879 m 2295 2819 l 2143 2819 l 2263 2849 l 2143 2879 l cp +eoclip +n 1905 2849 m + 2280 2849 l gs col0 s gr gr + +% arrowhead +n 2143 2879 m 2263 2849 l 2143 2819 l col0 s +% Polyline +gs clippath +2895 3854 m 2895 3794 l 2743 3794 l 2863 3824 l 2743 3854 l cp +eoclip +n 2505 3824 m + 2880 3824 l gs col0 s gr gr + +% arrowhead +n 2743 3854 m 2863 3824 l 2743 3794 l col0 s +% Polyline +gs clippath +1695 3854 m 1695 3794 l 1543 3794 l 1663 3824 l 1543 3854 l cp +eoclip +n 1305 3824 m + 1680 3824 l gs col0 s gr gr + +% arrowhead +n 1543 3854 m 1663 3824 l 1543 3794 l col0 s +/Helvetica ff 165.00 scf sf +2355 1680 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +2430 1927 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2955 1927 m +gs 1 -1 sc (3) col0 sh gr +/Helvetica ff 165.00 scf sf +4755 1680 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +4830 1927 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +5355 1927 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 165.00 scf sf +5355 2655 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +5430 2902 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +5955 2902 m +gs 1 -1 sc (0) col0 sh gr +/Helvetica ff 165.00 scf sf +4155 2655 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +4230 2902 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4755 2902 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +2955 2655 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +3030 2902 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3555 2902 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +1755 2655 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +1830 2902 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2355 2902 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 165.00 scf sf +2355 3630 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +2430 3877 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2955 3877 m +gs 1 -1 sc (0) col0 sh gr +/Helvetica ff 165.00 scf sf +1155 3630 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +1230 3877 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +1755 3877 m +gs 1 -1 sc (1) col0 sh gr +$F2psEnd +rs diff --git a/book/figs/fibonacci.fig b/book/figs/fibonacci.fig new file mode 100644 index 0000000..244cee1 --- /dev/null +++ b/book/figs/fibonacci.fig @@ -0,0 +1,107 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 3450 450 4350 1125 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 3450 450 4350 450 4350 1125 3450 1125 3450 450 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3705 899 4080 899 +4 0 0 50 0 16 11 0.0000 4 120 615 3555 705 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 3630 952 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 4155 952 4\001 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3450 1125 3150 1425 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2400 2100 2100 2400 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 3075 1500 3375 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 2100 4500 2400 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4350 1125 4650 1425 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 2100 3300 2400 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2400 3075 2700 3375 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5400 2100 5700 2400 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2250 1425 3150 1425 3150 2100 2250 2100 2250 1425 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2505 1874 2880 1874 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4650 1425 5550 1425 5550 2100 4650 2100 4650 1425 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4905 1874 5280 1874 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 5250 2400 6150 2400 6150 3075 5250 3075 5250 2400 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5505 2849 5880 2849 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4050 2400 4950 2400 4950 3075 4050 3075 4050 2400 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4305 2849 4680 2849 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2850 2400 3750 2400 3750 3075 2850 3075 2850 2400 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3105 2849 3480 2849 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 2400 2550 2400 2550 3075 1650 3075 1650 2400 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1905 2849 2280 2849 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2250 3375 3150 3375 3150 4050 2250 4050 2250 3375 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2505 3824 2880 3824 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1050 3375 1950 3375 1950 4050 1050 4050 1050 3375 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1305 3824 1680 3824 +4 0 0 50 0 16 11 0.0000 4 120 615 2355 1680 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2430 1927 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2955 1927 3\001 +4 0 0 50 0 16 11 0.0000 4 120 615 4755 1680 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 4830 1927 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 5355 1927 2\001 +4 0 0 50 0 16 11 0.0000 4 120 615 5355 2655 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 5430 2902 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 5955 2902 0\001 +4 0 0 50 0 16 11 0.0000 4 120 615 4155 2655 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 4230 2902 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 4755 2902 1\001 +4 0 0 50 0 16 11 0.0000 4 120 615 2955 2655 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 3030 2902 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 3555 2902 1\001 +4 0 0 50 0 16 11 0.0000 4 120 615 1755 2655 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 1830 2902 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2355 2902 2\001 +4 0 0 50 0 16 11 0.0000 4 120 615 2355 3630 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2430 3877 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2955 3877 0\001 +4 0 0 50 0 16 11 0.0000 4 120 615 1155 3630 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 1230 3877 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 1755 3877 1\001 diff --git a/book/figs/fibonacci.pdf b/book/figs/fibonacci.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ed4dc0dbf1662dc16f3b1b9e969e28b056c71369 GIT binary patch literal 5525 zcmb_AcU)7~_pMf?!2tyYQOgs>fRent3`in`5kL@vVQ(=cFCm&m@|cQN5rLnZQ7mHJ zivofJ!2#|CSVTn-1r@9a)S}>C-}?e6j?b_C!{-OQ_pE#FS@#^w`OdB+giI%xpYK|` zjlh5?kTP;U!PXY`L=_S&3bFWm7NB9y}+XfQP@kQ3tbYJzym zDK;aIcLug^u(}hx{#C^|3qo&wgTok?G4j%j3c>D%-rCBDj)gm}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wC^$w?Y2|p`s@{p^46r z=94tr7c8``zUp$}Fpy0JLc_IYM&uI|fPdDWMVWdRU#Q@{M~yZ{6{LW%u;( zwRv&e%vseJhin|O$ndVbn;L$NAKKnp65i<(YdH1N%6)It{LdyBto=OEEQ^Lll)-IfC)%EUiv1-{1UDI*iu3z>!+82HBTQTs~ ze=LqcJkJl6kw*Ji8Ex(3RRZAx6oVpBiBw@n{O4#T5t54Rh=B|qg{R`8QBt==HR_w_ z*C@Ef`B8jy_p9TVthMgJL$J5meCx~aq%T;pFazOENnL@*k zwgcv&aYup;Bu#<>6U37gnknEsts>H( z4{QnzS*sISsFcIfAQ&N2;DLh%x)7;S0pSM=B9$?i9nl75iV%vBK@y3mbP|G~LJ|dh zBx{5fNfijK>4;D`aFS|}hMyb-5a28tFacPxK_@AS5u$24;w-)=G%HG}!TK5?h)K3V zh;aYSzkx!)BVWHeaAW`FZ2=9N2l^Cof-~r2IaCTlB~cil6YxXmY&w(8ppz(cHicpf ze?|#h4p_Nh)CZ&ge_$O%IfzxM_5*>y5lbah5gH2xplS{70UDVK@dcPLN`}UwGKeAQ zJ69n!gZ`y{44W@tROCw-jm{jT3#Jx;0Ywe|>1!~78q+$6 PL19q|=H@PQTnYaJ!zvf@ literal 0 HcmV?d00001 diff --git a/book/figs/flower.test.pdf b/book/figs/flower.test.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d48dd6112ba9d60af8ce2b2dc5135779e29b5415 GIT binary patch literal 17297 zcmbt+4Qw3OedpWdha@@)GQr_4N!`O{(iG0!#ae1)+0Hd3(ahzpXv4Be7QKUX02Q0# zu(U0nEZw984kxI(-V<;l3jqgW&N#4z3^CYLU=v8)yG&b3wa#4I!>lRW)Q2-(F^olu zqGtIie(mnu@Aqbwq-+NWP$#=H^X9$(_t*Qs6~EMOe&Z|6kMB=4HK)?4Bj5ewrr-Ll zroHWlpX+=nwGSiTYTEmqKk4aA?fv@UV~3wV@?6tz|8`U7i_dZ*U)L5ybJVh?y}#G> z>`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?$gI3Kat|#5{am@pe99t{%LAykCl7%>F^<>LLD1CvgPMMFL|cAt?@#_)CyF zV2(S+4UfUOf{z8;+2cI%N&+%cR}pshS7pRdP+1u4>jF9-Lby{0Ev)5VNu5# zc>q3@1oT8A#Nq{%O))?s_XdlLNkSzhrDddHQnG(|0*g`pWAKZG#6Q^rBgFBh zz`6gy*${R2FA>VBSS-pFtd8?`Mfv`X%`dcLHvb_04-WqY0#X9tdx?J}9A$d&f9d=0 zG5Tkg1+ux4fcJ3@1xEi~9HIYA;(z4?!T*#Jgn&wRyrO^;j{{9mUH&*qA<{62q@<+W zuK*Q*Km-6ZAdvqTj6Xw4@b3W!5UYCP9dYi0|LP+EYIM9=1pmV}5c)@@@^MEw&_jTN zO@Evk|M`2K>-iTUZv;f*U*F0|36e(r9uDz literal 0 HcmV?d00001 diff --git a/book/figs/interpret.eps b/book/figs/interpret.eps new file mode 100644 index 0000000..8274779 --- /dev/null +++ b/book/figs/interpret.eps @@ -0,0 +1,173 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: interpret.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5a +%%CreationDate: Wed May 30 11:13:36 2012 +%%BoundingBox: 0 0 263 61 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 61 moveto 0 0 lineto 263 0 lineto 263 61 lineto closepath clip newpath +-138.2 86.0 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 50 +% Polyline +0 slj +0 slc +7.500 slw +gs clippath +3403 795 m 3615 795 l 3615 705 l 3403 705 l 3403 705 l 3583 750 l 3403 795 l cp +eoclip +n 3225 750 m + 3600 750 l gs col0 s gr gr + +% arrowhead +n 3403 795 m 3583 750 l 3403 705 l col0 s +% Polyline +15.000 slw +n 2325 1350 m 2325 450 l 3000 450 l 3150 600 l 3150 1350 l + 2325 1350 l cp gs col0 s gr +% Polyline +7.500 slw +n 3000 450 m 3000 600 l + 3150 600 l gs col0 s gr +% Polyline +15.000 slw +n 3748 640 m 3652 533 l 3652 900 l + 3748 798 l gs col0 s gr +% Polyline +7.500 slw +gs clippath +5375 1162 m 5587 1162 l 5587 1072 l 5375 1072 l 5375 1072 l 5555 1117 l 5375 1162 l cp +eoclip +n 5197 1117 m + 5572 1117 l gs col0 s gr gr + +% arrowhead +n 5375 1162 m 5555 1117 l 5375 1072 l col0 s +% Polyline +15.000 slw +n 5039 1173 m 5137 1275 l 5137 909 l + 5039 1014 l gs col0 s gr +% Polyline +n 3750 525 m 5047 525 l 5047 1290 l 3750 1290 l + cp gs col0 s gr +% Polyline +n 5919 1296 m 6376 1296 l 6376 1356 l 5919 1356 l + cp gs col0 s gr +% Polyline +n 5823 1357 m 6484 1357 l 6484 1412 l 5823 1412 l + cp gs col0 s gr +% Polyline +n 5638 463 m 6662 463 l 6662 1296 l 5638 1296 l + cp gs col7 1.00 shd ef gr gs col0 s gr +% Polyline +7.500 slw +n 5692 519 m 6606 519 l 6606 1237 l 5692 1237 l + cp gs col7 1.00 shd ef gr gs col0 s gr +/Helvetica ff 166.67 scf sf +2400 900 m +gs 1 -1 sc (SOURCE) col0 sh gr +/Helvetica ff 166.67 scf sf +2400 1125 m +gs 1 -1 sc (CODE) col0 sh gr +/Helvetica ff 166.67 scf sf +3825 975 m +gs 1 -1 sc (INTERPRETER) col0 sh gr +/Helvetica ff 166.67 scf sf +5813 953 m +gs 1 -1 sc (OUTPUT) col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book/figs/interpret.fig b/book/figs/interpret.fig new file mode 100644 index 0000000..f887cfe --- /dev/null +++ b/book/figs/interpret.fig @@ -0,0 +1,37 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 180.00 + 3225 750 3600 750 +2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 6 + 2325 1350 2325 450 3000 450 3150 600 3150 1350 2325 1350 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3 + 3000 450 3000 600 3150 600 +2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 4 + 3748 640 3652 533 3652 900 3748 798 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 180.00 + 5197 1117 5572 1117 +2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 4 + 5039 1173 5137 1275 5137 909 5039 1014 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 3750 525 5047 525 5047 1290 3750 1290 3750 525 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 5919 1296 6376 1296 6376 1356 5919 1356 5919 1296 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 5823 1357 6484 1357 6484 1412 5823 1412 5823 1357 +2 2 0 2 0 7 50 0 20 0.000 0 0 -1 0 0 5 + 5638 463 6662 463 6662 1296 5638 1296 5638 463 +2 2 0 1 0 7 50 0 20 0.000 0 0 -1 0 0 5 + 5692 519 6606 519 6606 1237 5692 1237 5692 519 +4 0 0 50 0 16 10 0.0000 4 120 675 2400 900 SOURCE\001 +4 0 0 50 0 16 10 0.0000 4 120 465 2400 1125 CODE\001 +4 0 0 50 0 16 10 0.0000 4 120 1050 3825 975 INTERPRETER\001 +4 0 0 50 0 16 10 0.0000 4 120 615 5813 953 OUTPUT\001 diff --git a/book/figs/interpret.pdf b/book/figs/interpret.pdf new file mode 100644 index 0000000000000000000000000000000000000000..19dbb7618ef565dc63715b381eea737d53212c3b GIT binary patch literal 4565 zcmb^#X;c$ew~C@hTmcoUGN2)dCNqiOCq4u`{gcYF8U?cEDgrSNB?96p0t z{xEYJLjWNV5u3n}O5tG4q^IH`A%Li1f80P}Bn0~#G!&-5w1f_m$ru)j#56{RHD`HP zov9k>J^N+knJ?>P12W5NYu9vjb2~IF>S>4EnE8EouzUR@D^EVJgco_KXGtw_zddD& zSDXvpDLri+mG^S?j$1^MdSS;eH-s;qP-%a8&dT-Gy_{#&oI(QoBHAU+N@wxnF(Ymr zjB?obYr~)%k*2v@8ECe%A1l*M*S|UfaK2Fbkht zHYMPj3v-J*aP^(4E}g6|=$ikc$nAMy0luU629v|@%q+pZ;OpxpA(?&l<;G#->zSjA zp9Xk~-FhBcqYV@fG`iYd7+5f5gqHcr`~*) zTY0&Z3^=|o`Gl-`uzVsPV_sgnWZ{C1Jt z-F-6Y8%SLl=+-T9LlmpN-dXP@j^B(1jV~2#%Gkc&zTcMV(b->&_~JGh?OgG4Edj}^ z7OgVgN;dv9{)(ns$eEoJ>&o7RX57h}b3Chl;o6(YJM;S77*!L;pA|LmaroO_Tb!pb z+z(vo@zyW>TFkQ1GoEjid=+u@&&G_u>Nf@rc^-T#<>1>F*uyv3$4ZZK#feMHCKp^h z#BIoUdKX!v6V(qHAgOQcAAIAE6f^0XoeWlVV9?<}|K*DWjAju3eawW-G-I$zqsL$+ zro%P9gcXWL0Gcc0K|(Z!0dOQ{q97g}R18>+S%@T3i&;RpsYpT_ic!%p2uKJH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0,0 +1,128 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: list2.eps +%%Creator: fig2dev Version 3.2 Patchlevel 3c +%%CreationDate: Thu Dec 6 09:32:48 2001 +%%For: downey@rocky.wellesley.edu (Allen B. Downey) +%%BoundingBox: 0 0 97 43 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 43 moveto 0 0 lineto 97 0 lineto 97 43 lineto closepath clip newpath +-107.0 100.0 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +%%Page: 1 1 +10 setmiterlimit + 0.06000 0.06000 sc +% +% Fig objects follow +% +% Polyline +7.500 slw +n 1800 975 m 3375 975 l 3375 1650 l 1800 1650 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2490 1477 m 2490 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2490 1177 m 2490 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +/Helvetica ff 165.00 scf sf +2025 1200 m +gs 1 -1 sc (a) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 1500 m +gs 1 -1 sc (b) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1200 m +gs 1 -1 sc ([ 1, 2, 3 ]) col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1500 m +gs 1 -1 sc ([ 1, 2, 3 ]) col0 sh gr +$F2psEnd +rs diff --git a/book/figs/list2.fig b/book/figs/list2.fig new file mode 100644 index 0000000..73d6dd0 --- /dev/null +++ b/book/figs/list2.fig @@ -0,0 +1,21 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 975 3375 975 3375 1650 1800 1650 1800 975 +4 2 0 50 0 16 11 0.0000 4 90 75 2025 1200 a\001 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 1500 b\001 +4 0 0 50 0 16 11 0.0000 4 150 630 2550 1200 [ 1, 2, 3 ]\001 +4 0 0 50 0 16 11 0.0000 4 150 630 2550 1500 [ 1, 2, 3 ]\001 diff --git a/book/figs/list2.pdf b/book/figs/list2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0d3d7e1c090c1e4e6f74fb393e07a7856629f2ed GIT binary patch literal 4373 zcmb^#d0Z1$y2`rhsK06vx>buKE(EB_%w%$xgd-3@h$2wIM%WI?Bn%{(bY=npTaTi< z+X@OOTC1Y1M?DLo#e*WdMQbg)*4Cp^#TI|qsz9;z?22{YgoH!w@rTI|c<;O4cfIcs zlpLcIVj>9?bgXmvdyo`HVLCe(3J*t;NV|p0fn@-ag6JqKM=~&?vl1K`LmFulsnI|z z$B={#a;>XO(I+-Vj{m6fZ`l5=TXxY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+;2MQpHmjXeyEGy@S6-*G_0>Mrrvhch^jUah> zdD1*W%CI>Irc$X86i0Ae0w^S0zMUss5<52u=yMxFXY{byIjP$wDQK(+oq=Fd6!9wZ z-mElZhXuuCHsjK2T5K1{AR~XGQ48y&e9DOY8rwSl| zE&{j!tkhsSGC7SDs}aSgB*O6)hU2?0byz7?U?RkG^2cBhh{&VQ4#Ma;d<39TCxOe? zoF5BjGcAr{xCE6+a6BE8tFdr3K}gVWHHt-->I!FYq zna;sY)I4|=#d1Of2q_Myki5}irRGsqSVnfMcgygwL?A+#`grLv`i*oXCH=nVY&IdG z1v+&sV|3cUNRSZwC)4FIM%ZNRG1K8>t?r6284=1#2^Mi6$QZEGWK^3O)<%MSCLIni zu#h}(G6IrOq>TVbo(98*)?IJWR=#^-rG@%YTSaC?Q3V|e zrahrZfX9V05yz^98bf6`j>)lbcX^3WR0POC8U6u9x)3OFPYArC8CLv<1r*xzP;s%8 z8BE_;I3#qk?hh=N38SzX_QK>Cn6ZTqZ1=(lg%Z4``omC}9J~Yuz`}*c&HxySfk)i{ z7@-0_8~~Fm!DDU!Ord;;7ekc~*@r6dhv-m+>>(IND8M7HzYd&`_mRi5Bp9t(@DB+X zNuvwEi!~fZQW*w3ErnSdMiT6126oTg;0X{58zL0)I4n9A_)ss4!=tenWlVI8N~I@o hLM79yVleF=Q)CLSR*olG-W?!9C6`0N!EwoY=zn97*vtR` literal 0 HcmV?d00001 diff --git a/book/figs/liststate.eps b/book/figs/liststate.eps new file mode 100644 index 0000000..56544ee --- /dev/null +++ b/book/figs/liststate.eps @@ -0,0 +1,255 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: liststate.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5d +%%CreationDate: Mon Oct 19 10:23:07 2015 +%%BoundingBox: 0 0 218 204 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 204 moveto 0 0 lineto 218 0 lineto 218 204 lineto closepath clip newpath +-12.8 243.7 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 1650 3675 m 1950 3675 l 1950 3975 l 1650 3975 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1650 975 m 3675 975 l 3675 1950 l 1650 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1650 2325 m 3225 2325 l 3225 3300 l 1650 3300 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2338 2527 m 2490 2527 l 2490 2467 l 2338 2467 l 2338 2467 l 2458 2497 l 2338 2527 l cp +eoclip +n 2100 2497 m + 2475 2497 l gs col0 s gr gr + +% arrowhead +n 2338 2527 m 2458 2497 l 2338 2467 l col0 s +% Polyline +gs clippath +1438 2505 m 1590 2505 l 1590 2445 l 1438 2445 l 1438 2445 l 1558 2475 l 1438 2505 l cp +eoclip +n 1200 2475 m + 1575 2475 l gs col0 s gr gr + +% arrowhead +n 1438 2505 m 1558 2475 l 1438 2445 l col0 s +% Polyline +gs clippath +2342 3029 m 2472 3108 l 2503 3056 l 2373 2978 l 2373 2978 l 2461 3066 l 2342 3029 l cp +eoclip +n 2100 2850 m + 2475 3075 l gs col0 s gr gr + +% arrowhead +n 2342 3029 m 2461 3066 l 2373 2978 l col0 s +% Polyline + [15 60] 60 sd +n 2100 2797 m + 2475 2797 l gs col0 s gr [] 0 sd +% Polyline +n 2550 2700 m + 2850 2850 l gs col0 s gr +% Polyline +n 2850 2700 m + 2550 2850 l gs col0 s gr +% Polyline +gs clippath +1438 3855 m 1590 3855 l 1590 3795 l 1438 3795 l 1438 3795 l 1558 3825 l 1438 3855 l cp +eoclip +n 1200 3825 m + 1575 3825 l gs col0 s gr gr + +% arrowhead +n 1438 3855 m 1558 3825 l 1438 3795 l col0 s +% Polyline +gs clippath +2338 1477 m 2490 1477 l 2490 1417 l 2338 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2338 1777 m 2490 1777 l 2490 1717 l 2338 1717 l 2338 1717 l 2458 1747 l 2338 1777 l cp +eoclip +n 2100 1747 m + 2475 1747 l gs col0 s gr gr + +% arrowhead +n 2338 1777 m 2458 1747 l 2338 1717 l col0 s +% Polyline +gs clippath +2338 1177 m 2490 1177 l 2490 1117 l 2338 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +% Polyline +gs clippath +1438 1155 m 1590 1155 l 1590 1095 l 1438 1095 l 1438 1095 l 1558 1125 l 1438 1155 l cp +eoclip +n 1200 1125 m + 1575 1125 l gs col0 s gr gr + +% arrowhead +n 1438 1155 m 1558 1125 l 1438 1095 l col0 s +% Polyline +n 225 675 m 3825 675 l 3825 4050 l 225 4050 l + cp gs col7 s gr +/Helvetica ff 183.33 scf sf +2025 2550 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 2850 m +gs 1 -1 sc (1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 2250 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 183.33 scf sf +1125 2550 m +gs 1 -1 sc (numbers) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 2850 m +gs 1 -1 sc (123) col0 sh gr +/Helvetica ff 183.33 scf sf +2550 3150 m +gs 1 -1 sc (5) col0 sh gr +/Helvetica ff 183.33 scf sf +1650 3600 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 183.33 scf sf +1125 3900 m +gs 1 -1 sc (empty) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1200 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1500 m +gs 1 -1 sc (1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1800 m +gs 1 -1 sc (2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1200 m +gs 1 -1 sc ('Cheddar') col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1500 m +gs 1 -1 sc ('Edam') col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1800 m +gs 1 -1 sc ('Gouda') col0 sh gr +/Helvetica ff 183.33 scf sf +1650 900 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 183.33 scf sf +1125 1200 m +gs 1 -1 sc (cheeses) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 2550 m +gs 1 -1 sc (42) col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book/figs/liststate.fig b/book/figs/liststate.fig new file mode 100644 index 0000000..79bb4cb --- /dev/null +++ b/book/figs/liststate.fig @@ -0,0 +1,64 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2497 2475 2497 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 2475 1575 2475 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2850 2475 3075 +2 1 2 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2 + 2100 2797 2475 2797 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2550 2700 2850 2850 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2850 2700 2550 2850 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 3825 1575 3825 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 3675 1950 3675 1950 3975 1650 3975 1650 3675 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 975 3675 975 3675 1950 1650 1950 1650 975 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1747 2475 1747 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 1125 1575 1125 +2 2 0 1 7 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 225 675 3825 675 3825 4050 225 4050 225 675 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 2325 3225 2325 3225 3300 1650 3300 1650 2325 +4 2 0 50 0 16 11 0.0000 4 120 105 2025 2550 0\001 +4 2 0 50 0 16 11 0.0000 4 120 105 2025 2850 1\001 +4 0 0 50 0 16 11 0.0000 4 135 225 1650 2250 list\001 +4 2 0 50 0 16 11 0.0000 4 135 720 1125 2550 numbers\001 +4 0 0 50 0 16 11 0.0000 4 120 315 2550 2850 123\001 +4 0 0 50 0 16 11 0.0000 4 120 105 2550 3150 5\001 +4 0 0 50 0 16 11 0.0000 4 135 225 1650 3600 list\001 +4 2 0 50 0 16 11 0.0000 4 165 495 1125 3900 empty\001 +4 2 0 50 0 16 11 0.0000 4 120 105 2025 1200 0\001 +4 2 0 50 0 16 11 0.0000 4 120 105 2025 1500 1\001 +4 2 0 50 0 16 11 0.0000 4 120 105 2025 1800 2\001 +4 0 0 50 0 16 11 0.0000 4 135 780 2550 1200 'Cheddar'\001 +4 0 0 50 0 16 11 0.0000 4 135 540 2550 1500 'Edam'\001 +4 0 0 50 0 16 11 0.0000 4 135 615 2550 1800 'Gouda'\001 +4 0 0 50 0 16 11 0.0000 4 135 225 1650 900 list\001 +4 2 0 50 0 16 11 0.0000 4 135 690 1125 1200 cheeses\001 +4 0 0 50 0 16 11 0.0000 4 120 210 2550 2550 42\001 diff --git a/book/figs/liststate.fig.bak b/book/figs/liststate.fig.bak new file mode 100644 index 0000000..55fcf23 --- /dev/null +++ b/book/figs/liststate.fig.bak @@ -0,0 +1,64 @@ +#FIG 3.2 Produced by xfig version 3.2.5 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2497 2475 2497 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 2475 1575 2475 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2850 2475 3075 +2 1 2 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2 + 2100 2797 2475 2797 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2550 2700 2850 2850 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2850 2700 2550 2850 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 2325 3225 2325 3225 3300 1650 3300 1650 2325 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 3825 1575 3825 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 3675 1950 3675 1950 3975 1650 3975 1650 3675 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 975 3675 975 3675 1950 1650 1950 1650 975 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1747 2475 1747 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 1125 1575 1125 +2 2 0 1 7 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 225 675 3825 675 3825 4050 225 4050 225 675 +4 2 0 50 0 16 11 0.0000 4 135 105 2025 2550 0\001 +4 2 0 50 0 16 11 0.0000 4 135 105 2025 2850 1\001 +4 0 0 50 0 16 11 0.0000 4 135 225 1650 2250 list\001 +4 2 0 50 0 16 11 0.0000 4 135 705 1125 2550 numbers\001 +4 0 0 50 0 16 11 0.0000 4 135 210 2550 2550 17\001 +4 0 0 50 0 16 11 0.0000 4 135 315 2550 2850 123\001 +4 0 0 50 0 16 11 0.0000 4 135 105 2550 3150 5\001 +4 0 0 50 0 16 11 0.0000 4 135 225 1650 3600 list\001 +4 2 0 50 0 16 11 0.0000 4 180 495 1125 3900 empty\001 +4 2 0 50 0 16 11 0.0000 4 135 105 2025 1200 0\001 +4 2 0 50 0 16 11 0.0000 4 135 105 2025 1500 1\001 +4 2 0 50 0 16 11 0.0000 4 135 105 2025 1800 2\001 +4 0 0 50 0 16 11 0.0000 4 135 810 2550 1200 'Cheddar'\001 +4 0 0 50 0 16 11 0.0000 4 135 555 2550 1500 'Edam'\001 +4 0 0 50 0 16 11 0.0000 4 135 645 2550 1800 'Gouda'\001 +4 0 0 50 0 16 11 0.0000 4 135 225 1650 900 list\001 +4 2 0 50 0 16 11 0.0000 4 135 705 1125 1200 cheeses\001 diff --git a/book/figs/liststate.pdf b/book/figs/liststate.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0c4d6f534041eec858b3a38f7f3289dd46247876 GIT binary patch literal 6467 zcmb_h2|Sc*)bF-xN+h(`ix|?(JBu-9V!HNq5JFjM%)FQyGh=2jD3ub?Drpl*v{5%A zDob(|B1@a-wvkGrq>}A>-a+Yhf8YJS-|x=+@IL1`=RD^*=lq}dIftgBnFWrB*TZPu zdbjr^h5`{FfzNu3p&@LC@cktIkUpR|!4_Pe1Q9{71&<{`%n-JKgD@Bvu|$Nh0x;5~ zgRZuMCc^ZhcDL7wmw(qQT>Mbp9KLpW>K`|2O&{b}Prl}HK=tO}fK}o8^v{1lJ2m1{ ztRj?j+K-5|v~M{K7B9XX?P0li@AjOM0?dgBs)3=BK$8-Wx%;xSc7L?($s?)7))Gs> zMJ%EH%&dC4RL*oaHT3N%#*N%Sz1PlNJA;|YYJapGZBX;Aowd`r9XcA8jWwZH8_LI% z?@l@qm7N#6Np&~QXUC9f>Sgn&kJy;EB8MW+daU~Pc$FQ2`%RALYEhjFs=r>S8%oJ{ zrq@ihnQ+f`zU8KQv@(~n?Jc3PbJkh*mAke2Megzy;yov;pFdF2u*YX#PH-L3I!o@3 z=!k2>mQsTXGr2&Iq{xHWo$j7vZTh>owYlTq-*8V(|6XtKXu^3J9W~<<lua}x0AiFkKoc0QD6PL)oB?A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ieBtHM0vp|Eqx_SrQjH1MotJ4$`N)odAOc)Md+&iuZ) z$I9zAe;&tGT}XOdDlfsV{-kc%x1wR+>ZXAehr&RLRkgt2`3?wjM!V8@+YnWRq++LZa%hUUp3JuIShYjjk< za+UF#uU?OFT;KM$-?Ymn(e`+El}(ine2aP?S3fwlV&6uVMB=$RPkG*qnW{5B98?N# z-G|dmUd6teKmD$Dt1_Fr|Db?Ww{hIru;Nudo458pdyC!uAkKlFG4Lqx()`tRxskS& zcN0>w1`IGbi{wqV}n}N>4pc-;NKx_~*2K zszpaBqal>?GV|i|-IHS|+Uw_ZZ@)3Sx|2qek9elH|K#Ab&V3cm=(YCex=vQYjJ<`9 z7B@exQ|?T=(Yq9ptgrX|E@ikvDrB)YAQH$2@#FH1u$|Y6u@IMIgmt4Z2~43W;?K1T z6CuuF_AczO4Qv_*yMlo+T)_ebC4!T(gg9SW*F_A0E2)vXsgs?BI?5oWO9O-fpvHov z0X)8#E;Yi+MCjldCBs-q#v<8Zgmq^+LK1<1w}C5xNO&5ah$E7hLB1kzZw?WNHb6wY zJ{G7HaeV1cpu8Mb2u4O&e~Cm$hvATr5PS$3FA({`L>i3-6G$+LgaaHnaVTHHlH&Mc z4X~cf5U%@oF}@ftvkA`@1i)N(n20C9qYI7R;kg1ngf7hT5d=w$ut7mw4xP#-vWa98 z1;;`RXgDI#mw+RH56*|>Lna|?Hk;;SFuI&@jF~^J2PVLRWZ(zzLAVIMV zLog}fN_YrE21H|?WcY!{MS(@Qy^bxghnLjgH8zgf%u~|iUA3<^?s&-t$+s3&oqJoKj{FSdfjWCKO|` r3Dw+;XhJ0tOo?U|1PX!i?;Kue9~7WYB#{M8p8%RbnwsVg7MTA5NA|_x literal 0 HcmV?d00001 diff --git a/book/figs/listsum1.eps b/book/figs/listsum1.eps new file mode 100644 index 0000000..27870ec --- /dev/null +++ b/book/figs/listsum1.eps @@ -0,0 +1,1740 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: listsum1.eps +%%Creator: matplotlib version 0.99.1.1, http://matplotlib.sourceforge.net/ +%%CreationDate: Fri Aug 5 16:02:46 2011 +%%Orientation: portrait +%%BoundingBox: 18 180 594 612 +%%EndComments +%%BeginProlog +/mpldict 8 dict def +mpldict begin +/m { moveto } bind def +/l { lineto } bind def +/r { rlineto } bind def +/c { curveto } bind def +/cl { closepath } bind def +/box { +m +1 index 0 r +0 exch r +neg 0 r +cl +} bind def +/clipbox { +box +clip +newpath +} bind def +%!PS-Adobe-3.0 Resource-Font +%%Title: DejaVu Sans +%%Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. DejaVu changes are in public domain +%%Creator: Converted from TrueType by PPR +25 dict begin +/_d{bind def}bind def +/_m{moveto}_d +/_l{lineto}_d +/_cl{closepath eofill}_d +/_c{curveto}_d +/_sc{7 -1 roll{setcachedevice}{pop pop pop pop pop pop}ifelse}_d +/_e{exec}_d +/FontName /DejaVuSans def +/PaintType 0 def +/FontMatrix[.001 0 0 .001 0 0]def +/FontBBox[-1020 -349 1681 1167]def +/FontType 3 def +/Encoding StandardEncoding def +/FontInfo 10 dict dup begin +/FamilyName (DejaVu Sans) def +/FullName (DejaVu Sans) def +/Notice (Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. DejaVu changes are in public domain ) def +/Weight (Book) def +/Version (Version 2.30) def +/ItalicAngle 0.0 def +/isFixedPitch false def +/UnderlinePosition -130 def +/UnderlineThickness 90 def +end readonly def +/CharStrings 23 dict dup begin +/space{318 0 0 0 0 0 _sc +}_d +/parenleft{390 0 86 -131 310 759 _sc +310 759 _m +266 683 234 609 213 536 _c +191 463 181 389 181 314 _c +181 238 191 164 213 91 _c +234 17 266 -56 310 -131 _c +232 -131 _l +183 -54 146 20 122 94 _c +98 168 86 241 86 314 _c +86 386 98 459 122 533 _c +146 607 182 682 232 759 _c +310 759 _l +_cl}_d +/parenright{390 0 80 -131 304 759 _sc +80 759 _m +158 759 _l +206 682 243 607 267 533 _c +291 459 304 386 304 314 _c +304 241 291 168 267 94 _c +243 20 206 -54 158 -131 _c +80 -131 _l +123 -56 155 17 177 91 _c +198 164 209 238 209 314 _c +209 389 198 463 177 536 _c +155 609 123 683 80 759 _c +_cl}_d +/hyphen{361 0 49 234 312 314 _sc +49 314 _m +312 314 _l +312 234 _l +49 234 _l +49 314 _l +_cl}_d +/zero{636 0 66 -13 570 742 _sc +318 664 _m +267 664 229 639 203 589 _c +177 539 165 464 165 364 _c +165 264 177 189 203 139 _c +229 89 267 64 318 64 _c +369 64 407 89 433 139 _c +458 189 471 264 471 364 _c +471 464 458 539 433 589 _c +407 639 369 664 318 664 _c +318 742 _m +399 742 461 709 505 645 _c +548 580 570 486 570 364 _c +570 241 548 147 505 83 _c +461 19 399 -13 318 -13 _c +236 -13 173 19 130 83 _c +87 147 66 241 66 364 _c +66 486 87 580 130 645 _c +173 709 236 742 318 742 _c +_cl}_d +/one{636 0 110 0 544 729 _sc +124 83 _m +285 83 _l +285 639 _l +110 604 _l +110 694 _l +284 729 _l +383 729 _l +383 83 _l +544 83 _l +544 0 _l +124 0 _l +124 83 _l +_cl}_d +/two{{636 0 73 0 536 742 _sc +192 83 _m +536 83 _l +536 0 _l +73 0 _l +73 83 _l +110 121 161 173 226 239 _c +290 304 331 346 348 365 _c +380 400 402 430 414 455 _c +426 479 433 504 433 528 _c +433 566 419 598 392 622 _c +365 646 330 659 286 659 _c +255 659 222 653 188 643 _c +154 632 117 616 78 594 _c +78 694 _l +118 710 155 722 189 730 _c +223 738 255 742 284 742 _c +359 742 419 723 464 685 _c +509 647 532 597 532 534 _c +532 504 526 475 515 449 _c +504 422 484 390 454 354 _c +446 344 420 317 376 272 _c +332 227 271 164 192 83 _c +_cl}_e}_d +/five{{636 0 77 -13 549 729 _sc +108 729 _m +495 729 _l +495 646 _l +198 646 _l +198 467 _l +212 472 227 476 241 478 _c +255 480 270 482 284 482 _c +365 482 429 459 477 415 _c +525 370 549 310 549 234 _c +549 155 524 94 475 51 _c +426 8 357 -13 269 -13 _c +238 -13 207 -10 175 -6 _c +143 -1 111 6 77 17 _c +77 116 _l +106 100 136 88 168 80 _c +199 72 232 69 267 69 _c +323 69 368 83 401 113 _c +433 143 450 183 450 234 _c +450 284 433 324 401 354 _c +368 384 323 399 267 399 _c +241 399 214 396 188 390 _c +162 384 135 375 108 363 _c +108 729 _l +_cl}_e}_d +/six{{636 0 70 -13 573 742 _sc +330 404 _m +286 404 251 388 225 358 _c +199 328 186 286 186 234 _c +186 181 199 139 225 109 _c +251 79 286 64 330 64 _c +374 64 409 79 435 109 _c +461 139 474 181 474 234 _c +474 286 461 328 435 358 _c +409 388 374 404 330 404 _c +526 713 _m +526 623 _l +501 635 476 644 451 650 _c +425 656 400 659 376 659 _c +310 659 260 637 226 593 _c +192 549 172 482 168 394 _c +187 422 211 444 240 459 _c +269 474 301 482 336 482 _c +409 482 467 459 509 415 _c +551 371 573 310 573 234 _c +573 159 550 99 506 54 _c +462 9 403 -13 330 -13 _c +246 -13 181 19 137 83 _c +92 147 70 241 70 364 _c +70 479 97 571 152 639 _c +206 707 280 742 372 742 _c +}_e{396 742 421 739 447 735 _c +472 730 498 723 526 713 _c +_cl}_e}_d +/seven{636 0 82 0 551 729 _sc +82 729 _m +551 729 _l +551 687 _l +286 0 _l +183 0 _l +432 646 _l +82 646 _l +82 729 _l +_cl}_d +/underscore{500 0 -9 -235 510 -165 _sc +510 -165 _m +510 -235 _l +-9 -235 _l +-9 -165 _l +510 -165 _l +_cl}_d +/d{{635 0 55 -13 544 760 _sc +454 464 _m +454 760 _l +544 760 _l +544 0 _l +454 0 _l +454 82 _l +435 49 411 25 382 10 _c +353 -5 319 -13 279 -13 _c +213 -13 159 13 117 65 _c +75 117 55 187 55 273 _c +55 359 75 428 117 481 _c +159 533 213 560 279 560 _c +319 560 353 552 382 536 _c +411 520 435 496 454 464 _c +148 273 _m +148 207 161 155 188 117 _c +215 79 253 61 301 61 _c +348 61 385 79 413 117 _c +440 155 454 207 454 273 _c +454 339 440 390 413 428 _c +385 466 348 485 301 485 _c +253 485 215 466 188 428 _c +161 390 148 339 148 273 _c +_cl}_e}_d +/e{{615 0 55 -13 562 560 _sc +562 296 _m +562 252 _l +149 252 _l +153 190 171 142 205 110 _c +238 78 284 62 344 62 _c +378 62 412 66 444 74 _c +476 82 509 95 541 113 _c +541 28 _l +509 14 476 3 442 -3 _c +408 -9 373 -13 339 -13 _c +251 -13 182 12 131 62 _c +80 112 55 181 55 268 _c +55 357 79 428 127 481 _c +175 533 241 560 323 560 _c +397 560 455 536 498 489 _c +540 441 562 377 562 296 _c +472 322 _m +471 371 457 410 431 440 _c +404 469 368 484 324 484 _c +274 484 234 469 204 441 _c +174 413 156 373 152 322 _c +472 322 _l +_cl}_e}_d +/i{278 0 94 0 184 760 _sc +94 547 _m +184 547 _l +184 0 _l +94 0 _l +94 547 _l +94 760 _m +184 760 _l +184 646 _l +94 646 _l +94 760 _l +_cl}_d +/l{278 0 94 0 184 760 _sc +94 760 _m +184 760 _l +184 0 _l +94 0 _l +94 760 _l +_cl}_d +/m{{974 0 91 0 889 560 _sc +520 442 _m +542 482 569 511 600 531 _c +631 550 668 560 711 560 _c +767 560 811 540 842 500 _c +873 460 889 403 889 330 _c +889 0 _l +799 0 _l +799 327 _l +799 379 789 418 771 444 _c +752 469 724 482 686 482 _c +639 482 602 466 575 435 _c +548 404 535 362 535 309 _c +535 0 _l +445 0 _l +445 327 _l +445 379 435 418 417 444 _c +398 469 369 482 331 482 _c +285 482 248 466 221 435 _c +194 404 181 362 181 309 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +201 495 226 520 255 536 _c +283 552 317 560 357 560 _c +397 560 430 550 458 530 _c +486 510 506 480 520 442 _c +}_e{_cl}_e}_d +/n{634 0 91 0 549 560 _sc +549 330 _m +549 0 _l +459 0 _l +459 327 _l +459 379 448 417 428 443 _c +408 469 378 482 338 482 _c +289 482 251 466 223 435 _c +195 404 181 362 181 309 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +202 494 227 519 257 535 _c +286 551 320 560 358 560 _c +420 560 468 540 500 501 _c +532 462 549 405 549 330 _c +_cl}_d +/p{{635 0 91 -207 580 560 _sc +181 82 _m +181 -207 _l +91 -207 _l +91 547 _l +181 547 _l +181 464 _l +199 496 223 520 252 536 _c +281 552 316 560 356 560 _c +422 560 476 533 518 481 _c +559 428 580 359 580 273 _c +580 187 559 117 518 65 _c +476 13 422 -13 356 -13 _c +316 -13 281 -5 252 10 _c +223 25 199 49 181 82 _c +487 273 _m +487 339 473 390 446 428 _c +418 466 381 485 334 485 _c +286 485 249 466 222 428 _c +194 390 181 339 181 273 _c +181 207 194 155 222 117 _c +249 79 286 61 334 61 _c +381 61 418 79 446 117 _c +473 155 487 207 487 273 _c +_cl}_e}_d +/r{411 0 91 0 411 560 _sc +411 463 _m +401 469 390 473 378 476 _c +366 478 353 480 339 480 _c +288 480 249 463 222 430 _c +194 397 181 350 181 288 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +199 495 224 520 254 536 _c +284 552 321 560 365 560 _c +371 560 378 559 386 559 _c +393 558 401 557 411 555 _c +411 463 _l +_cl}_d +/s{{521 0 54 -13 472 560 _sc +443 531 _m +443 446 _l +417 458 391 468 364 475 _c +336 481 308 485 279 485 _c +234 485 200 478 178 464 _c +156 450 145 430 145 403 _c +145 382 153 366 169 354 _c +185 342 217 330 265 320 _c +296 313 _l +360 299 405 279 432 255 _c +458 230 472 195 472 151 _c +472 100 452 60 412 31 _c +372 1 316 -13 246 -13 _c +216 -13 186 -10 154 -5 _c +122 0 89 8 54 20 _c +54 113 _l +87 95 120 82 152 74 _c +184 65 216 61 248 61 _c +290 61 323 68 346 82 _c +368 96 380 117 380 144 _c +380 168 371 187 355 200 _c +339 213 303 226 247 238 _c +216 245 _l +160 257 119 275 95 299 _c +70 323 58 356 58 399 _c +58 450 76 490 112 518 _c +148 546 200 560 268 560 _c +}_e{301 560 332 557 362 552 _c +391 547 418 540 443 531 _c +_cl}_e}_d +/t{392 0 27 0 368 702 _sc +183 702 _m +183 547 _l +368 547 _l +368 477 _l +183 477 _l +183 180 _l +183 135 189 106 201 94 _c +213 81 238 75 276 75 _c +368 75 _l +368 0 _l +276 0 _l +206 0 158 13 132 39 _c +106 65 93 112 93 180 _c +93 477 _l +27 477 _l +27 547 _l +93 547 _l +93 702 _l +183 702 _l +_cl}_d +/u{634 0 85 -13 543 560 _sc +85 216 _m +85 547 _l +175 547 _l +175 219 _l +175 167 185 129 205 103 _c +225 77 255 64 296 64 _c +344 64 383 79 411 110 _c +439 141 453 183 453 237 _c +453 547 _l +543 547 _l +543 0 _l +453 0 _l +453 84 _l +431 50 405 26 377 10 _c +348 -5 315 -13 277 -13 _c +214 -13 166 6 134 45 _c +101 83 85 140 85 216 _c +_cl}_d +/x{592 0 29 0 559 547 _sc +549 547 _m +351 281 _l +559 0 _l +453 0 _l +294 215 _l +135 0 _l +29 0 _l +241 286 _l +47 547 _l +153 547 _l +298 352 _l +443 547 _l +549 547 _l +_cl}_d +end readonly def + +/BuildGlyph + {exch begin + CharStrings exch + 2 copy known not{pop /.notdef}if + true 3 1 roll get exec + end}_d + +/BuildChar { + 1 index /Encoding get exch get + 1 index /BuildGlyph get exec +}_d + +FontName currentdict end definefont pop +end +%%EndProlog +mpldict begin +18 180 translate +576 432 0 0 clipbox +1.000 setlinewidth +1 setlinejoin +2 setlinecap +[] 0 setdash +1.000 setgray +gsave +0 0 m +576 0 l +576 432 l +0 432 l +0 0 l +gsave +fill +grestore +stroke +grestore +gsave +72 43.2 m +518.4 43.2 l +518.4 388.8 l +72 388.8 l +72 43.2 l +fill +grestore +2.000 setlinewidth +0.700 setgray +gsave +446.4 345.6 72 43.2 clipbox +139.19 187.425 m +178.493 217.853 l +206.38 239.442 l +228.01 256.189 l +245.683 269.871 l +260.626 281.439 l +273.57 291.46 l +284.987 300.3 l +295.2 308.207 l +304.439 315.359 l +312.873 321.889 l +320.632 327.896 l +327.816 333.457 l +334.504 338.635 l +340.76 343.478 l +346.636 348.028 l +352.177 352.318 l +357.418 356.375 l +362.39 360.225 l +367.119 363.886 l +371.629 367.377 l +375.938 370.713 l +380.063 373.907 l +stroke +grestore +3.000 setlinewidth +0.000 0.000 1.000 setrgbcolor +gsave +446.4 345.6 72 43.2 clipbox +139.19 177.665 m +178.493 223.153 l +206.38 235.689 l +228.01 255.822 l +245.683 268.018 l +260.626 275.171 l +273.57 284.764 l +284.987 293.269 l +295.2 300.907 l +304.439 310.015 l +312.873 320.036 l +320.632 321.889 l +327.816 327.189 l +334.504 336.782 l +340.76 338.268 l +346.636 342.558 l +352.177 350.465 l +357.418 349.203 l +362.39 356.471 l +367.119 367.211 l +371.629 364.147 l +375.938 363.097 l +380.063 373.907 l +stroke +grestore +2.000 setlinewidth +0.700 setgray +gsave +446.4 345.6 72 43.2 clipbox +139.19 153.243 m +178.493 183.671 l +206.38 205.261 l +228.01 222.007 l +245.683 235.689 l +260.626 247.258 l +273.57 257.279 l +284.987 266.118 l +295.2 274.025 l +304.439 281.178 l +312.873 287.707 l +320.632 293.714 l +327.816 299.276 l +334.504 304.453 l +340.76 309.297 l +346.636 313.846 l +352.177 318.136 l +357.418 322.193 l +362.39 326.043 l +367.119 329.704 l +371.629 333.196 l +375.938 336.531 l +380.063 339.725 l +stroke +grestore +3.000 setlinewidth +0.000 0.502 0.000 setrgbcolor +gsave +446.4 345.6 72 43.2 clipbox +139.19 147.236 m +178.493 177.665 l +206.38 216 l +228.01 216 l +245.683 235.689 l +260.626 241.251 l +273.57 251.272 l +284.987 271.679 l +295.2 281.701 l +304.439 287.707 l +312.873 290.54 l +320.632 293.269 l +327.816 303.29 l +334.504 303.29 l +340.76 310.015 l +346.636 312.129 l +352.177 316.187 l +357.418 328.875 l +362.39 327.189 l +367.119 330.525 l +371.629 333.718 l +375.938 336.782 l +380.063 339.725 l +stroke +grestore +0.500 setlinewidth +0 setlinecap +0.000 setgray +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +72 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +72 388.8 o +grestore +gsave +61.000000 24.200000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/five glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +295.2 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +295.2 388.8 o +grestore +gsave +284.200000 24.200000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/six glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +518.4 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +518.4 388.8 o +grestore +gsave +507.400000 24.200000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/seven glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +139.19 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +139.19 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +178.493 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +178.493 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +206.38 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +206.38 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +228.01 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +228.01 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +245.683 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +245.683 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +260.626 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +260.626 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +273.57 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +273.57 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +284.987 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +284.987 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +362.39 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +362.39 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +401.693 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +401.693 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +429.58 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +429.58 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +451.21 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +451.21 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +468.883 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +468.883 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +483.826 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +483.826 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +496.77 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +496.77 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +508.187 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +508.187 388.8 o +grestore +/DejaVuSans findfont +12.000 scalefont +setfont +292.45 12.481 m +(n) show +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 43.2 o +grestore +gsave +43.000000 35.700000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/hyphen glyphshow + +18.300586 8.765625 moveto +/two glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 216 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 216 o +grestore +gsave +43.000000 208.500000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/hyphen glyphshow + +18.300586 8.875000 moveto +/one glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 388.8 o +grestore +gsave +46.000000 381.300000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/zero glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 95.218 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 95.218 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 125.647 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 125.647 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 147.236 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 147.236 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 163.982 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 163.982 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 177.665 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 177.665 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 189.233 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 189.233 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 199.254 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 199.254 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 208.093 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 208.093 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 268.018 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 268.018 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 298.447 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 298.447 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 320.036 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 320.036 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 336.782 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 336.782 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 350.465 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 350.465 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 362.033 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 362.033 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 372.054 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 372.054 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 380.893 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 380.893 o +grestore +38 181.258 m +gsave +90 rotate +0 1.578 rmoveto +(run time \(s\)) show +grestore +1.000 setlinewidth +2 setlinecap +gsave +72 388.8 m +518.4 388.8 l +stroke +grestore +gsave +518.4 43.2 m +518.4 388.8 l +stroke +grestore +gsave +72 43.2 m +518.4 43.2 l +stroke +grestore +gsave +72 43.2 m +72 388.8 l +stroke +grestore +gsave +373.844 50.4 m +511.2 50.4 l +511.2 96.995 l +373.844 96.995 l +373.844 50.4 l +cl +gsave +1.000 setgray +fill +grestore +stroke +grestore +3.000 setlinewidth +0.000 0.000 1.000 setrgbcolor +gsave +383.924 85.6344 m +404.084 85.6344 l +stroke +grestore +0.000 setgray +/DejaVuSans findfont +14.400 scalefont +setfont +419.924 77.297 m +0 3.297 rmoveto +(sum_extend) show +0.000 0.502 0.000 setrgbcolor +gsave +383.924 64.4969 m +404.084 64.4969 l +stroke +grestore +0.000 setgray +419.924 56.16 m +0 3.297 rmoveto +(sum_plus) show + +end +showpage diff --git a/book/figs/listsum1.pdf b/book/figs/listsum1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..103db1934cb24ebf0d1140f668abc81f5e401ff7 GIT binary patch literal 11055 zcmb_?2Rv2(`#2(8WMrh}WTxcqdtEb|?2(j|i)&@xdyPm6?Li@tRYuV=L!z>>m5fR$ zk;o`zHSl|%E1!_p_toqF`s?-XeeQGK?`OZC=Q-y&Ql?ru+tBhjgw(Cq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 HcmV?d00001 diff --git a/book/figs/listsum2.eps b/book/figs/listsum2.eps new file mode 100644 index 0000000..f771ec9 --- /dev/null +++ b/book/figs/listsum2.eps @@ -0,0 +1,2086 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: listsum2.eps +%%Creator: matplotlib version 0.99.1.1, http://matplotlib.sourceforge.net/ +%%CreationDate: Wed Aug 3 16:20:28 2011 +%%Orientation: portrait +%%BoundingBox: 18 180 594 612 +%%EndComments +%%BeginProlog +/mpldict 8 dict def +mpldict begin +/m { moveto } bind def +/l { lineto } bind def +/r { rlineto } bind def +/c { curveto } bind def +/cl { closepath } bind def +/box { +m +1 index 0 r +0 exch r +neg 0 r +cl +} bind def +/clipbox { +box +clip +newpath +} bind def +%!PS-Adobe-3.0 Resource-Font +%%Title: DejaVu Sans +%%Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. DejaVu changes are in public domain +%%Creator: Converted from TrueType by PPR +25 dict begin +/_d{bind def}bind def +/_m{moveto}_d +/_l{lineto}_d +/_cl{closepath eofill}_d +/_c{curveto}_d +/_sc{7 -1 roll{setcachedevice}{pop pop pop pop pop pop}ifelse}_d +/_e{exec}_d +/FontName /DejaVuSans def +/PaintType 0 def +/FontMatrix[.001 0 0 .001 0 0]def +/FontBBox[-1020 -349 1681 1167]def +/FontType 3 def +/Encoding StandardEncoding def +/FontInfo 10 dict dup begin +/FamilyName (DejaVu Sans) def +/FullName (DejaVu Sans) def +/Notice (Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. DejaVu changes are in public domain ) def +/Weight (Book) def +/Version (Version 2.30) def +/ItalicAngle 0.0 def +/isFixedPitch false def +/UnderlinePosition -130 def +/UnderlineThickness 90 def +end readonly def +/CharStrings 19 dict dup begin +/space{318 0 0 0 0 0 _sc +}_d +/parenleft{390 0 86 -131 310 759 _sc +310 759 _m +266 683 234 609 213 536 _c +191 463 181 389 181 314 _c +181 238 191 164 213 91 _c +234 17 266 -56 310 -131 _c +232 -131 _l +183 -54 146 20 122 94 _c +98 168 86 241 86 314 _c +86 386 98 459 122 533 _c +146 607 182 682 232 759 _c +310 759 _l +_cl}_d +/parenright{390 0 80 -131 304 759 _sc +80 759 _m +158 759 _l +206 682 243 607 267 533 _c +291 459 304 386 304 314 _c +304 241 291 168 267 94 _c +243 20 206 -54 158 -131 _c +80 -131 _l +123 -56 155 17 177 91 _c +198 164 209 238 209 314 _c +209 389 198 463 177 536 _c +155 609 123 683 80 759 _c +_cl}_d +/hyphen{361 0 49 234 312 314 _sc +49 314 _m +312 314 _l +312 234 _l +49 234 _l +49 314 _l +_cl}_d +/zero{636 0 66 -13 570 742 _sc +318 664 _m +267 664 229 639 203 589 _c +177 539 165 464 165 364 _c +165 264 177 189 203 139 _c +229 89 267 64 318 64 _c +369 64 407 89 433 139 _c +458 189 471 264 471 364 _c +471 464 458 539 433 589 _c +407 639 369 664 318 664 _c +318 742 _m +399 742 461 709 505 645 _c +548 580 570 486 570 364 _c +570 241 548 147 505 83 _c +461 19 399 -13 318 -13 _c +236 -13 173 19 130 83 _c +87 147 66 241 66 364 _c +66 486 87 580 130 645 _c +173 709 236 742 318 742 _c +_cl}_d +/one{636 0 110 0 544 729 _sc +124 83 _m +285 83 _l +285 639 _l +110 604 _l +110 694 _l +284 729 _l +383 729 _l +383 83 _l +544 83 _l +544 0 _l +124 0 _l +124 83 _l +_cl}_d +/two{{636 0 73 0 536 742 _sc +192 83 _m +536 83 _l +536 0 _l +73 0 _l +73 83 _l +110 121 161 173 226 239 _c +290 304 331 346 348 365 _c +380 400 402 430 414 455 _c +426 479 433 504 433 528 _c +433 566 419 598 392 622 _c +365 646 330 659 286 659 _c +255 659 222 653 188 643 _c +154 632 117 616 78 594 _c +78 694 _l +118 710 155 722 189 730 _c +223 738 255 742 284 742 _c +359 742 419 723 464 685 _c +509 647 532 597 532 534 _c +532 504 526 475 515 449 _c +504 422 484 390 454 354 _c +446 344 420 317 376 272 _c +332 227 271 164 192 83 _c +_cl}_e}_d +/three{{636 0 76 -13 556 742 _sc +406 393 _m +453 383 490 362 516 330 _c +542 298 556 258 556 212 _c +556 140 531 84 482 45 _c +432 6 362 -13 271 -13 _c +240 -13 208 -10 176 -4 _c +144 1 110 10 76 22 _c +76 117 _l +103 101 133 89 166 81 _c +198 73 232 69 268 69 _c +330 69 377 81 409 105 _c +441 129 458 165 458 212 _c +458 254 443 288 413 312 _c +383 336 341 349 287 349 _c +202 349 _l +202 430 _l +291 430 _l +339 430 376 439 402 459 _c +428 478 441 506 441 543 _c +441 580 427 609 401 629 _c +374 649 336 659 287 659 _c +260 659 231 656 200 650 _c +169 644 135 635 98 623 _c +98 711 _l +135 721 170 729 203 734 _c +235 739 266 742 296 742 _c +}_e{370 742 429 725 473 691 _c +517 657 539 611 539 553 _c +539 513 527 479 504 451 _c +481 423 448 403 406 393 _c +_cl}_e}_d +/four{636 0 49 0 580 729 _sc +378 643 _m +129 254 _l +378 254 _l +378 643 _l +352 729 _m +476 729 _l +476 254 _l +580 254 _l +580 172 _l +476 172 _l +476 0 _l +378 0 _l +378 172 _l +49 172 _l +49 267 _l +352 729 _l +_cl}_d +/five{{636 0 77 -13 549 729 _sc +108 729 _m +495 729 _l +495 646 _l +198 646 _l +198 467 _l +212 472 227 476 241 478 _c +255 480 270 482 284 482 _c +365 482 429 459 477 415 _c +525 370 549 310 549 234 _c +549 155 524 94 475 51 _c +426 8 357 -13 269 -13 _c +238 -13 207 -10 175 -6 _c +143 -1 111 6 77 17 _c +77 116 _l +106 100 136 88 168 80 _c +199 72 232 69 267 69 _c +323 69 368 83 401 113 _c +433 143 450 183 450 234 _c +450 284 433 324 401 354 _c +368 384 323 399 267 399 _c +241 399 214 396 188 390 _c +162 384 135 375 108 363 _c +108 729 _l +_cl}_e}_d +/underscore{500 0 -9 -235 510 -165 _sc +510 -165 _m +510 -235 _l +-9 -235 _l +-9 -165 _l +510 -165 _l +_cl}_d +/e{{615 0 55 -13 562 560 _sc +562 296 _m +562 252 _l +149 252 _l +153 190 171 142 205 110 _c +238 78 284 62 344 62 _c +378 62 412 66 444 74 _c +476 82 509 95 541 113 _c +541 28 _l +509 14 476 3 442 -3 _c +408 -9 373 -13 339 -13 _c +251 -13 182 12 131 62 _c +80 112 55 181 55 268 _c +55 357 79 428 127 481 _c +175 533 241 560 323 560 _c +397 560 455 536 498 489 _c +540 441 562 377 562 296 _c +472 322 _m +471 371 457 410 431 440 _c +404 469 368 484 324 484 _c +274 484 234 469 204 441 _c +174 413 156 373 152 322 _c +472 322 _l +_cl}_e}_d +/i{278 0 94 0 184 760 _sc +94 547 _m +184 547 _l +184 0 _l +94 0 _l +94 547 _l +94 760 _m +184 760 _l +184 646 _l +94 646 _l +94 760 _l +_cl}_d +/m{{974 0 91 0 889 560 _sc +520 442 _m +542 482 569 511 600 531 _c +631 550 668 560 711 560 _c +767 560 811 540 842 500 _c +873 460 889 403 889 330 _c +889 0 _l +799 0 _l +799 327 _l +799 379 789 418 771 444 _c +752 469 724 482 686 482 _c +639 482 602 466 575 435 _c +548 404 535 362 535 309 _c +535 0 _l +445 0 _l +445 327 _l +445 379 435 418 417 444 _c +398 469 369 482 331 482 _c +285 482 248 466 221 435 _c +194 404 181 362 181 309 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +201 495 226 520 255 536 _c +283 552 317 560 357 560 _c +397 560 430 550 458 530 _c +486 510 506 480 520 442 _c +}_e{_cl}_e}_d +/n{634 0 91 0 549 560 _sc +549 330 _m +549 0 _l +459 0 _l +459 327 _l +459 379 448 417 428 443 _c +408 469 378 482 338 482 _c +289 482 251 466 223 435 _c +195 404 181 362 181 309 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +202 494 227 519 257 535 _c +286 551 320 560 358 560 _c +420 560 468 540 500 501 _c +532 462 549 405 549 330 _c +_cl}_d +/r{411 0 91 0 411 560 _sc +411 463 _m +401 469 390 473 378 476 _c +366 478 353 480 339 480 _c +288 480 249 463 222 430 _c +194 397 181 350 181 288 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +199 495 224 520 254 536 _c +284 552 321 560 365 560 _c +371 560 378 559 386 559 _c +393 558 401 557 411 555 _c +411 463 _l +_cl}_d +/s{{521 0 54 -13 472 560 _sc +443 531 _m +443 446 _l +417 458 391 468 364 475 _c +336 481 308 485 279 485 _c +234 485 200 478 178 464 _c +156 450 145 430 145 403 _c +145 382 153 366 169 354 _c +185 342 217 330 265 320 _c +296 313 _l +360 299 405 279 432 255 _c +458 230 472 195 472 151 _c +472 100 452 60 412 31 _c +372 1 316 -13 246 -13 _c +216 -13 186 -10 154 -5 _c +122 0 89 8 54 20 _c +54 113 _l +87 95 120 82 152 74 _c +184 65 216 61 248 61 _c +290 61 323 68 346 82 _c +368 96 380 117 380 144 _c +380 168 371 187 355 200 _c +339 213 303 226 247 238 _c +216 245 _l +160 257 119 275 95 299 _c +70 323 58 356 58 399 _c +58 450 76 490 112 518 _c +148 546 200 560 268 560 _c +}_e{301 560 332 557 362 552 _c +391 547 418 540 443 531 _c +_cl}_e}_d +/t{392 0 27 0 368 702 _sc +183 702 _m +183 547 _l +368 547 _l +368 477 _l +183 477 _l +183 180 _l +183 135 189 106 201 94 _c +213 81 238 75 276 75 _c +368 75 _l +368 0 _l +276 0 _l +206 0 158 13 132 39 _c +106 65 93 112 93 180 _c +93 477 _l +27 477 _l +27 547 _l +93 547 _l +93 702 _l +183 702 _l +_cl}_d +/u{634 0 85 -13 543 560 _sc +85 216 _m +85 547 _l +175 547 _l +175 219 _l +175 167 185 129 205 103 _c +225 77 255 64 296 64 _c +344 64 383 79 411 110 _c +439 141 453 183 453 237 _c +453 547 _l +543 547 _l +543 0 _l +453 0 _l +453 84 _l +431 50 405 26 377 10 _c +348 -5 315 -13 277 -13 _c +214 -13 166 6 134 45 _c +101 83 85 140 85 216 _c +_cl}_d +end readonly def + +/BuildGlyph + {exch begin + CharStrings exch + 2 copy known not{pop /.notdef}if + true 3 1 roll get exec + end}_d + +/BuildChar { + 1 index /Encoding get exch get + 1 index /BuildGlyph get exec +}_d + +FontName currentdict end definefont pop +end +%%EndProlog +mpldict begin +18 180 translate +576 432 0 0 clipbox +1.000 setlinewidth +1 setlinejoin +2 setlinecap +[] 0 setdash +1.000 setgray +gsave +0 0 m +576 0 l +576 432 l +0 432 l +0 0 l +gsave +fill +grestore +stroke +grestore +gsave +72 43.2 m +518.4 43.2 l +518.4 388.8 l +72 388.8 l +72 43.2 l +fill +grestore +2.000 setlinewidth +0.700 setgray +gsave +446.4 345.6 72 43.2 clipbox +139.19 144.289 m +178.493 174.718 l +206.38 196.307 l +228.01 213.054 l +245.683 226.736 l +260.626 238.304 l +273.57 248.325 l +284.987 257.165 l +295.2 265.071 l +304.439 272.224 l +312.873 278.754 l +320.632 284.761 l +327.816 290.322 l +334.504 295.5 l +340.76 300.343 l +346.636 304.893 l +352.177 309.183 l +357.418 313.24 l +362.39 317.089 l +367.119 320.751 l +371.629 324.242 l +375.938 327.578 l +380.063 330.772 l +stroke +grestore +3.000 setlinewidth +0.000 0.000 1.000 setrgbcolor +gsave +446.4 345.6 72 43.2 clipbox +139.19 129.6 m +178.493 181.618 l +206.38 189.991 l +228.01 212.047 l +245.683 225.845 l +260.626 235.911 l +273.57 248.85 l +284.987 257.223 l +295.2 264.065 l +304.439 271.594 l +312.873 279.279 l +320.632 285.654 l +327.816 291.102 l +334.504 295.408 l +340.76 299.677 l +346.636 306.316 l +352.177 310.472 l +357.418 313.661 l +362.39 317.111 l +367.119 320.502 l +371.629 324.036 l +375.938 328.221 l +380.063 330.772 l +stroke +grestore +0.500 setlinewidth +0 setlinecap +0.000 setgray +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +72 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +72 388.8 o +grestore +gsave +61.000000 24.200000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/three glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +295.2 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +295.2 388.8 o +grestore +gsave +284.200000 24.200000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/four glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +518.4 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +518.4 388.8 o +grestore +gsave +507.400000 24.200000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/five glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +139.19 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +139.19 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +178.493 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +178.493 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +206.38 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +206.38 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +228.01 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +228.01 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +245.683 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +245.683 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +260.626 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +260.626 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +273.57 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +273.57 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +284.987 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +284.987 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +362.39 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +362.39 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +401.693 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +401.693 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +429.58 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +429.58 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +451.21 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +451.21 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +468.883 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +468.883 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +483.826 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +483.826 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +496.77 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +496.77 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +508.187 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +508.187 388.8 o +grestore +/DejaVuSans findfont +12.000 scalefont +setfont +292.45 12.481 m +(n) show +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 43.2 o +grestore +gsave +43.000000 35.700000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/hyphen glyphshow + +18.300586 8.765625 moveto +/three glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 129.6 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 129.6 o +grestore +gsave +43.000000 122.100000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/hyphen glyphshow + +18.300586 8.765625 moveto +/two glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 216 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 216 o +grestore +gsave +43.000000 208.500000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/hyphen glyphshow + +18.300586 8.875000 moveto +/one glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 302.4 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 302.4 o +grestore +gsave +46.000000 294.900000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/zero glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 388.8 o +grestore +gsave +46.000000 381.300000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/one glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 69.209 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 69.209 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 84.4233 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 84.4233 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 95.218 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 95.218 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 103.591 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 103.591 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 110.432 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 110.432 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 116.216 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 116.216 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 121.227 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 121.227 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 125.647 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 125.647 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 155.609 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 155.609 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 170.823 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 170.823 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 181.618 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 181.618 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 189.991 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 189.991 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 196.832 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 196.832 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 202.616 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 202.616 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 207.627 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 207.627 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 212.047 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 212.047 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 242.009 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 242.009 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 257.223 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 257.223 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 268.018 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 268.018 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 276.391 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 276.391 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 283.232 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 283.232 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 289.016 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 289.016 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 294.027 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 294.027 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 298.447 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 298.447 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 328.409 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 328.409 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 343.623 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 343.623 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 354.418 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 354.418 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 362.791 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 362.791 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 369.632 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 369.632 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 375.416 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 375.416 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 380.427 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 380.427 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 384.847 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 384.847 o +grestore +38 181.258 m +gsave +90 rotate +0 1.578 rmoveto +(run time \(s\)) show +grestore +1.000 setlinewidth +2 setlinecap +gsave +72 388.8 m +518.4 388.8 l +stroke +grestore +gsave +518.4 43.2 m +518.4 388.8 l +stroke +grestore +gsave +72 43.2 m +518.4 43.2 l +stroke +grestore +gsave +72 43.2 m +72 388.8 l +stroke +grestore +gsave +392.985 50.4 m +511.2 50.4 l +511.2 75.8575 l +392.985 75.8575 l +392.985 50.4 l +cl +gsave +1.000 setgray +fill +grestore +stroke +grestore +3.000 setlinewidth +0.000 0.000 1.000 setrgbcolor +gsave +403.065 64.4969 m +423.225 64.4969 l +stroke +grestore +0.000 setgray +/DejaVuSans findfont +14.400 scalefont +setfont +439.065 56.16 m +0 3.297 rmoveto +(sum_sum) show + +end +showpage diff --git a/book/figs/listsum2.pdf b/book/figs/listsum2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1b5e77de019c9a0c01bd103267e277a0cf1019ca GIT binary patch literal 9928 zcmb_C2{cvR_X))#M5a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6m~;quvR gROBm={4+)j{WpT1!br;KATF0JWH>qbP4H*@AIBY@EdT%j literal 0 HcmV?d00001 diff --git a/book/figs/rectangle.eps b/book/figs/rectangle.eps new file mode 100644 index 0000000..26ad4a9 --- /dev/null +++ b/book/figs/rectangle.eps @@ -0,0 +1,206 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rectangle.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5a +%%CreationDate: Wed May 30 11:35:27 2012 +%%BoundingBox: 0 0 219 74 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 74 moveto 0 0 lineto 219 0 lineto 219 74 lineto closepath clip newpath +-39.1 117.7 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 3300 1350 m 4275 1350 l 4275 1950 l 3300 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1425 975 m 3075 975 l 3075 1950 l 1425 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +3763 1852 m 3915 1852 l 3915 1792 l 3763 1792 l 3763 1792 l 3883 1822 l 3763 1852 l cp +eoclip +n 3525 1822 m + 3900 1822 l gs col0 s gr gr + +% arrowhead +n 3763 1852 m 3883 1822 l 3763 1792 l col0 s +% Polyline +gs clippath +3763 1552 m 3915 1552 l 3915 1492 l 3763 1492 l 3763 1492 l 3883 1522 l 3763 1552 l cp +eoclip +n 3525 1522 m + 3900 1522 l gs col0 s gr gr + +% arrowhead +n 3763 1552 m 3883 1522 l 3763 1492 l col0 s +% Polyline +gs clippath +2338 1477 m 2490 1477 l 2490 1417 l 2338 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +3158 1775 m 3310 1774 l 3309 1714 l 3157 1715 l 3157 1715 l 3278 1745 l 3158 1775 l cp +eoclip +n 2100 1747 m + 3295 1745 l gs col0 s gr gr + +% arrowhead +n 3158 1775 m 3278 1745 l 3157 1715 l col0 s +% Polyline +gs clippath +2338 1177 m 2490 1177 l 2490 1117 l 2338 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +% Polyline +gs clippath +1276 1170 m 1428 1170 l 1428 1110 l 1276 1110 l 1276 1110 l 1396 1140 l 1276 1170 l cp +eoclip +n 1028 1140 m + 1413 1140 l gs col0 s gr gr + +% arrowhead +n 1276 1170 m 1396 1140 l 1276 1110 l col0 s +/Helvetica ff 183.33 scf sf +3450 1875 m +gs 1 -1 sc (y) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +3975 1575 m +gs 1 -1 sc (0.0) col0 sh gr +/Helvetica ff 183.33 scf sf +3450 1575 m +gs 1 -1 sc (x) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +3975 1875 m +gs 1 -1 sc (0.0) col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1200 m +gs 1 -1 sc (width) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1200 m +gs 1 -1 sc (100.0) col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1800 m +gs 1 -1 sc (corner) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1500 m +gs 1 -1 sc (200.0) col0 sh gr +/Helvetica ff 183.33 scf sf +3300 1275 m +gs 1 -1 sc (Point) col0 sh gr +/Helvetica ff 183.33 scf sf +1500 900 m +gs 1 -1 sc (Rectangle) col0 sh gr +/Helvetica ff 183.33 scf sf +975 1200 m +gs 1 -1 sc (box) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1500 m +gs 1 -1 sc (height) dup sw pop neg 0 rm col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book/figs/rectangle.fig b/book/figs/rectangle.fig new file mode 100644 index 0000000..6ce860c --- /dev/null +++ b/book/figs/rectangle.fig @@ -0,0 +1,45 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 3300 1350 4275 1950 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3525 1822 3900 1822 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3525 1522 3900 1522 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 3300 1350 4275 1350 4275 1950 3300 1950 3300 1350 +4 2 0 50 0 16 11 0.0000 4 150 105 3450 1875 y\001 +4 0 0 50 0 16 11 0.0000 4 135 255 3975 1575 0.0\001 +4 2 0 50 0 16 11 0.0000 4 105 90 3450 1575 x\001 +4 0 0 50 0 16 11 0.0000 4 135 255 3975 1875 0.0\001 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1747 3295 1745 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1028 1140 1413 1140 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1425 975 3075 975 3075 1950 1425 1950 1425 975 +4 2 0 50 0 16 11 0.0000 4 135 435 2025 1200 width\001 +4 0 0 50 0 16 11 0.0000 4 135 465 2550 1200 100.0\001 +4 2 0 50 0 16 11 0.0000 4 105 540 2025 1800 corner\001 +4 0 0 50 0 16 11 0.0000 4 135 465 2550 1500 200.0\001 +4 0 0 50 0 16 11 0.0000 4 135 420 3300 1275 Point\001 +4 0 0 50 0 16 11 0.0000 4 180 840 1500 900 Rectangle\001 +4 2 0 50 0 16 11 0.0000 4 135 300 975 1200 box\001 +4 2 0 50 0 16 11 0.0000 4 180 510 2025 1500 height\001 diff --git a/book/figs/rectangle.pdf b/book/figs/rectangle.pdf new file mode 100644 index 0000000000000000000000000000000000000000..79bc9216743079303fe10114966613bed3fc253c GIT binary patch literal 5697 zcmb_Ac|4Tc`<3cyDoL^wdMg^y%scy-v1Az}2BETCYRtSdCSzurc`>9^T5t=|c2S~q zE418pOIk>qwtLGhOQ}>!(WWH)&O3;@eSY`*N5g#Poaa2-d6sj|^O$*aTnJ<$4QE!> zlA4F3LnKHRx&&uq1A8D+5gG(Bzx^W+-|#9RW=4D_b2K+CT=Sz z*=yVGu-b9dn}s`nEBZt#c=953$iyKYi$8_Re;swq?$X>qS^iQe)&0#|^Em+>7U|j9 z%g>zueYB#&TQlw9pOOvLm8<4k3_HzTvhk+D$ONmu5|7)rX1~21&@|L0gZz)3M3K1C zh(CtfWum=7bT-S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xHuAUcgkp+O6Pb{5c*%rh;Me z3mA>qDI4~XU$qpO_jX^`GG>SdqNN3QQ4hWOMv8A#99b*Ol-9(OY TWth@IG?E3GU}WUz$szn7ozd@3 literal 0 HcmV?d00001 diff --git a/book/figs/stack.eps b/book/figs/stack.eps new file mode 100644 index 0000000..c377a9b --- /dev/null +++ b/book/figs/stack.eps @@ -0,0 +1,219 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: stack.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5e +%%CreationDate: Mon Jul 27 11:38:05 2015 +%%BoundingBox: 0 0 284 141 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 141 moveto 0 0 lineto 284 0 lineto 284 141 lineto closepath clip newpath +-14.6 198.7 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 1424 2925 m 4950 2925 l 4950 3300 l 1424 3300 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1425 1800 m 4950 1800 l 4950 2775 l 1425 2775 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1425 975 m 4950 975 l 4950 1650 l 1425 1650 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2338 2302 m 2490 2302 l 2490 2242 l 2338 2242 l 2338 2242 l 2458 2272 l 2338 2302 l cp +eoclip +n 2100 2272 m + 2475 2272 l gs col0 s gr gr + +% arrowhead +n 2338 2302 m 2458 2272 l 2338 2242 l col0 s +% Polyline +gs clippath +2338 2602 m 2490 2602 l 2490 2542 l 2338 2542 l 2338 2542 l 2458 2572 l 2338 2602 l cp +eoclip +n 2100 2572 m + 2475 2572 l gs col0 s gr gr + +% arrowhead +n 2338 2602 m 2458 2572 l 2338 2542 l col0 s +% Polyline +gs clippath +2338 2002 m 2490 2002 l 2490 1942 l 2338 1942 l 2338 1942 l 2458 1972 l 2338 2002 l cp +eoclip +n 2100 1972 m + 2475 1972 l gs col0 s gr gr + +% arrowhead +n 2338 2002 m 2458 1972 l 2338 1942 l col0 s +% Polyline +gs clippath +2338 1477 m 2490 1477 l 2490 1417 l 2338 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2338 1177 m 2490 1177 l 2490 1117 l 2338 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +% Polyline +gs clippath +2330 3127 m 2482 3127 l 2482 3067 l 2330 3067 l 2330 3067 l 2450 3097 l 2330 3127 l cp +eoclip +n 2092 3097 m + 2467 3097 l gs col0 s gr gr + +% arrowhead +n 2330 3127 m 2450 3097 l 2330 3067 l col0 s +/Helvetica ff 183.33 scf sf +2025 1200 m +gs 1 -1 sc (line1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1500 m +gs 1 -1 sc (line2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1500 m +gs 1 -1 sc ('tiddle bang.') col0 sh gr +/Helvetica ff 183.33 scf sf +2025 2025 m +gs 1 -1 sc (part1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 2325 m +gs 1 -1 sc (part2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 2625 m +gs 1 -1 sc (cat) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2017 3150 m +gs 1 -1 sc (bruce) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1200 m +gs 1 -1 sc ('Bing tiddle ') col0 sh gr +/Helvetica ff 183.33 scf sf +2550 2025 m +gs 1 -1 sc ('Bing tiddle ') col0 sh gr +/Helvetica ff 183.33 scf sf +2550 2325 m +gs 1 -1 sc ('tiddle bang.') col0 sh gr +/Helvetica ff 183.33 scf sf +2550 2625 m +gs 1 -1 sc ('Bing tiddle tiddle bang.') col0 sh gr +/Helvetica ff 183.33 scf sf +2550 3150 m +gs 1 -1 sc ('Bing tiddle tiddle bang.') col0 sh gr +/Helvetica ff 183.33 scf sf +1275 2325 m +gs 1 -1 sc (cat_twice) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1275 3150 m +gs 1 -1 sc (print_twice) dup sw pop neg 0 rm col0 sh gr +% __main__ +/Helvetica ff 183.33 scf sf +1275 1350 m +gs 1 -1 sc (__main__) dup sw pop neg 0 rm col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book/figs/stack.fig b/book/figs/stack.fig new file mode 100644 index 0000000..a8e4b9e --- /dev/null +++ b/book/figs/stack.fig @@ -0,0 +1,51 @@ +#FIG 3.2 Produced by xfig version 3.2.5c +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 2100 1897 2475 2647 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2272 2475 2272 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2572 2475 2572 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1972 2475 1972 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2092 3097 2467 3097 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1424 2925 4950 2925 4950 3300 1424 3300 1424 2925 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1425 1800 4950 1800 4950 2775 1425 2775 1425 1800 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1425 975 4950 975 4950 1650 1425 1650 1425 975 +4 2 0 50 0 16 11 0.0000 4 135 450 2025 1200 line1\001 +4 2 0 50 0 16 11 0.0000 4 135 450 2025 1500 line2\001 +4 0 0 50 0 16 11 0.0000 4 165 1260 2550 1500 'tiddle bang.'\001 +4 2 0 50 0 16 11 0.0000 4 165 450 2025 2025 part1\001 +4 2 0 50 0 16 11 0.0000 4 165 450 2025 2325 part2\001 +4 2 0 50 0 16 11 0.0000 4 120 270 2025 2625 cat\001 +4 2 0 50 0 16 11 0.0000 4 135 450 2017 3150 bruce\001 +4 0 0 50 0 16 11 0.0000 4 165 1260 2550 1200 'Bing tiddle '\001 +4 0 0 50 0 16 11 0.0000 4 165 1260 2550 2025 'Bing tiddle '\001 +4 0 0 50 0 16 11 0.0000 4 165 1260 2550 2325 'tiddle bang.'\001 +4 0 0 50 0 16 11 0.0000 4 165 2340 2550 2625 'Bing tiddle tiddle bang.'\001 +4 0 0 50 0 16 11 0.0000 4 165 2340 2550 3150 'Bing tiddle tiddle bang.'\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1275 2325 cat_twice\001 +4 2 0 50 0 16 11 0.0000 4 150 990 1275 3150 print_twice\001 +# __main__ +4 2 0 50 0 16 11 0.0000 4 135 720 1275 1350 __main__\001 diff --git a/book/figs/stack.pdf b/book/figs/stack.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f402410f8c7bb2713d431f1323111e58bdcc145d GIT binary patch literal 5805 zcmb_A2Ut^A+jWAGwg^QWRIUgHmE`8$ED{44!xRF@mZ5~?5&|JfGazn31*r?Ds0bn| zRK?;}unuH6s?b8M0~EC&s9?c?2srr94Irrf{(j%{^ycB=ob%4}j&t7kSa~}-lMphE zV0HQF<~;;DM1kZH(F6_$_P}Ifbri$^D?YHZM5@M=5bP`!s4+)OC>LS&_5_t$i3wr} z+U%YFrJL#~hUebQS~eEC`0Dm1;iABTnf^;_t$e=rUmFx&>o<(FC3o&7rRVUk-+l-sB|r8JX0xsSeG z9A3JJ#bh_gEe4lj;ud&8&4(Hq54)&UB;#Jz%k)EyKSU>2fZi!k)naMhl zpLBMd;o8Wg=!KN>VKtDyIb*7yVfhy&X{lw!Yf`5+Hrs6KwP_N8Mn~#K_ZJ)PcU)>?q>+9`|uP(6c6Wa~xNP3;ixY;I4!yaETXiXq# z%;uCTZl!neE&0_+M_*@|OsBW*jS48MzAG~G8#CL_q;_9)+^jfvt@5&uFdq|11aswDD1-vQ zs4WdbXh;|V0F{_b4N>t3C%`_KO0H1~F%^h?Z>3!5i>X6kkR1^0hiTOS-ASu<@l}KP zhY*|(AaRxhas<&$KsvxYFb5n}5S~Up1hCYv7A~SMtpGQm7o<~61;OqTkqQbS;A;C2 z!XUswgR>k$igWMJ$UaJ*KrN8U#RDw*wdZ4Mfe1jr);^KV{FuSuHVCknHy=Xm?faF~ z?W$jt50ik?`3!DBx6J{lEy4CQ$fx;ETh4)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I^HJh9kPflO>i)RIJ4q(CE86G5>KjukR+U!Oaq68pY^ zju0MX_BYPbErCo2euF=pBlZO7U;6$%MuUeZIFjv%@%YjB+2K5-;Tgzs>%U9#8K4)# za|T!(&l+n-HlA`6Cdxz*s;w^Dh!hGDpn z+&`sdvB0Cv$NUfq>oZz}P6y8&pW=ZXe745;e9e{)9u+>JrO`jrnaZRN(NC=ufW}t| zo`WISSF!}We9YyHc$48dAxv8qm&>K{P%f88 mW1>`NhBFmmP?`4sj1h*vegStY)jFpE7oh|zD<>~!!v6tF*mA!B literal 0 HcmV?d00001 diff --git a/book/figs/stack2.eps b/book/figs/stack2.eps new file mode 100644 index 0000000..0e82547 --- /dev/null +++ b/book/figs/stack2.eps @@ -0,0 +1,200 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: stack2.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5d +%%CreationDate: Mon Oct 19 10:20:09 2015 +%%BoundingBox: 0 0 139 150 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 150 moveto 0 0 lineto 139 0 lineto 139 150 lineto closepath clip newpath +-42.7 176.2 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 1800 450 m 3000 450 l 3000 825 l 1800 825 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 975 m 3000 975 l 3000 1350 l 1800 1350 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 1500 m 3000 1500 l 3000 1875 l 1800 1875 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 2025 m 3000 2025 l 3000 2400 l 1800 2400 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 2550 m 3000 2550 l 3000 2925 l 1800 2925 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2413 1177 m 2565 1177 l 2565 1117 l 2413 1117 l 2413 1117 l 2533 1147 l 2413 1177 l cp +eoclip +n 2175 1147 m + 2550 1147 l gs col0 s gr gr + +% arrowhead +n 2413 1177 m 2533 1147 l 2413 1117 l col0 s +% Polyline +gs clippath +2413 1702 m 2565 1702 l 2565 1642 l 2413 1642 l 2413 1642 l 2533 1672 l 2413 1702 l cp +eoclip +n 2175 1672 m + 2550 1672 l gs col0 s gr gr + +% arrowhead +n 2413 1702 m 2533 1672 l 2413 1642 l col0 s +% Polyline +gs clippath +2413 2227 m 2565 2227 l 2565 2167 l 2413 2167 l 2413 2167 l 2533 2197 l 2413 2227 l cp +eoclip +n 2175 2197 m + 2550 2197 l gs col0 s gr gr + +% arrowhead +n 2413 2227 m 2533 2197 l 2413 2167 l col0 s +% Polyline +gs clippath +2413 2752 m 2565 2752 l 2565 2692 l 2413 2692 l 2413 2692 l 2533 2722 l 2413 2752 l cp +eoclip +n 2175 2722 m + 2550 2722 l gs col0 s gr gr + +% arrowhead +n 2413 2752 m 2533 2722 l 2413 2692 l col0 s +/Helvetica ff 183.33 scf sf +1650 675 m +gs 1 -1 sc (__main__) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 1200 m +gs 1 -1 sc (countdown) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 1725 m +gs 1 -1 sc (countdown) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 2250 m +gs 1 -1 sc (countdown) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 2775 m +gs 1 -1 sc (countdown) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2100 1200 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 1200 m +gs 1 -1 sc (3) col0 sh gr +/Helvetica ff 183.33 scf sf +2100 1725 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 1725 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 183.33 scf sf +2100 2250 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 2250 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +2100 2775 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 2775 m +gs 1 -1 sc (0) col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book/figs/stack2.fig b/book/figs/stack2.fig new file mode 100644 index 0000000..4826deb --- /dev/null +++ b/book/figs/stack2.fig @@ -0,0 +1,44 @@ +#FIG 3.2 Produced by xfig version 3.2.5c +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 450 3000 450 3000 825 1800 825 1800 450 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 975 3000 975 3000 1350 1800 1350 1800 975 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 1500 3000 1500 3000 1875 1800 1875 1800 1500 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 2025 3000 2025 3000 2400 1800 2400 1800 2025 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 2550 3000 2550 3000 2925 1800 2925 1800 2550 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 1147 2550 1147 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 1672 2550 1672 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 2197 2550 2197 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 2722 2550 2722 +4 2 0 50 0 16 11 0.0000 4 135 720 1650 675 __main__\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 1200 countdown\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 1725 countdown\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 2250 countdown\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 2775 countdown\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 1200 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 1200 3\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 1725 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 1725 2\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 2250 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 2250 1\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 2775 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 2775 0\001 diff --git a/book/figs/stack2.pdf b/book/figs/stack2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8625e86426397f75fcb3f5b1ffe4259b2f44c7f1 GIT binary patch literal 5056 zcmb_A30Myr$-U>EbMCoky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;fV9G90sD2@LraJ|2Ubd? zo7+3AWd(sy2ZlplB@!_Nzo+N@G3w5qASe4VQt90IR(9@DTX%)I$Gf836IAzf&;XUw zVdD`bq+C2Q{DB4mU-8SgrZ6H1VHKIIU^{f^WSAp&ev?X+Y z>wI87kH_J`D!2>g!vj4r{lNMz7?;Zd{q5^8lrI2%_!}@D_bpl!ocV1$_S>|+7-);% z;3vR9kM}wZV{<{L`8o{s<-LW6`ue^F!+7ks_F#hxrkfu{%0WX#f;VI^A|ukk%L^`y zL>dg>Ed$+Q!N_>M$^cutEztA@!SN!AKpMdH;Ym2s010S!eFc($;6O|e5ELX0%ATFQHf!y7t6N91u0tsXrlK=n! literal 0 HcmV?d00001 diff --git a/book/figs/stack3.eps b/book/figs/stack3.eps new file mode 100644 index 0000000..b894ef6 --- /dev/null +++ b/book/figs/stack3.eps @@ -0,0 +1,342 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: stack3.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5e +%%CreationDate: Mon Jul 27 11:39:42 2015 +%%BoundingBox: 0 0 319 150 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 150 moveto 0 0 lineto 319 0 lineto 319 150 lineto closepath clip newpath +-48.2 176.2 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 1800 975 m 5700 975 l 5700 1350 l 1800 1350 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 1500 m 5700 1500 l 5700 1875 l 1800 1875 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 2025 m 5700 2025 l 5700 2400 l 1800 2400 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 2550 m 5700 2550 l 5700 2925 l 1800 2925 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 450 m 5700 450 l 5700 825 l 1800 825 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2413 1177 m 2565 1177 l 2565 1117 l 2413 1117 l 2413 1117 l 2533 1147 l 2413 1177 l cp +eoclip +n 2175 1147 m + 2550 1147 l gs col0 s gr gr + +% arrowhead +n 2413 1177 m 2533 1147 l 2413 1117 l col0 s +% Polyline +gs clippath +3913 1177 m 4065 1177 l 4065 1117 l 3913 1117 l 3913 1117 l 4033 1147 l 3913 1177 l cp +eoclip +n 3675 1147 m + 4050 1147 l gs col0 s gr gr + +% arrowhead +n 3913 1177 m 4033 1147 l 3913 1117 l col0 s +% Polyline +gs clippath +3913 1702 m 4065 1702 l 4065 1642 l 3913 1642 l 3913 1642 l 4033 1672 l 3913 1702 l cp +eoclip +n 3675 1672 m + 4050 1672 l gs col0 s gr gr + +% arrowhead +n 3913 1702 m 4033 1672 l 3913 1642 l col0 s +% Polyline +gs clippath +3913 2227 m 4065 2227 l 4065 2167 l 3913 2167 l 3913 2167 l 4033 2197 l 3913 2227 l cp +eoclip +n 3675 2197 m + 4050 2197 l gs col0 s gr gr + +% arrowhead +n 3913 2227 m 4033 2197 l 3913 2167 l col0 s +% Arc +gs clippath +5839 2262 m 5694 2216 l 5676 2274 l 5821 2319 l 5821 2319 l 5716 2255 l 5839 2262 l cp +eoclip +n 5700.0 2475.0 225.0 90.0000 -90.0000 arcn +gs col0 s gr + gr + +% arrowhead +n 5839 2262 m 5716 2255 l 5821 2319 l col0 s +% Arc +gs clippath +5839 1737 m 5694 1691 l 5676 1749 l 5821 1794 l 5821 1794 l 5716 1730 l 5839 1737 l cp +eoclip +n 5700.0 1950.0 225.0 90.0000 -90.0000 arcn +gs col0 s gr + gr + +% arrowhead +n 5839 1737 m 5716 1730 l 5821 1794 l col0 s +% Arc +gs clippath +5839 687 m 5694 641 l 5676 699 l 5821 744 l 5821 744 l 5716 680 l 5839 687 l cp +eoclip +n 5700.0 900.0 225.0 90.0000 -90.0000 arcn +gs col0 s gr + gr + +% arrowhead +n 5839 687 m 5716 680 l 5821 744 l col0 s +% Arc +gs clippath +5839 1212 m 5694 1166 l 5676 1224 l 5821 1269 l 5821 1269 l 5716 1205 l 5839 1212 l cp +eoclip +n 5700.0 1425.0 225.0 90.0000 -90.0000 arcn +gs col0 s gr + gr + +% arrowhead +n 5839 1212 m 5716 1205 l 5821 1269 l col0 s +% Polyline +gs clippath +2413 1702 m 2565 1702 l 2565 1642 l 2413 1642 l 2413 1642 l 2533 1672 l 2413 1702 l cp +eoclip +n 2175 1672 m + 2550 1672 l gs col0 s gr gr + +% arrowhead +n 2413 1702 m 2533 1672 l 2413 1642 l col0 s +% Polyline +gs clippath +2413 2227 m 2565 2227 l 2565 2167 l 2413 2167 l 2413 2167 l 2533 2197 l 2413 2227 l cp +eoclip +n 2175 2197 m + 2550 2197 l gs col0 s gr gr + +% arrowhead +n 2413 2227 m 2533 2197 l 2413 2167 l col0 s +% Polyline +gs clippath +2413 2752 m 2565 2752 l 2565 2692 l 2413 2692 l 2413 2692 l 2533 2722 l 2413 2752 l cp +eoclip +n 2175 2722 m + 2550 2722 l gs col0 s gr gr + +% arrowhead +n 2413 2752 m 2533 2722 l 2413 2692 l col0 s +% Polyline +gs clippath +5263 2227 m 5415 2227 l 5415 2167 l 5263 2167 l 5263 2167 l 5383 2197 l 5263 2227 l cp +eoclip +n 5025 2197 m + 5400 2197 l gs col0 s gr gr + +% arrowhead +n 5263 2227 m 5383 2197 l 5263 2167 l col0 s +% Polyline +gs clippath +5263 1702 m 5415 1702 l 5415 1642 l 5263 1642 l 5263 1642 l 5383 1672 l 5263 1702 l cp +eoclip +n 5025 1672 m + 5400 1672 l gs col0 s gr gr + +% arrowhead +n 5263 1702 m 5383 1672 l 5263 1642 l col0 s +% Polyline +gs clippath +5263 1177 m 5415 1177 l 5415 1117 l 5263 1117 l 5263 1117 l 5383 1147 l 5263 1177 l cp +eoclip +n 5025 1147 m + 5400 1147 l gs col0 s gr gr + +% arrowhead +n 5263 1177 m 5383 1147 l 5263 1117 l col0 s +/Helvetica ff 183.33 scf sf +2100 1200 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 1200 m +gs 1 -1 sc (3) col0 sh gr +/Helvetica ff 183.33 scf sf +3600 1200 m +gs 1 -1 sc (recurse) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4125 1200 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 183.33 scf sf +3600 1725 m +gs 1 -1 sc (recurse) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4125 1725 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +3600 2250 m +gs 1 -1 sc (recurse) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4125 2250 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +1650 675 m +gs 1 -1 sc (__main__) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 1200 m +gs 1 -1 sc (factorial) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2100 1725 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 1725 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 183.33 scf sf +2100 2250 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 2250 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +2100 2775 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 2775 m +gs 1 -1 sc (0) col0 sh gr +/Helvetica ff 183.33 scf sf +1650 1725 m +gs 1 -1 sc (factorial) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 2250 m +gs 1 -1 sc (factorial) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 2775 m +gs 1 -1 sc (factorial) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +6000 2550 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +6000 2025 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +6000 1500 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 183.33 scf sf +6000 975 m +gs 1 -1 sc (6) col0 sh gr +/Helvetica ff 183.33 scf sf +5475 2250 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +4950 2250 m +gs 1 -1 sc (result) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +5475 1725 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 183.33 scf sf +5475 1200 m +gs 1 -1 sc (6) col0 sh gr +/Helvetica ff 183.33 scf sf +4950 1200 m +gs 1 -1 sc (result) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4950 1725 m +gs 1 -1 sc (result) dup sw pop neg 0 rm col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book/figs/stack3.fig b/book/figs/stack3.fig new file mode 100644 index 0000000..623fa28 --- /dev/null +++ b/book/figs/stack3.fig @@ -0,0 +1,96 @@ +#FIG 3.2 Produced by xfig version 3.2.5c +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +5 1 0 1 0 7 50 0 -1 0.000 0 1 1 0 5700.000 2475.000 5700 2700 5925 2475 5700 2250 + 0 0 1.00 60.00 120.00 +5 1 0 1 0 7 50 0 -1 0.000 0 1 1 0 5700.000 1950.000 5700 2175 5925 1950 5700 1725 + 0 0 1.00 60.00 120.00 +5 1 0 1 0 7 50 0 -1 0.000 0 1 1 0 5700.000 900.000 5700 1125 5925 900 5700 675 + 0 0 1.00 60.00 120.00 +5 1 0 1 0 7 50 0 -1 0.000 0 1 1 0 5700.000 1425.000 5700 1650 5925 1425 5700 1200 + 0 0 1.00 60.00 120.00 +6 1950 1050 2775 1200 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 1147 2550 1147 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 1200 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 1200 3\001 +-6 +6 3075 1050 4275 2250 +6 3075 1050 4275 1200 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3675 1147 4050 1147 +4 2 0 50 0 16 11 0.0000 4 90 630 3600 1200 recurse\001 +4 0 0 50 0 16 11 0.0000 4 135 90 4125 1200 2\001 +-6 +6 3075 1575 4275 1725 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3675 1672 4050 1672 +4 2 0 50 0 16 11 0.0000 4 90 630 3600 1725 recurse\001 +4 0 0 50 0 16 11 0.0000 4 135 90 4125 1725 1\001 +-6 +6 3075 2100 4275 2250 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3675 2197 4050 2197 +4 2 0 50 0 16 11 0.0000 4 90 630 3600 2250 recurse\001 +4 0 0 50 0 16 11 0.0000 4 135 90 4125 2250 1\001 +-6 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 1672 2550 1672 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 2197 2550 2197 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 2722 2550 2722 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 975 5700 975 5700 1350 1800 1350 1800 975 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 1500 5700 1500 5700 1875 1800 1875 1800 1500 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 2025 5700 2025 5700 2400 1800 2400 1800 2025 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 2550 5700 2550 5700 2925 1800 2925 1800 2550 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 450 5700 450 5700 825 1800 825 1800 450 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5025 2197 5400 2197 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5025 1672 5400 1672 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5025 1147 5400 1147 +4 2 0 50 0 16 11 0.0000 4 135 720 1650 675 __main__\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 1200 factorial\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 1725 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 1725 2\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 2250 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 2250 1\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 2775 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 2775 0\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 1725 factorial\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 2250 factorial\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 2775 factorial\001 +4 0 0 50 0 16 11 0.0000 4 135 90 6000 2550 1\001 +4 0 0 50 0 16 11 0.0000 4 135 90 6000 2025 1\001 +4 0 0 50 0 16 11 0.0000 4 135 90 6000 1500 2\001 +4 0 0 50 0 16 11 0.0000 4 135 90 6000 975 6\001 +4 0 0 50 0 16 11 0.0000 4 135 90 5475 2250 1\001 +4 2 0 50 0 16 11 0.0000 4 135 540 4950 2250 result\001 +4 0 0 50 0 16 11 0.0000 4 135 90 5475 1725 2\001 +4 0 0 50 0 16 11 0.0000 4 135 90 5475 1200 6\001 +4 2 0 50 0 16 11 0.0000 4 135 540 4950 1200 result\001 +4 2 0 50 0 16 11 0.0000 4 135 540 4950 1725 result\001 diff --git a/book/figs/stack3.pdf b/book/figs/stack3.pdf new file mode 100644 index 0000000000000000000000000000000000000000..456bd930e6e203cedacec06c4382563b987cb6a9 GIT binary patch literal 5999 zcmb_A3pi9;)agN{H@b9n>*R5fX3m@$Gh;C0S>BIOM5QrvFc~w`JUnt0BH>;|LPDi* zlkTlhR}_ULy-#mcMtQOz1LoA?X}nIthF_rELPzWf*ww@ z=GE?O90ejm0`JW@BO}-j<@-wfAS!@3!>hPF2`Yl%RXmmiwLsYd4$5TW#1aw83cv+t zWV+SyJ?XO_cIg%!SF8xq=#&=Yi7K0j2dJ{=wBw++8etVTAcy#mL(YO8=7W|iYHIe0 zFBV&;Hq27q(XRIS*~p;!VB7h&gI@bp%I04^5=zw%^SQkHfokiaqSh%p4=!nL#5eAE zGE$hfr+ma8=_G7DA!;nK?N%z-wAQaSGg7&ifbQF*%=R5N?2Al3x*&3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0IcPqF6(t}`UfdJgpV0|eB zTl0Mc5at2kQpnl@@-(88&1rfhGksGt8eQMajJlGlM_#FKL7`ERm3pS;2=m`DHei=P Wz_udEsDZ#`0u`sJxzceJ?tcI|1ph4n literal 0 HcmV?d00001 diff --git a/book/figs/stack4.eps b/book/figs/stack4.eps new file mode 100644 index 0000000..430a3d4 --- /dev/null +++ b/book/figs/stack4.eps @@ -0,0 +1,173 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: stack4.eps +%%Creator: fig2dev Version 3.2 Patchlevel 3c +%%CreationDate: Fri Dec 14 14:02:13 2001 +%%For: downey@rocky.wellesley.edu (Allen B. Downey) +%%BoundingBox: 0 0 222 101 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 101 moveto 0 0 lineto 222 0 lineto 222 101 lineto closepath clip newpath +-40.0 145.0 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +%%Page: 1 1 +10 setmiterlimit + 0.06000 0.06000 sc +% +% Fig objects follow +% +% Polyline +7.500 slw +n 1800 1725 m 4350 1725 l 4350 2400 l 1800 2400 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 750 m 4350 750 l 4350 1575 l 1800 1575 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline + [15 45] 45 sd +n 2175 1125 m + 2550 1125 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 2175 1125 m + 2550 900 l gs col0 s gr [] 0 sd +% Polyline +gs clippath +2547 1383 m 2578 1331 l 2448 1253 l 2536 1341 l 2417 1304 l cp +eoclip +n 2175 1125 m + 2550 1350 l gs col0 s gr gr + +% arrowhead +n 2417 1304 m 2536 1341 l 2448 1253 l col0 s +/Helvetica ff 165.00 scf sf +2100 1200 m +gs 1 -1 sc (i) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2625 1200 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 165.00 scf sf +2625 975 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +2625 1425 m +gs 1 -1 sc (3) col0 sh gr +% Polyline +gs clippath +2565 2130 m 2565 2070 l 2413 2070 l 2533 2100 l 2413 2130 l cp +eoclip +n 2175 2100 m + 2550 2100 l gs col0 s gr gr + +% arrowhead +n 2413 2130 m 2533 2100 l 2413 2070 l col0 s +% Polyline + [15 45] 45 sd +n 3300 2100 m + 3675 1875 l gs col0 s gr [] 0 sd +% Polyline +gs clippath +3690 2130 m 3690 2070 l 3538 2070 l 3658 2100 l 3538 2130 l cp +eoclip +n 3300 2100 m + 3675 2100 l gs col0 s gr gr + +% arrowhead +n 3538 2130 m 3658 2100 l 3538 2070 l col0 s +/Helvetica ff 165.00 scf sf +2100 2175 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2625 2175 m +gs 1 -1 sc (3) col0 sh gr +/Helvetica ff 165.00 scf sf +3225 2175 m +gs 1 -1 sc (i) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3750 2175 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 165.00 scf sf +3750 1950 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +675 975 m +gs 1 -1 sc (printMultTable) col0 sh gr +/Helvetica ff 165.00 scf sf +750 1950 m +gs 1 -1 sc (printMultiples) col0 sh gr +$F2psEnd +rs diff --git a/book/figs/stack4.fig b/book/figs/stack4.fig new file mode 100644 index 0000000..d79f4c7 --- /dev/null +++ b/book/figs/stack4.fig @@ -0,0 +1,41 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 2025 825 2775 1425 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 2175 1125 2550 1125 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 2175 1125 2550 900 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 1125 2550 1350 +4 2 0 50 0 16 11 0.0000 4 120 30 2100 1200 i\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2625 1200 2\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2625 975 1\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2625 1425 3\001 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 2100 2550 2100 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 3300 2100 3675 1875 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3300 2100 3675 2100 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 1725 4350 1725 4350 2400 1800 2400 1800 1725 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 750 4350 750 4350 1575 1800 1575 1800 750 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 2175 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2625 2175 3\001 +4 2 0 50 0 16 11 0.0000 4 120 30 3225 2175 i\001 +4 0 0 50 0 16 11 0.0000 4 120 90 3750 2175 2\001 +4 0 0 50 0 16 11 0.0000 4 120 90 3750 1950 1\001 +4 0 0 50 0 16 11 0.0000 4 150 975 675 975 printMultTable\001 +4 0 0 50 0 16 11 0.0000 4 150 930 750 1950 printMultiples\001 diff --git a/book/figs/stack4.pdf b/book/figs/stack4.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0797d083519d7bfbaa3f9844e75804e6d2dc0e54 GIT binary patch literal 5098 zcmb^#cUV)`S1OK1go-FAj;8{FN_csh5J{9FP#}yDh9cr4c?p56CJzX-T0lia0k>5| z3l7{OMYN(~)q?Q@S81VjuvEaJU{#Q6?eD%Y#PR*wKYYN)y=UEX&wA%P+aOOb3gW~d z*;aMr7Lu3{6;j2-kz8G2e@rRGV<8rR2w*Rn9LF>e>?KEW%o7u-#2Al9(&8EnRgiQ$ zHVgTxTU3*?Ps6)dMXAj7f1NY6Ct2Jbo${rpwW}^St*OBmJc8usN=(re4xv%?rz{DR&zj z)ze517(KC*Ki}FoDnjILdP<*5_TiwT*N%c{Wh;)Xvs2$JI8Sb0&XE16okOAK{gb{S zuE}y;Vi=O5+FW;*Buz~(+_b{uUTIdFLTLAsN!$5JKFTH4!(xigZ0g#3@6PARO`YL7 zi&fU`vIjMJS1+9$gBH~MX1>vmS31gO@4b+5W&2hrEK8At8S0%ZYf!xk?2?d)kFI=(;adYIlkYI&rfvu z{T%h~^W)#msqY-=oAKDjI;8pabKQA3yZTVAUT*ip$QnAX^|#9Qb)sE4GP-`slBh@F zOmEdDvkAvoH599Y`i_RnjjX_+8wY#GmgsAy3MJ1!jT^s-+l`X7zpVDyg8fwwtzR+Ai;q_dIbr)Q>qD;yw?8i&op{21 zM#HQtLW}#71M|%f2<`GW@Ab7Pkq2*DG~-%L&5f)xv%)gNUcMZ4Se$oW_XBNKG{twr z{@R(x?Sr>$JGSoL-^Vi1de>0p&V?Icedb2}#tDb&jF;4hIU4z0*l^s!al)9YnZ?(R z+dEDibE%oi>qaUsKKTB?661-h^Dpjf$$LV(-B$W@d)d#{0p{K{2bvh#s8jcE&n}*z zz7uq8@tSVaCnIaDs~VpKo4u}uZj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fW!J6AeZs_76wlEjkFKA#{dEu4Lk)8)(aj9`bf{m6ZED?g3`++ClMv^ zy&^oM2Omgj`wwNb1L*yUECD7b^2FW~7YZTaDf>4* z7?7>f*#Bz^ISkIRIt?ZP6C4;?h+5Y7KrAMc&V(e;0F2EBGdl4=$^jUI!3Hzf+b}8{ z0khvbFed9gUMdxNAI4<7&+E(pljJ+{To_=;e;bC-Sm2w$+c2uL^Lunu7h;Ben+{>p z-#dd&Wew2<*PvkV(tvMi5F8>)0UtCN5G+usz?TPN5`*9`loAzWn99IN=m|x-GMS#v zEKd(AoyulW=`<$G-OY{WMWfGW(it9fh8yqSDWZsv8o;+2+~6Pvi^U|_+RhL3BK;3n CuQbH~ literal 0 HcmV?d00001 diff --git a/book/figs/stack5.eps b/book/figs/stack5.eps new file mode 100644 index 0000000..92a8a36 --- /dev/null +++ b/book/figs/stack5.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: stack5.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5e +%%CreationDate: Mon Jul 27 11:40:36 2015 +%%BoundingBox: 0 0 238 74 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 74 moveto 0 0 lineto 238 0 lineto 238 74 lineto closepath clip newpath +-96.1 162.7 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 2700 1500 m 3675 1500 l 3675 1950 l 2700 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 2700 2100 m 3675 2100 l 3675 2550 l 2700 2550 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4125 1725 m 5550 1725 l 5550 2700 l 4125 2700 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +4813 2227 m 4965 2227 l 4965 2167 l 4813 2167 l 4813 2167 l 4933 2197 l 4813 2227 l cp +eoclip +n 4575 2197 m + 4950 2197 l gs col0 s gr gr + +% arrowhead +n 4813 2227 m 4933 2197 l 4813 2167 l col0 s +% Polyline +gs clippath +4813 2527 m 4965 2527 l 4965 2467 l 4813 2467 l 4813 2467 l 4933 2497 l 4813 2527 l cp +eoclip +n 4575 2497 m + 4950 2497 l gs col0 s gr gr + +% arrowhead +n 4813 2527 m 4933 2497 l 4813 2467 l col0 s +% Polyline +gs clippath +4813 1927 m 4965 1927 l 4965 1867 l 4813 1867 l 4813 1867 l 4933 1897 l 4813 1927 l cp +eoclip +n 4575 1897 m + 4950 1897 l gs col0 s gr gr + +% arrowhead +n 4813 1927 m 4933 1897 l 4813 1867 l col0 s +% Polyline +gs clippath +3953 2051 m 4079 1966 l 4045 1916 l 3919 2001 l 3919 2001 l 4036 1959 l 3953 2051 l cp +eoclip +n 3507 2318 m + 4050 1950 l gs col0 s gr gr + +% arrowhead +n 3953 2051 m 4036 1959 l 3919 2001 l col0 s +% Polyline +gs clippath +3910 1867 m 4056 1907 l 4072 1850 l 3926 1809 l 3926 1809 l 4034 1871 l 3910 1867 l cp +eoclip +n 3510 1725 m + 4050 1875 l gs col0 s gr gr + +% arrowhead +n 3910 1867 m 4034 1871 l 3926 1809 l col0 s +/Helvetica ff 183.33 scf sf +4500 1950 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4500 2250 m +gs 1 -1 sc (1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4500 2550 m +gs 1 -1 sc (2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +5025 1950 m +gs 1 -1 sc ('a') col0 sh gr +/Helvetica ff 183.33 scf sf +5025 2250 m +gs 1 -1 sc ('b') col0 sh gr +/Helvetica ff 183.33 scf sf +5025 2550 m +gs 1 -1 sc ('c') col0 sh gr +/Helvetica ff 183.33 scf sf +4125 1650 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 183.33 scf sf +3450 2377 m +gs 1 -1 sc (t) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +3465 1770 m +gs 1 -1 sc (letters) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2632 2377 m +gs 1 -1 sc (delete_head) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2617 1770 m +gs 1 -1 sc (__main__) dup sw pop neg 0 rm col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book/figs/stack5.fig b/book/figs/stack5.fig new file mode 100644 index 0000000..6db872a --- /dev/null +++ b/book/figs/stack5.fig @@ -0,0 +1,41 @@ +#FIG 3.2 Produced by xfig version 3.2.5c +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4575 2197 4950 2197 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4575 2497 4950 2497 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4575 1897 4950 1897 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2700 1500 3675 1500 3675 1950 2700 1950 2700 1500 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2700 2100 3675 2100 3675 2550 2700 2550 2700 2100 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3507 2318 4050 1950 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3510 1725 4050 1875 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4125 1725 5550 1725 5550 2700 4125 2700 4125 1725 +4 2 0 50 0 16 11 0.0000 4 135 90 4500 1950 0\001 +4 2 0 50 0 16 11 0.0000 4 135 90 4500 2250 1\001 +4 2 0 50 0 16 11 0.0000 4 135 90 4500 2550 2\001 +4 0 0 50 0 16 11 0.0000 4 135 270 5025 1950 'a'\001 +4 0 0 50 0 16 11 0.0000 4 135 270 5025 2250 'b'\001 +4 0 0 50 0 16 11 0.0000 4 135 270 5025 2550 'c'\001 +4 0 0 50 0 16 11 0.0000 4 135 360 4125 1650 list\001 +4 2 0 50 0 16 11 0.0000 4 120 90 3450 2377 t\001 +4 2 0 50 0 16 11 0.0000 4 135 630 3465 1770 letters\001 +4 2 0 50 0 16 11 0.0000 4 150 990 2632 2377 delete_head\001 +4 2 0 50 0 16 11 0.0000 4 135 720 2617 1770 __main__\001 diff --git a/book/figs/stack5.pdf b/book/figs/stack5.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b2b781b5db201cbb896fa08b5cab28e29345110b GIT binary patch literal 5449 zcmb_A3p|wB+oe!bsZA+cO)pj>%)Il?eI_$U&tf1$~}>^;;{o~UF0PjW7k)<#BuQp2RaPum|9)_ zw7J8YOdES)NLGWHkbgaEQs6(mZu1b?n~DX2*7C##--A@*8+? zd+t8_o1s&fYg4i&v{Od78A*@JMqMI*T6{K6B&ZoeZrKu(AJyO2UtL@{^M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ZIDkHkrl_KoA~-%A;|}R0fYqb%Os!37ijD-9QHpI`aPmYcI-PtZHol z2nm5q9zm0$u}~l=vT$F}DKtnV#w3vnG!|7rOtf=(gN!Z~Cm45FFH?PMlGLYoG;*5 zVN!tqI{l%L3pxh|PPj+fKX}Uk0;vuh2Y)$81O(_Cecw({&*=%yWIiblKO4U~oqJXN z-Dz(3Pgy=0v>3Cc-4(=Ue9ov6xIc6OuvQFb)g!tM~`0x?v0s-uL%~Q8`r5Xa5bx zVtx$+d;Xe^4vhFWUM}q`I)q9C&o_PP5C#*xUi5`gxva0~s9f$>FoewjFBW}y5jyBk z{|2Me*}Y(xRt(xdEqJPgV1Ic6c-mn?u%B8D-eB;45Q4o_GBt!p1$gf9a)&~kSX8E) z2i=3tado4zT-hv71VP+b3^tv{LO5(DP4Mp&q4@I-@V6E-IE?{zL$I~=@bx787Yl8& AOaK4? literal 0 HcmV?d00001 diff --git a/book/figs/state.eps b/book/figs/state.eps new file mode 100644 index 0000000..eec6614 --- /dev/null +++ b/book/figs/state.eps @@ -0,0 +1,143 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: state.eps +%%Creator: fig2dev Version 3.2 Patchlevel 3c +%%CreationDate: Thu Dec 6 11:03:45 2001 +%%For: downey@rocky.wellesley.edu (Allen B. Downey) +%%BoundingBox: 0 0 173 61 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 61 moveto 0 0 lineto 173 0 lineto 173 61 lineto closepath clip newpath +-71.0 118.0 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +%%Page: 1 1 +10 setmiterlimit + 0.06000 0.06000 sc +% +% Fig objects follow +% +% Polyline +7.500 slw +n 1200 975 m 4050 975 l 4050 1950 l 1200 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2490 1477 m 2490 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2490 1777 m 2490 1717 l 2338 1717 l 2458 1747 l 2338 1777 l cp +eoclip +n 2100 1747 m + 2475 1747 l gs col0 s gr gr + +% arrowhead +n 2338 1777 m 2458 1747 l 2338 1717 l col0 s +% Polyline +gs clippath +2490 1177 m 2490 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +/Helvetica ff 165.00 scf sf +2025 1200 m +gs 1 -1 sc (message) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 1500 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 1800 m +gs 1 -1 sc (pi) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1200 m +gs 1 -1 sc ("What's up, Doc?") col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1500 m +gs 1 -1 sc (17) col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1800 m +gs 1 -1 sc (3.14159) col0 sh gr +$F2psEnd +rs diff --git a/book/figs/state.fig b/book/figs/state.fig new file mode 100644 index 0000000..512fe95 --- /dev/null +++ b/book/figs/state.fig @@ -0,0 +1,60 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 525 750 3675 1950 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 975 3675 975 3675 1950 1650 1950 1650 975 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1747 2475 1747 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 1125 1575 1125 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 1200 0\001 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 1500 1\001 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 1800 2\001 +4 0 0 50 0 16 11 0.0000 4 120 615 2550 1200 'cheddar'\001 +4 0 0 50 0 16 11 0.0000 4 120 420 2550 1500 'edam'\001 +4 0 0 50 0 16 11 0.0000 4 150 480 2550 1800 'gouda'\001 +4 0 0 50 0 16 11 0.0000 4 120 195 1650 900 list\001 +4 2 0 50 0 16 11 0.0000 4 120 540 1125 1200 cheeses\001 +-6 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 2325 3675 2325 3675 3300 1650 3300 1650 2325 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2497 2475 2497 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 2475 1575 2475 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 3675 3675 3675 3675 4650 1650 4650 1650 3675 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 3825 1575 3825 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2850 2475 3075 +2 1 2 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2 + 2100 2797 2475 2797 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 2550 0\001 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 2850 1\001 +4 0 0 50 0 16 11 0.0000 4 120 195 1650 2250 list\001 +4 0 0 50 0 16 11 0.0000 4 120 195 1650 3600 list\001 +4 2 0 50 0 16 11 0.0000 4 120 585 1125 2550 numbers\001 +4 2 0 50 0 16 11 0.0000 4 150 420 1125 3900 empty\001 +4 0 0 50 0 16 11 0.0000 4 120 180 2550 2550 17\001 +4 0 0 50 0 16 11 0.0000 4 120 270 2550 2850 123\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2550 3150 5\001 diff --git a/book/figs/state.pdf b/book/figs/state.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d820979438e324b45bca50b69f659a8198433af8 GIT binary patch literal 6236 zcmb_gdpuNI`|mB1QQ_z+)h6XS_UvJ1%rMizATe^trBKaf55wHd#SGP{q(n(qiB!5G zm9BJg6e>kYQAZs)y^`ZrbURe)xAvfPI-lQp|2W$Rdp&DCm-Rf)ckT5&v;CMJc*M>D zH~U6s+5sF1B0v&O6wcWh_CduFib#kIDE_dAK&U`v5bPmjD^MoNmGDpo11DF=P__uC z-jf}~k{BZfB_D!&M<*wCOkK6qCa~n$z14MY^=`)GyD2O^^ZfTOoj#3(8+Ojueih%@ zN_p8e_EP7C30KgMJ36>EPa2(mp%SeUc39tim35O{zNg2;mNtIO`e~Bh9PWZ5AHDKb zXDTXR&fQ#|E@&vvD(6;Bb;gxwy|99YS2z*XQ1Y&7!HRw_;VA`1wTE^;K?LX}s0JCG_4B$%DKH!p-@MB9flZ zX+ChPEhqmLnULjDFQnhgq(O#QA7M8QNtOH%=gwm1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&%m~+-+%i@ZUW~B~pXg$7Z zo)`8gGhoWye3cKc{JEL5x%rxOio@QUkH$FLhRvWPo;qnwg=|0w-MzCXU7lC<2d^DIKZL&y-UknZ%JA!WJQ- z7&kmhHX~7u2PDo46emWDc@nCVkRouxK;4VebXW{cs_$tu5O`}lTDbZ9cv_GMI=)U3 zqX4xaq*KV18othvswd%tF$spLkRFAIcBF=i{2)T5l1Ix3h(YJkQ5wp$gQRLuUc{@^ z(GW`KPytJ|M9TLEWpFn`Fmt3v5kw3hhU4So>G4duN*xKKJRT257%+oD0~j<-f|9^= zG^J(=*iSErEVPeIsiEs-qKj1uSQZMSbOi3*sJA?nsgw}8F&3fH5{^_BhszdA#4MUb z!eG%*6c^JF@X$CMsTdbCco-_?^zIbXPr}c(0t;X-CQtzw@j;0%(TZ`kBXzo;4>UbW zr6Ia2Q;18qN2zen$-jd@z#`v1J1}F<;ROJPF9L<4G{GG-7(xbuGH3`JlwyG>i_fy> zGY}fW;v!XW`AXI<`qVR7p0!cer_gbKrvr29Kx8Y;c*K6z4xD<4ZprIo3SoZ^Q*lZ>n zl0v;OdvH;qUxJjqFct^-3WjjFpnoNwPk0EM`85nd!M((ncx3K>1w+~7%k%R+m?#fiBlN-uH3m9CHMq-z-~d@7xO8Dbu)j(LZb!)0 z5Q4pwQWd0c6G6M`4$Tv|xw&w;u53>p;=**kk8RKOWO=$VToF%(yYTNZ7LXS& V8Uj-jdIPcSc}$9xm4~k<<-addbN&DT literal 0 HcmV?d00001 diff --git a/book/figs/towers.eps b/book/figs/towers.eps new file mode 100644 index 0000000..f1fcd2a --- /dev/null +++ b/book/figs/towers.eps @@ -0,0 +1,317 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: towers.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5a +%%CreationDate: Wed May 23 14:46:36 2012 +%%BoundingBox: 0 0 657 158 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 158 moveto 0 0 lineto 657 0 lineto 657 158 lineto closepath clip newpath +-64.4 176.5 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06299 0.06299 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 50 +% Polyline +0 slj +0 slc +7.500 slw +n 1035 2520 m 1305 2520 l 1305 2790 l 1035 2790 l + cp gs col0 s gr +% Polyline +n 1305 2520 m 1575 2520 l 1575 2790 l 1305 2790 l + cp gs col0 s gr +% Polyline +n 1620 2520 m 1890 2520 l 1890 2790 l 1620 2790 l + cp gs col0 s gr +% Polyline +n 1890 2520 m 2160 2520 l 2160 2790 l 1890 2790 l + cp gs col0 s gr +% Polyline +n 2205 2520 m 2475 2520 l 2475 2790 l 2205 2790 l + cp gs col0 s gr +% Polyline +n 2475 2520 m 2745 2520 l 2745 2790 l 2475 2790 l + cp gs col0 s gr +% Polyline +n 2745 2520 m 3015 2520 l 3015 2790 l 2745 2790 l + cp gs col0 s gr +% Polyline +n 3015 2520 m 3285 2520 l 3285 2790 l 3015 2790 l + cp gs col0 s gr +% Polyline +n 3330 2520 m 3600 2520 l 3600 2790 l 3330 2790 l + cp gs col0 s gr +% Polyline +n 3600 2520 m 3870 2520 l 3870 2790 l 3600 2790 l + cp gs col0 s gr +% Polyline +n 3870 2520 m 4140 2520 l 4140 2790 l 3870 2790 l + cp gs col0 s gr +% Polyline +n 4140 2520 m 4410 2520 l 4410 2790 l 4140 2790 l + cp gs col0 s gr +% Polyline +n 4410 2520 m 4680 2520 l 4680 2790 l 4410 2790 l + cp gs col0 s gr +% Polyline +n 4680 2520 m 4950 2520 l 4950 2790 l 4680 2790 l + cp gs col0 s gr +% Polyline +n 4950 2520 m 5220 2520 l 5220 2790 l 4950 2790 l + cp gs col0 s gr +% Polyline +n 5220 2520 m 5490 2520 l 5490 2790 l 5220 2790 l + cp gs col0 s gr +% Polyline +n 6975 2520 m 7245 2520 l 7245 2790 l 6975 2790 l + cp gs col0 s gr +% Polyline +n 7245 2520 m 7515 2520 l 7515 2790 l 7245 2790 l + cp gs col0 s gr +% Polyline +n 7560 2520 m 7830 2520 l 7830 2790 l 7560 2790 l + cp gs col0 s gr +% Polyline +n 7830 2520 m 8100 2520 l 8100 2790 l 7830 2790 l + cp gs col0 s gr +% Polyline +n 8145 2520 m 8415 2520 l 8415 2790 l 8145 2790 l + cp gs col0 s gr +% Polyline +n 8415 2520 m 8685 2520 l 8685 2790 l 8415 2790 l + cp gs col0 s gr +% Polyline +n 8685 2520 m 8955 2520 l 8955 2790 l 8685 2790 l + cp gs col0 s gr +% Polyline +n 8955 2520 m 9225 2520 l 9225 2790 l 8955 2790 l + cp gs col0 s gr +% Polyline +n 9270 2520 m 9540 2520 l 9540 2790 l 9270 2790 l + cp gs col0 s gr +% Polyline +n 9540 2520 m 9810 2520 l 9810 2790 l 9540 2790 l + cp gs col0 s gr +% Polyline +n 9810 2520 m 10080 2520 l 10080 2790 l 9810 2790 l + cp gs col0 s gr +% Polyline +n 10080 2520 m 10350 2520 l 10350 2790 l 10080 2790 l + cp gs col0 s gr +% Polyline +n 10350 2520 m 10620 2520 l 10620 2790 l 10350 2790 l + cp gs col0 s gr +% Polyline +n 10620 2520 m 10890 2520 l 10890 2790 l 10620 2790 l + cp gs col0 s gr +% Polyline +n 10890 2520 m 11160 2520 l 11160 2790 l 10890 2790 l + cp gs col0 s gr +% Polyline +n 11160 2520 m 11430 2520 l 11430 2790 l 11160 2790 l + cp gs col0 s gr +% Polyline +n 1620 2205 m 1890 2205 l 1890 2475 l 1620 2475 l + cp gs col0 s gr +% Polyline +n 1620 1935 m 1890 1935 l 1890 2205 l 1620 2205 l + cp gs col0 s gr +% Polyline +n 2205 2205 m 2475 2205 l 2475 2475 l 2205 2475 l + cp gs col0 s gr +% Polyline +n 2205 1935 m 2475 1935 l 2475 2205 l 2205 2205 l + cp gs col0 s gr +% Polyline +n 2205 1665 m 2475 1665 l 2475 1935 l 2205 1935 l + cp gs col0 s gr +% Polyline +n 2205 1395 m 2475 1395 l 2475 1665 l 2205 1665 l + cp gs col0 s gr +% Polyline +n 3330 2205 m 3600 2205 l 3600 2475 l 3330 2475 l + cp gs col0 s gr +% Polyline +n 3330 1935 m 3600 1935 l 3600 2205 l 3330 2205 l + cp gs col0 s gr +% Polyline +n 3330 1665 m 3600 1665 l 3600 1935 l 3330 1935 l + cp gs col0 s gr +% Polyline +n 3330 1395 m 3600 1395 l 3600 1665 l 3330 1665 l + cp gs col0 s gr +% Polyline +n 3330 1125 m 3600 1125 l 3600 1395 l 3330 1395 l + cp gs col0 s gr +% Polyline +n 3330 855 m 3600 855 l 3600 1125 l 3330 1125 l + cp gs col0 s gr +% Polyline +n 3330 585 m 3600 585 l 3600 855 l 3330 855 l + cp gs col0 s gr +% Polyline +n 3330 315 m 3600 315 l 3600 585 l 3330 585 l + cp gs col0 s gr +% Polyline +n 9540 2205 m 9540 2475 l 9270 2475 l 9270 2205 l + cp gs col0 s gr +% Polyline +n 9810 2205 m 9810 2475 l 9540 2475 l 9540 2205 l + cp gs col0 s gr +% Polyline +n 10080 2205 m 10080 2475 l 9810 2475 l 9810 2205 l + cp gs col0 s gr +% Polyline +n 10350 2205 m 10350 2475 l 10080 2475 l 10080 2205 l + cp gs col0 s gr +% Polyline +n 10620 2205 m 10620 2475 l 10350 2475 l 10350 2205 l + cp gs col0 s gr +% Polyline +n 10890 2205 m 10890 2475 l 10620 2475 l 10620 2205 l + cp gs col0 s gr +% Polyline +n 11160 2205 m 11160 2475 l 10890 2475 l 10890 2205 l + cp gs col0 s gr +% Polyline +n 11430 2205 m 11430 2475 l 11160 2475 l 11160 2205 l + cp gs col0 s gr +% Polyline +n 8415 2205 m 8415 2475 l 8145 2475 l 8145 2205 l + cp gs col0 s gr +% Polyline +n 8685 2205 m 8685 2475 l 8415 2475 l 8415 2205 l + cp gs col0 s gr +% Polyline +n 8955 2205 m 8955 2475 l 8685 2475 l 8685 2205 l + cp gs col0 s gr +% Polyline +n 9225 2205 m 9225 2475 l 8955 2475 l 8955 2205 l + cp gs col0 s gr +% Polyline +n 7830 2205 m 7830 2475 l 7560 2475 l 7560 2205 l + cp gs col0 s gr +% Polyline +n 8100 2205 m 8100 2475 l 7830 2475 l 7830 2205 l + cp gs col0 s gr +% Polyline +gs clippath +1933 2100 m 2085 2100 l 2085 2040 l 1933 2040 l 1933 2040 l 2053 2070 l 1933 2100 l cp +eoclip +n 1800 2070 m + 2070 2070 l gs col0 s gr gr + +% arrowhead +n 1933 2100 m 2053 2070 l 1933 2040 l col0 s +% Polyline +gs clippath +3643 480 m 3795 480 l 3795 420 l 3643 420 l 3643 420 l 3763 450 l 3643 480 l cp +eoclip +n 3510 450 m + 3780 450 l gs col0 s gr gr + +% arrowhead +n 3643 480 m 3763 450 l 3643 420 l col0 s +% Polyline +gs clippath +2518 1560 m 2670 1560 l 2670 1500 l 2518 1500 l 2518 1500 l 2638 1530 l 2518 1560 l cp +eoclip +n 2385 1530 m + 2655 1530 l gs col0 s gr gr + +% arrowhead +n 2518 1560 m 2638 1530 l 2518 1500 l col0 s +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book/figs/towers.fig b/book/figs/towers.fig new file mode 100644 index 0000000..8760390 --- /dev/null +++ b/book/figs/towers.fig @@ -0,0 +1,178 @@ +#FIG 3.2 Produced by xfig version 3.2.5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 1035 2520 5490 2790 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1035 2520 1305 2520 1305 2790 1035 2790 1035 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1305 2520 1575 2520 1575 2790 1305 2790 1305 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1620 2520 1890 2520 1890 2790 1620 2790 1620 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1890 2520 2160 2520 2160 2790 1890 2790 1890 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2205 2520 2475 2520 2475 2790 2205 2790 2205 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2475 2520 2745 2520 2745 2790 2475 2790 2475 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2745 2520 3015 2520 3015 2790 2745 2790 2745 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3015 2520 3285 2520 3285 2790 3015 2790 3015 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 2520 3600 2520 3600 2790 3330 2790 3330 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3600 2520 3870 2520 3870 2790 3600 2790 3600 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3870 2520 4140 2520 4140 2790 3870 2790 3870 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4140 2520 4410 2520 4410 2790 4140 2790 4140 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4410 2520 4680 2520 4680 2790 4410 2790 4410 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4680 2520 4950 2520 4950 2790 4680 2790 4680 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4950 2520 5220 2520 5220 2790 4950 2790 4950 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 5220 2520 5490 2520 5490 2790 5220 2790 5220 2520 +-6 +6 6975 2520 11430 2790 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 6975 2520 7245 2520 7245 2790 6975 2790 6975 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7245 2520 7515 2520 7515 2790 7245 2790 7245 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7560 2520 7830 2520 7830 2790 7560 2790 7560 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7830 2520 8100 2520 8100 2790 7830 2790 7830 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8145 2520 8415 2520 8415 2790 8145 2790 8145 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8415 2520 8685 2520 8685 2790 8415 2790 8415 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8685 2520 8955 2520 8955 2790 8685 2790 8685 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8955 2520 9225 2520 9225 2790 8955 2790 8955 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 9270 2520 9540 2520 9540 2790 9270 2790 9270 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 9540 2520 9810 2520 9810 2790 9540 2790 9540 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 9810 2520 10080 2520 10080 2790 9810 2790 9810 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10080 2520 10350 2520 10350 2790 10080 2790 10080 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10350 2520 10620 2520 10620 2790 10350 2790 10350 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10620 2520 10890 2520 10890 2790 10620 2790 10620 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10890 2520 11160 2520 11160 2790 10890 2790 10890 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 11160 2520 11430 2520 11430 2790 11160 2790 11160 2520 +-6 +6 1620 1935 1890 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1620 2205 1890 2205 1890 2475 1620 2475 1620 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1620 1935 1890 1935 1890 2205 1620 2205 1620 1935 +-6 +6 2205 1395 2475 2475 +6 2205 1935 2475 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2205 2205 2475 2205 2475 2475 2205 2475 2205 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2205 1935 2475 1935 2475 2205 2205 2205 2205 1935 +-6 +6 2205 1395 2475 1935 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2205 1665 2475 1665 2475 1935 2205 1935 2205 1665 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2205 1395 2475 1395 2475 1665 2205 1665 2205 1395 +-6 +-6 +6 3330 315 3600 2475 +6 3330 1935 3600 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 2205 3600 2205 3600 2475 3330 2475 3330 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 1935 3600 1935 3600 2205 3330 2205 3330 1935 +-6 +6 3330 1395 3600 1935 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 1665 3600 1665 3600 1935 3330 1935 3330 1665 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 1395 3600 1395 3600 1665 3330 1665 3330 1395 +-6 +6 3330 855 3600 1395 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 1125 3600 1125 3600 1395 3330 1395 3330 1125 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 855 3600 855 3600 1125 3330 1125 3330 855 +-6 +6 3330 315 3600 855 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 585 3600 585 3600 855 3330 855 3330 585 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 315 3600 315 3600 585 3330 585 3330 315 +-6 +-6 +6 9270 2205 11430 2475 +6 9270 2205 9810 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 9540 2205 9540 2475 9270 2475 9270 2205 9540 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 9810 2205 9810 2475 9540 2475 9540 2205 9810 2205 +-6 +6 9810 2205 10350 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10080 2205 10080 2475 9810 2475 9810 2205 10080 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10350 2205 10350 2475 10080 2475 10080 2205 10350 2205 +-6 +6 10350 2205 10890 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10620 2205 10620 2475 10350 2475 10350 2205 10620 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10890 2205 10890 2475 10620 2475 10620 2205 10890 2205 +-6 +6 10890 2205 11430 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 11160 2205 11160 2475 10890 2475 10890 2205 11160 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 11430 2205 11430 2475 11160 2475 11160 2205 11430 2205 +-6 +-6 +6 8145 2205 9225 2475 +6 8145 2205 8685 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8415 2205 8415 2475 8145 2475 8145 2205 8415 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8685 2205 8685 2475 8415 2475 8415 2205 8685 2205 +-6 +6 8685 2205 9225 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8955 2205 8955 2475 8685 2475 8685 2205 8955 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 9225 2205 9225 2475 8955 2475 8955 2205 9225 2205 +-6 +-6 +6 7560 2205 8100 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7830 2205 7830 2475 7560 2475 7560 2205 7830 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8100 2205 8100 2475 7830 2475 7830 2205 8100 2205 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 2070 2070 2070 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3510 450 3780 450 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2385 1530 2655 1530 diff --git a/book/figs/towers.pdf b/book/figs/towers.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8e49809e5116d5f35b3125d433eaf6972205c988 GIT binary patch literal 2998 zcmb_edvH|M8J|EDat9M_&_NhFhlJ#AguC~#cc1QV9=ll*n}wZCngk-!yZ4^WUUGNu zdhgln62XB%lqi8#tYhUdLM=$g>9hz<9Y&$8sRPzJqR0r2rH+Ur&P0J!nlQBIZg%sM zDgKf3&z}9x_d4hI{l4#3g!}=DHSS1pQD{CFu1MI?|vJCo;SHp8tb(o|*Gx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NXX z0*SngT5a9>gVhH i9MAf>S|{VZy~b+evp`3JhO!UJ*?22aQBl7lK>QDd*2Zf9 literal 0 HcmV?d00001 diff --git a/book/figs/tuple1.eps b/book/figs/tuple1.eps new file mode 100644 index 0000000..7949bda --- /dev/null +++ b/book/figs/tuple1.eps @@ -0,0 +1,135 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: tuple1.fig +%%Creator: fig2dev Version 3.2 Patchlevel 4 +%%CreationDate: Tue Jul 31 12:27:49 2007 +%%For: downey@rocky.olin.edu (Allen Downey) +%%BoundingBox: 0 0 123 53 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 53 moveto 0 0 lineto 123 0 lineto 123 53 lineto closepath clip newpath +-98.3 99.7 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +7.500 slw +n 1650 975 m 3675 975 l 3675 1650 l 1650 1650 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2490 1477 m 2490 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2490 1177 m 2490 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +/Helvetica ff 165.00 scf sf +2025 1200 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 1500 m +gs 1 -1 sc (1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1200 m +gs 1 -1 sc ('Cleese') col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1500 m +gs 1 -1 sc ('John') col0 sh gr +/Helvetica ff 165.00 scf sf +1650 900 m +gs 1 -1 sc (tuple) col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage diff --git a/book/figs/tuple1.fig b/book/figs/tuple1.fig new file mode 100644 index 0000000..fad2c3d --- /dev/null +++ b/book/figs/tuple1.fig @@ -0,0 +1,22 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 975 3675 975 3675 1650 1650 1650 1650 975 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 1200 0\001 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 1500 1\001 +4 0 0 50 0 16 11 0.0000 4 120 510 2550 1200 'Cleese'\001 +4 0 0 50 0 16 11 0.0000 4 120 405 2550 1500 'John'\001 +4 0 0 50 0 16 11 0.0000 4 150 330 1650 900 tuple\001 diff --git a/book/figs/tuple1.pdf b/book/figs/tuple1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..df15839af51289cb574d63f59917acdd002e7451 GIT binary patch literal 4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zwjsc2F{ zWj1JWlnnsu0zgZMyKbzKaIdzvz+)wWiUvr*J^ez=fZoyd?iBSlNzi(|naOkue4`25 zji=ouJ?(83Jsk|jbd`XR({(aUDx!-F;d8hsk0-F!7ZX94fDP2)-*AM}NKNa-pj$U- zoc6aRG`;5-X))qza9Be547!(fU66p!=kg&n)J+r6$4UBv^xZTb>H!XMeQ5}v4+8NT zjfcERLr`$!evOao0S;QP(FDRbZ3w|(<~2SPH2&9Vh!A~)4-xX-prJg$8#YiBd4rE5 z6x#Vm88L89F@jG=5FAFNfNu` where ^ is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. singlehtml to make a single large HTML file + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. devhelp to make HTML files and a Devhelp project + echo. epub to make an epub + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. text to make text files + echo. man to make manual pages + echo. texinfo to make Texinfo files + echo. gettext to make PO message catalogs + echo. changes to make an overview over all changed/added/deprecated items + echo. xml to make Docutils-native XML files + echo. pseudoxml to make pseudoxml-XML files for display purposes + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + echo. coverage to run coverage check of the documentation if enabled + goto end +) + +if "%1" == "clean" ( + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + del /q /s %BUILDDIR%\* + goto end +) + + +REM Check if sphinx-build is available and fallback to Python version if any +%SPHINXBUILD% 2> nul +if errorlevel 9009 goto sphinx_python +goto sphinx_ok + +:sphinx_python + +set SPHINXBUILD=python -m sphinx.__init__ +%SPHINXBUILD% 2> nul +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +:sphinx_ok + + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. + goto end +) + +if "%1" == "singlehtml" ( + %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in %BUILDDIR%/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in %BUILDDIR%/qthelp, like this: + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\PensePython.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\PensePython.ghc + goto end +) + +if "%1" == "devhelp" ( + %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. + goto end +) + +if "%1" == "epub" ( + %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The epub file is in %BUILDDIR%/epub. + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "latexpdf" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + cd %BUILDDIR%/latex + make all-pdf + cd %~dp0 + echo. + echo.Build finished; the PDF files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "latexpdfja" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + cd %BUILDDIR%/latex + make all-pdf-ja + cd %~dp0 + echo. + echo.Build finished; the PDF files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "text" ( + %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The text files are in %BUILDDIR%/text. + goto end +) + +if "%1" == "man" ( + %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The manual pages are in %BUILDDIR%/man. + goto end +) + +if "%1" == "texinfo" ( + %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. + goto end +) + +if "%1" == "gettext" ( + %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The message catalogs are in %BUILDDIR%/locale. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes + if errorlevel 1 exit /b 1 + echo. + echo.The overview file is in %BUILDDIR%/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck + if errorlevel 1 exit /b 1 + echo. + echo.Link check complete; look for any errors in the above output ^ +or in %BUILDDIR%/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest + if errorlevel 1 exit /b 1 + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in %BUILDDIR%/doctest/output.txt. + goto end +) + +if "%1" == "coverage" ( + %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage + if errorlevel 1 exit /b 1 + echo. + echo.Testing of coverage in the sources finished, look at the ^ +results in %BUILDDIR%/coverage/python.txt. + goto end +) + +if "%1" == "xml" ( + %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The XML files are in %BUILDDIR%/xml. + goto end +) + +if "%1" == "pseudoxml" ( + %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. + goto end +) + +:end From a0a8d16dd3321a9c4850b42b0b2ab360cb757a94 Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Thu, 19 Nov 2015 07:34:10 -0200 Subject: [PATCH 04/28] index using split chapters --- book/00-front-matter.rst | 526 ++++++++++++++++++++++ book/01-the-way.rst | 493 +++++++++++++++++++++ book/02-statement.rst | 450 +++++++++++++++++++ book/03-function.rst | 771 ++++++++++++++++++++++++++++++++ book/04-case-ui.rst | 597 +++++++++++++++++++++++++ book/05-cond-recur.rst | 727 ++++++++++++++++++++++++++++++ book/06-fruitful-fn.rst | 746 +++++++++++++++++++++++++++++++ book/07-iteration.rst | 474 ++++++++++++++++++++ book/08-string.rst | 692 +++++++++++++++++++++++++++++ book/09-case-word.rst | 400 +++++++++++++++++ book/10-list.rst | 907 ++++++++++++++++++++++++++++++++++++++ book/11-dict.rst | 752 +++++++++++++++++++++++++++++++ book/12-tuple.rst | 685 ++++++++++++++++++++++++++++ book/13-case-struct.rst | 686 ++++++++++++++++++++++++++++ book/14-file.rst | 666 ++++++++++++++++++++++++++++ book/15-cls-object.rst | 488 ++++++++++++++++++++ book/16-cls-fn.rst | 384 ++++++++++++++++ book/17-cls-meth.rst | 653 +++++++++++++++++++++++++++ book/18-inherit.rst | 772 ++++++++++++++++++++++++++++++++ book/19-goodies.rst | 675 ++++++++++++++++++++++++++++ book/A-debug.rst | 500 +++++++++++++++++++++ book/B-analysis-alg.rst | 602 +++++++++++++++++++++++++ book/index.rst | 25 +- book/{ => latex}/book.rst | 0 tools/chapter-plan.ods | Bin 0 -> 59696 bytes 25 files changed, 13669 insertions(+), 2 deletions(-) create mode 100644 book/00-front-matter.rst create mode 100644 book/01-the-way.rst create mode 100644 book/02-statement.rst create mode 100644 book/03-function.rst create mode 100644 book/04-case-ui.rst create mode 100644 book/05-cond-recur.rst create mode 100644 book/06-fruitful-fn.rst create mode 100644 book/07-iteration.rst create mode 100644 book/08-string.rst create mode 100644 book/09-case-word.rst create mode 100644 book/10-list.rst create mode 100644 book/11-dict.rst create mode 100644 book/12-tuple.rst create mode 100644 book/13-case-struct.rst create mode 100644 book/14-file.rst create mode 100644 book/15-cls-object.rst create mode 100644 book/16-cls-fn.rst create mode 100644 book/17-cls-meth.rst create mode 100644 book/18-inherit.rst create mode 100644 book/19-goodies.rst create mode 100644 book/A-debug.rst create mode 100644 book/B-analysis-alg.rst rename book/{ => latex}/book.rst (100%) create mode 100644 tools/chapter-plan.ods diff --git a/book/00-front-matter.rst b/book/00-front-matter.rst new file mode 100644 index 0000000..64254f6 --- /dev/null +++ b/book/00-front-matter.rst @@ -0,0 +1,526 @@ +[chapter] + +| 3 Think Python +| How to Think Like a Computer Scientist + +2nd Edition, Version 2.2.14 + +| 3 Think Python +| How to Think Like a Computer Scientist + +2nd Edition, Version 2.2.14 + +Allen Downey + +Green Tea Press + +Needham, Massachusetts + +Copyright © 2015 Allen Downey. + +| Green Tea Press +| 9 Washburn Ave +| Needham MA 02492 + +Permission is granted to copy, distribute, and/or modify this document +under the terms of the Creative Commons Attribution-NonCommercial 3.0 +Unported License, which is available at +http://creativecommons.org/licenses/by-nc/3.0/. + +The original form of this book is LaTeX source code. Compiling this +LaTeX source has the effect of generating a device-independent +representation of a textbook, which can be converted to other formats +and printed. + +The LaTeX source for this book is available from +http://www.thinkpython2.com + +Think Python: How to Think Like a Computer Scientist + +Allen B. Downey + +2nd Edition, Version 2.2.14 + +Preface +======= + +The strange history of this book +-------------------------------- + +In January 1999 I was preparing to teach an introductory programming +class in Java. I had taught it three times and I was getting frustrated. +The failure rate in the class was too high and, even for students who +succeeded, the overall level of achievement was too low. + +One of the problems I saw was the books. They were too big, with too +much unnecessary detail about Java, and not enough high-level guidance +about how to program. And they all suffered from the trap door effect: +they would start out easy, proceed gradually, and then somewhere around +Chapter 5 the bottom would fall out. The students would get too much new +material, too fast, and I would spend the rest of the semester picking +up the pieces. + +Two weeks before the first day of classes, I decided to write my own +book. My goals were: + +- Keep it short. It is better for students to read 10 pages than not + read 50 pages. + +- Be careful with vocabulary. I tried to minimize jargon and define + each term at first use. + +- Build gradually. To avoid trap doors, I took the most difficult + topics and split them into a series of small steps. + +- Focus on programming, not the programming language. I included the + minimum useful subset of Java and left out the rest. + +I needed a title, so on a whim I chose *How to Think Like a Computer +Scientist*. + +My first version was rough, but it worked. Students did the reading, and +they understood enough that I could spend class time on the hard topics, +the interesting topics and (most important) letting the students +practice. + +I released the book under the GNU Free Documentation License, which +allows users to copy, modify, and distribute the book. + +What happened next is the cool part. Jeff Elkner, a high school teacher +in Virginia, adopted my book and translated it into Python. He sent me a +copy of his translation, and I had the unusual experience of learning +Python by reading my own book. As Green Tea Press, I published the first +Python version in 2001. + +In 2003 I started teaching at Olin College and I got to teach Python for +the first time. The contrast with Java was striking. Students struggled +less, learned more, worked on more interesting projects, and generally +had a lot more fun. + +Since then I’ve continued to develop the book, correcting errors, +improving some of the examples and adding material, especially +exercises. + +The result is this book, now with the less grandiose title *Think +Python*. Some of the changes are: + +- I added a section about debugging at the end of each chapter. These + sections present general techniques for finding and avoiding bugs, + and warnings about Python pitfalls. + +- I added more exercises, ranging from short tests of understanding to + a few substantial projects. Most exercises include a link to my + solution. + +- I added a series of case studies—longer examples with exercises, + solutions, and discussion. + +- I expanded the discussion of program development plans and basic + design patterns. + +- I added appendices about debugging and analysis of algorithms. + +The second edition of *Think Python* has these new features: + +- The book and all supporting code have been updated to Python 3. + +- I added a few sections, and more details on the web, to help + beginners get started running Python in a browser, so you don’t have + to deal with installing Python until you want to. + +- For Chapter [turtle] I switched from my own turtle graphics package, + called Swampy, to a more standard Python module, turtle, which is + easier to install and more powerful. + +- I added a new chapter called “The Goodies”, which introduces some + additional Python features that are not strictly necessary, but + sometimes handy. + +I hope you enjoy working with this book, and that it helps you learn to +program and think like a computer scientist, at least a little bit. + +| Allen B. Downey +| Olin College + +Acknowledgments +--------------- + +Many thanks to Jeff Elkner, who translated my Java book into Python, +which got this project started and introduced me to what has turned out +to be my favorite language. + +Thanks also to Chris Meyers, who contributed several sections to *How to +Think Like a Computer Scientist*. + +Thanks to the Free Software Foundation for developing the GNU Free +Documentation License, which helped make my collaboration with Jeff and +Chris possible, and Creative Commons for the license I am using now. + +Thanks to the editors at Lulu who worked on *How to Think Like a +Computer Scientist*. + +Thanks to the editors at O’Reilly Media who worked on *Think Python*. + +Thanks to all the students who worked with earlier versions of this book +and all the contributors (listed below) who sent in corrections and +suggestions. + +Contributor List +---------------- + +More than 100 sharp-eyed and thoughtful readers have sent in suggestions +and corrections over the past few years. Their contributions, and +enthusiasm for this project, have been a huge help. + +If you have a suggestion or correction, please send email to +feedback@thinkpython.com. If I make a change based on your feedback, I +will add you to the contributor list (unless you ask to be omitted). + +If you include at least part of the sentence the error appears in, that +makes it easy for me to search. Page and section numbers are fine, too, +but not quite as easy to work with. Thanks! + +- Lloyd Hugh Allen sent in a correction to Section 8.4. + +- Yvon Boulianne sent in a correction of a semantic error in Chapter 5. + +- Fred Bremmer submitted a correction in Section 2.1. + +- Jonah Cohen wrote the Perl scripts to convert the LaTeX source for + this book into beautiful HTML. + +- Michael Conlon sent in a grammar correction in Chapter 2 and an + improvement in style in Chapter 1, and he initiated discussion on the + technical aspects of interpreters. + +- Benoit Girard sent in a correction to a humorous mistake in Section + 5.6. + +- Courtney Gleason and Katherine Smith wrote horsebet.py, which was + used as a case study in an earlier version of the book. Their program + can now be found on the website. + +- Lee Harr submitted more corrections than we have room to list here, + and indeed he should be listed as one of the principal editors of the + text. + +- James Kaylin is a student using the text. He has submitted numerous + corrections. + +- David Kershaw fixed the broken catTwice function in Section 3.10. + +- Eddie Lam has sent in numerous corrections to Chapters 1, 2, and 3. + He also fixed the Makefile so that it creates an index the first time + it is run and helped us set up a versioning scheme. + +- Man-Yong Lee sent in a correction to the example code in Section 2.4. + +- David Mayo pointed out that the word \`\`unconsciously“ in Chapter 1 + needed to be changed to \`\`subconsciously”. + +- Chris McAloon sent in several corrections to Sections 3.9 and 3.10. + +- Matthew J. Moelter has been a long-time contributor who sent in + numerous corrections and suggestions to the book. + +- Simon Dicon Montford reported a missing function definition and + several typos in Chapter 3. He also found errors in the increment + function in Chapter 13. + +- John Ouzts corrected the definition of \`\`return value" in Chapter + 3. + +- Kevin Parks sent in valuable comments and suggestions as to how to + improve the distribution of the book. + +- David Pool sent in a typo in the glossary of Chapter 1, as well as + kind words of encouragement. + +- Michael Schmitt sent in a correction to the chapter on files and + exceptions. + +- Robin Shaw pointed out an error in Section 13.1, where the printTime + function was used in an example without being defined. + +- Paul Sleigh found an error in Chapter 7 and a bug in Jonah Cohen’s + Perl script that generates HTML from LaTeX. + +- Craig T. Snydal is testing the text in a course at Drew University. + He has contributed several valuable suggestions and corrections. + +- Ian Thomas and his students are using the text in a programming + course. They are the first ones to test the chapters in the latter + half of the book, and they have made numerous corrections and + suggestions. + +- Keith Verheyden sent in a correction in Chapter 3. + +- Peter Winstanley let us know about a longstanding error in our Latin + in Chapter 3. + +- Chris Wrobel made corrections to the code in the chapter on file I/O + and exceptions. + +- Moshe Zadka has made invaluable contributions to this project. In + addition to writing the first draft of the chapter on Dictionaries, + he provided continual guidance in the early stages of the book. + +- Christoph Zwerschke sent several corrections and pedagogic + suggestions, and explained the difference between *gleich* and + *selbe*. + +- James Mayer sent us a whole slew of spelling and typographical + errors, including two in the contributor list. + +- Hayden McAfee caught a potentially confusing inconsistency between + two examples. + +- Angel Arnal is part of an international team of translators working + on the Spanish version of the text. He has also found several errors + in the English version. + +- Tauhidul Hoque and Lex Berezhny created the illustrations in Chapter + 1 and improved many of the other illustrations. + +- Dr. Michele Alzetta caught an error in Chapter 8 and sent some + interesting pedagogic comments and suggestions about Fibonacci and + Old Maid. + +- Andy Mitchell caught a typo in Chapter 1 and a broken example in + Chapter 2. + +- Kalin Harvey suggested a clarification in Chapter 7 and caught some + typos. + +- Christopher P. Smith caught several typos and helped us update the + book for Python 2.2. + +- David Hutchins caught a typo in the Foreword. + +- Gregor Lingl is teaching Python at a high school in Vienna, Austria. + He is working on a German translation of the book, and he caught a + couple of bad errors in Chapter 5. + +- Julie Peters caught a typo in the Preface. + +- Florin Oprina sent in an improvement in makeTime, a correction in + printTime, and a nice typo. + +- D. J. Webre suggested a clarification in Chapter 3. + +- Ken found a fistful of errors in Chapters 8, 9 and 11. + +- Ivo Wever caught a typo in Chapter 5 and suggested a clarification in + Chapter 3. + +- Curtis Yanko suggested a clarification in Chapter 2. + +- Ben Logan sent in a number of typos and problems with translating the + book into HTML. + +- Jason Armstrong saw the missing word in Chapter 2. + +- Louis Cordier noticed a spot in Chapter 16 where the code didn’t + match the text. + +- Brian Cain suggested several clarifications in Chapters 2 and 3. + +- Rob Black sent in a passel of corrections, including some changes for + Python 2.2. + +- Jean-Philippe Rey at Ecole Centrale Paris sent a number of patches, + including some updates for Python 2.2 and other thoughtful + improvements. + +- Jason Mader at George Washington University made a number of useful + suggestions and corrections. + +- Jan Gundtofte-Bruun reminded us that “a error” is an error. + +- Abel David and Alexis Dinno reminded us that the plural of “matrix” + is “matrices”, not “matrixes”. This error was in the book for years, + but two readers with the same initials reported it on the same day. + Weird. + +- Charles Thayer encouraged us to get rid of the semi-colons we had put + at the ends of some statements and to clean up our use of “argument” + and “parameter”. + +- Roger Sperberg pointed out a twisted piece of logic in Chapter 3. + +- Sam Bull pointed out a confusing paragraph in Chapter 2. + +- Andrew Cheung pointed out two instances of “use before def”. + +- C. Corey Capel spotted the missing word in the Third Theorem of + Debugging and a typo in Chapter 4. + +- Alessandra helped clear up some Turtle confusion. + +- Wim Champagne found a brain-o in a dictionary example. + +- Douglas Wright pointed out a problem with floor division in arc. + +- Jared Spindor found some jetsam at the end of a sentence. + +- Lin Peiheng sent a number of very helpful suggestions. + +- Ray Hagtvedt sent in two errors and a not-quite-error. + +- Torsten Hübsch pointed out an inconsistency in Swampy. + +- Inga Petuhhov corrected an example in Chapter 14. + +- Arne Babenhauserheide sent several helpful corrections. + +- Mark E. Casida is is good at spotting repeated words. + +- Scott Tyler filled in a that was missing. And then sent in a heap of + corrections. + +- Gordon Shephard sent in several corrections, all in separate emails. + +- Andrew Turner spotted an error in Chapter 8. + +- Adam Hobart fixed a problem with floor division in arc. + +- Daryl Hammond and Sarah Zimmerman pointed out that I served up + math.pi too early. And Zim spotted a typo. + +- George Sass found a bug in a Debugging section. + +- Brian Bingham suggested Exercise [exrotatepairs]. + +- Leah Engelbert-Fenton pointed out that I used tuple as a variable + name, contrary to my own advice. And then found a bunch of typos and + a “use before def”. + +- Joe Funke spotted a typo. + +- Chao-chao Chen found an inconsistency in the Fibonacci example. + +- Jeff Paine knows the difference between space and spam. + +- Lubos Pintes sent in a typo. + +- Gregg Lind and Abigail Heithoff suggested Exercise [checksum]. + +- Max Hailperin has sent in a number of corrections and suggestions. + Max is one of the authors of the extraordinary *Concrete + Abstractions*, which you might want to read when you are done with + this book. + +- Chotipat Pornavalai found an error in an error message. + +- Stanislaw Antol sent a list of very helpful suggestions. + +- Eric Pashman sent a number of corrections for Chapters 4–11. + +- Miguel Azevedo found some typos. + +- Jianhua Liu sent in a long list of corrections. + +- Nick King found a missing word. + +- Martin Zuther sent a long list of suggestions. + +- Adam Zimmerman found an inconsistency in my instance of an “instance” + and several other errors. + +- Ratnakar Tiwari suggested a footnote explaining degenerate triangles. + +- Anurag Goel suggested another solution for ``is_abecedarian`` and + sent some additional corrections. And he knows how to spell Jane + Austen. + +- Kelli Kratzer spotted one of the typos. + +- Mark Griffiths pointed out a confusing example in Chapter 3. + +- Roydan Ongie found an error in my Newton’s method. + +- Patryk Wolowiec helped me with a problem in the HTML version. + +- Mark Chonofsky told me about a new keyword in Python 3. + +- Russell Coleman helped me with my geometry. + +- Wei Huang spotted several typographical errors. + +- Karen Barber spotted the the oldest typo in the book. + +- Nam Nguyen found a typo and pointed out that I used the Decorator + pattern but didn’t mention it by name. + +- Stéphane Morin sent in several corrections and suggestions. + +- Paul Stoop corrected a typo in ``uses_only``. + +- Eric Bronner pointed out a confusion in the discussion of the order + of operations. + +- Alexandros Gezerlis set a new standard for the number and quality of + suggestions he submitted. We are deeply grateful! + +- Gray Thomas knows his right from his left. + +- Giovanni Escobar Sosa sent a long list of corrections and + suggestions. + +- Alix Etienne fixed one of the URLs. + +- Kuang He found a typo. + +- Daniel Neilson corrected an error about the order of operations. + +- Will McGinnis pointed out that polyline was defined differently in + two places. + +- Swarup Sahoo spotted a missing semi-colon. + +- Frank Hecker pointed out an exercise that was under-specified, and + some broken links. + +- Animesh B helped me clean up a confusing example. + +- Martin Caspersen found two round-off errors. + +- Gregor Ulm sent several corrections and suggestions. + +- Dimitrios Tsirigkas suggested I clarify an exercise. + +- Carlos Tafur sent a page of corrections and suggestions. + +- Martin Nordsletten found a bug in an exercise solution. + +- Lars O.D. Christensen found a broken reference. + +- Victor Simeone found a typo. + +- Sven Hoexter pointed out that a variable named input shadows a + build-in function. + +- Viet Le found a typo. + +- Stephen Gregory pointed out the problem with cmp in Python 3. + +- Matthew Shultz let me know about a broken link. + +- Lokesh Kumar Makani let me know about some broken links and some + changes in error messages. + +- Ishwar Bhat corrected my statement of Fermat’s last theorem. + +- Brian McGhie suggested a clarification. + +- Andrea Zanella translated the book into Italian, and sent a number of + corrections along the way. + +- Many, many thanks to Melissa Lewis and Luciano Ramalho for excellent + comments and suggestions on the second edition. + +- Thanks to Harry Percival from PythonAnywhere for his help getting + people started running Python in a browser. + +- Xavier Van Aubel made several useful corrections in the second + edition. diff --git a/book/01-the-way.rst b/book/01-the-way.rst new file mode 100644 index 0000000..a70bbd0 --- /dev/null +++ b/book/01-the-way.rst @@ -0,0 +1,493 @@ +The way of the program +====================== + +The goal of this book is to teach you to think like a computer +scientist. This way of thinking combines some of the best features of +mathematics, engineering, and natural science. Like mathematicians, +computer scientists use formal languages to denote ideas (specifically +computations). Like engineers, they design things, assembling components +into systems and evaluating tradeoffs among alternatives. Like +scientists, they observe the behavior of complex systems, form +hypotheses, and test predictions. + +The single most important skill for a computer scientist is **problem +solving**. Problem solving means the ability to formulate problems, +think creatively about solutions, and express a solution clearly and +accurately. As it turns out, the process of learning to program is an +excellent opportunity to practice problem-solving skills. That’s why +this chapter is called, “The way of the program”. + +On one level, you will be learning to program, a useful skill by itself. +On another level, you will use programming as a means to an end. As we +go along, that end will become clearer. + +What is a program? +------------------ + +A **program** is a sequence of instructions that specifies how to +perform a computation. The computation might be something mathematical, +such as solving a system of equations or finding the roots of a +polynomial, but it can also be a symbolic computation, such as searching +and replacing text in a document or something graphical, like processing +an image or playing a video. + +The details look different in different languages, but a few basic +instructions appear in just about every language: + +input: + Get data from the keyboard, a file, the network, or some other + device. + +output: + Display data on the screen, save it in a file, send it over the + network, etc. + +math: + Perform basic mathematical operations like addition and + multiplication. + +conditional execution: + Check for certain conditions and run the appropriate code. + +repetition: + Perform some action repeatedly, usually with some variation. + +Believe it or not, that’s pretty much all there is to it. Every program +you’ve ever used, no matter how complicated, is made up of instructions +that look pretty much like these. So you can think of programming as the +process of breaking a large, complex task into smaller and smaller +subtasks until the subtasks are simple enough to be performed with one +of these basic instructions. + +Running Python +-------------- + +One of the challenges of getting started with Python is that you might +have to install Python and related software on your computer. If you are +familiar with your operating system, and especially if you are +comfortable with the command-line interface, you will have no trouble +installing Python. But for beginners, it can be painful to learn about +system administration and programming at the same time. + +To avoid that problem, I recommend that you start out running Python in +a browser. Later, when you are comfortable with Python, I’ll make +suggestions for installing Python on your computer. + +There are a number of web pages you can use to run Python. If you +already have a favorite, go ahead and use it. Otherwise I recommend +PythonAnywhere. I provide detailed instructions for getting started at +http://tinyurl.com/thinkpython2e. + +There are two versions of Python, called Python 2 and Python 3. They are +very similar, so if you learn one, it is easy to switch to the other. In +fact, there are only a few differences you will encounter as a beginner. +This book is written for Python 3, but I include some notes about Python +2. + +The Python **interpreter** is a program that reads and executes Python +code. Depending on your environment, you might start the interpreter by +clicking on an icon, or by typing python on a command line. When it +starts, you should see output like this: + +:: + + Python 3.4.0 (default, Jun 19 2015, 14:20:21) + [GCC 4.8.2] on linux + Type "help", "copyright", "credits" or "license" for more information. + >>> + +The first three lines contain information about the interpreter and the +operating system it’s running on, so it might be different for you. But +you should check that the version number, which is 3.4.0 in this +example, begins with 3, which indicates that you are running Python 3. +If it begins with 2, you are running (you guessed it) Python 2. + +The last line is a **prompt** that indicates that the interpreter is +ready for you to enter code. If you type a line of code and hit Enter, +the interpreter displays the result: + +:: + + >>> 1 + 1 + 2 + +Now you’re ready to get started. From here on, I assume that you know +how to start the Python interpreter and run code. + +The first program +----------------- + +Traditionally, the first program you write in a new language is called +“Hello, World!” because all it does is display the words “Hello, +World!”. In Python, it looks like this: + +:: + + >>> print('Hello, World!') + +This is an example of a **print statement**, although it doesn’t +actually print anything on paper. It displays a result on the screen. In +this case, the result is the words + +:: + + Hello, World! + +The quotation marks in the program mark the beginning and end of the +text to be displayed; they don’t appear in the result. + +The parentheses indicate that print is a function. We’ll get to +functions in Chapter [funcchap]. + +In Python 2, the print statement is slightly different; it is not a +function, so it doesn’t use parentheses. + +:: + + >>> print 'Hello, World!' + +This distinction will make more sense soon, but that’s enough to get +started. + +Arithmetic operators +-------------------- + +After “Hello, World”, the next step is arithmetic. Python provides +**operators**, which are special symbols that represent computations +like addition and multiplication. + +The operators +, -, and perform addition, subtraction, and +multiplication, as in the following examples: + +:: + + >>> 40 + 2 + 42 + >>> 43 - 1 + 42 + >>> 6 * 7 + 42 + +The operator / performs division: + +:: + + >>> 84 / 2 + 42.0 + +You might wonder why the result is 42.0 instead of 42. I’ll explain in +the next section. + +Finally, the operator \* performs exponentiation; that is, it raises a +number to a power: + +:: + + >>> 6**2 + 6 + 42 + +In some other languages, ``^`` is used for exponentiation, but in Python +it is a bitwise operator called XOR. If you are not familiar with +bitwise operators, the result will surprise you: + +:: + + >>> 6 ^ 2 + 4 + +I won’t cover bitwise operators in this book, but you can read about +them at http://wiki.python.org/moin/BitwiseOperators. + +Values and types +---------------- + +A **value** is one of the basic things a program works with, like a +letter or a number. Some values we have seen so far are 2, 42.0, and +``'Hello, World!'``. + +These values belong to different **types**: 2 is an **integer**, 42.0 is +a **floating-point number**, and ``'Hello, World!'`` is a **string**, +so-called because the letters it contains are strung together. + +If you are not sure what type a value has, the interpreter can tell you: + +:: + + >>> type(2) + + >>> type(42.0) + + >>> type('Hello, World!') + + +In these results, the word “class” is used in the sense of a category; a +type is a category of values. + +Not surprisingly, integers belong to the type int, strings belong to str +and floating-point numbers belong to float. + +What about values like ``'2'`` and ``'42.0'``? They look like numbers, +but they are in quotation marks like strings. + +:: + + >>> type('2') + + >>> type('42.0') + + +They’re strings. + +When you type a large integer, you might be tempted to use commas +between groups of digits, as in 1,000,000. This is not a legal *integer* +in Python, but it is legal: + +:: + + >>> 1,000,000 + (1, 0, 0) + +That’s not what we expected at all! Python interprets 1,000,000 as a +comma-separated sequence of integers. We’ll learn more about this kind +of sequence later. + +Formal and natural languages +---------------------------- + +**Natural languages** are the languages people speak, such as English, +Spanish, and French. They were not designed by people (although people +try to impose some order on them); they evolved naturally. + +**Formal languages** are languages that are designed by people for +specific applications. For example, the notation that mathematicians use +is a formal language that is particularly good at denoting relationships +among numbers and symbols. Chemists use a formal language to represent +the chemical structure of molecules. And most importantly: + + **Programming languages are formal languages that have been designed + to express computations.** + +Formal languages tend to have strict **syntax** rules that govern the +structure of statements. For example, in mathematics the statement +:math:`3 + 3 = 6` has correct syntax, but :math:`3 + = 3 \$ 6` does not. +In chemistry :math:`H_2O` is a syntactically correct formula, but +:math:`_2Zz` is not. + +Syntax rules come in two flavors, pertaining to **tokens** and +structure. Tokens are the basic elements of the language, such as words, +numbers, and chemical elements. One of the problems with +:math:`3 += 3 \$ 6` is that :math:` \$ ` is not a legal token in +mathematics (at least as far as I know). Similarly, :math:`_2Zz` is not +legal because there is no element with the abbreviation :math:`Zz`. + +The second type of syntax rule pertains to the way tokens are combined. +The equation :math:`3 += 3` is illegal because even though :math:`+` and +:math:`=` are legal tokens, you can’t have one right after the other. +Similarly, in a chemical formula the subscript comes after the element +name, not before. + +This is @ well-structured Engli$h sentence with invalid t\*kens in it. +This sentence all valid tokens has, but invalid structure with. + +When you read a sentence in English or a statement in a formal language, +you have to figure out the structure (although in a natural language you +do this subconsciously). This process is called **parsing**. + +Although formal and natural languages have many features in +common—tokens, structure, and syntax—there are some differences: + +ambiguity: + Natural languages are full of ambiguity, which people deal with by + using contextual clues and other information. Formal languages are + designed to be nearly or completely unambiguous, which means that + any statement has exactly one meaning, regardless of context. + +redundancy: + In order to make up for ambiguity and reduce misunderstandings, + natural languages employ lots of redundancy. As a result, they are + often verbose. Formal languages are less redundant and more concise. + +literalness: + Natural languages are full of idiom and metaphor. If I say, “The + penny dropped”, there is probably no penny and nothing dropping + (this idiom means that someone understood something after a period + of confusion). Formal languages mean exactly what they say. + +Because we all grow up speaking natural languages, it is sometimes hard +to adjust to formal languages. The difference between formal and natural +language is like the difference between poetry and prose, but more so: + +Poetry: + Words are used for their sounds as well as for their meaning, and + the whole poem together creates an effect or emotional response. + Ambiguity is not only common but often deliberate. + +Prose: + The literal meaning of words is more important, and the structure + contributes more meaning. Prose is more amenable to analysis than + poetry but still often ambiguous. + +Programs: + The meaning of a computer program is unambiguous and literal, and + can be understood entirely by analysis of the tokens and structure. + +Formal languages are more dense than natural languages, so it takes +longer to read them. Also, the structure is important, so it is not +always best to read from top to bottom, left to right. Instead, learn to +parse the program in your head, identifying the tokens and interpreting +the structure. Finally, the details matter. Small errors in spelling and +punctuation, which you can get away with in natural languages, can make +a big difference in a formal language. + +Debugging +--------- + +Programmers make mistakes. For whimsical reasons, programming errors are +called **bugs** and the process of tracking them down is called +**debugging**. + +Programming, and especially debugging, sometimes brings out strong +emotions. If you are struggling with a difficult bug, you might feel +angry, despondent, or embarrassed. + +There is evidence that people naturally respond to computers as if they +were people. When they work well, we think of them as teammates, and +when they are obstinate or rude, we respond to them the same way we +respond to rude, obstinate people (Reeves and Nass, *The Media Equation: +How People Treat Computers, Television, and New Media Like Real People +and Places*). + +Preparing for these reactions might help you deal with them. One +approach is to think of the computer as an employee with certain +strengths, like speed and precision, and particular weaknesses, like +lack of empathy and inability to grasp the big picture. + +Your job is to be a good manager: find ways to take advantage of the +strengths and mitigate the weaknesses. And find ways to use your +emotions to engage with the problem, without letting your reactions +interfere with your ability to work effectively. + +Learning to debug can be frustrating, but it is a valuable skill that is +useful for many activities beyond programming. At the end of each +chapter there is a section, like this one, with my suggestions for +debugging. I hope they help! + +Glossary +-------- + +problem solving: + The process of formulating a problem, finding a solution, and + expressing it. + +high-level language: + A programming language like Python that is designed to be easy for + humans to read and write. + +low-level language: + A programming language that is designed to be easy for a computer to + run; also called “machine language” or “assembly language”. + +portability: + A property of a program that can run on more than one kind of + computer. + +interpreter: + A program that reads another program and executes it + +prompt: + Characters displayed by the interpreter to indicate that it is ready + to take input from the user. + +program: + A set of instructions that specifies a computation. + +print statement: + An instruction that causes the Python interpreter to display a value + on the screen. + +operator: + A special symbol that represents a simple computation like addition, + multiplication, or string concatenation. + +value: + One of the basic units of data, like a number or string, that a + program manipulates. + +type: + A category of values. The types we have seen so far are integers + (type int), floating-point numbers (type float), and strings (type + str). + +integer: + A type that represents whole numbers. + +floating-point: + A type that represents numbers with fractional parts. + +string: + A type that represents sequences of characters. + +natural language: + Any one of the languages that people speak that evolved naturally. + +formal language: + Any one of the languages that people have designed for specific + purposes, such as representing mathematical ideas or computer + programs; all programming languages are formal languages. + +token: + One of the basic elements of the syntactic structure of a program, + analogous to a word in a natural language. + +syntax: + The rules that govern the structure of a program. + +parse: + To examine a program and analyze the syntactic structure. + +bug: + An error in a program. + +debugging: + The process of finding and correcting bugs. + +Exercises +--------- + +It is a good idea to read this book in front of a computer so you can +try out the examples as you go. + +Whenever you are experimenting with a new feature, you should try to +make mistakes. For example, in the “Hello, world!” program, what happens +if you leave out one of the quotation marks? What if you leave out both? +What if you spell print wrong? + +This kind of experiment helps you remember what you read; it also helps +when you are programming, because you get to know what the error +messages mean. It is better to make mistakes now and on purpose than +later and accidentally. + +#. In a print statement, what happens if you leave out one of the + parentheses, or both? + +#. If you are trying to print a string, what happens if you leave out + one of the quotation marks, or both? + +#. You can use a minus sign to make a negative number like -2. What + happens if you put a plus sign before a number? What about 2++2? + +#. In math notation, leading zeros are ok, as in 02. What happens if you + try this in Python? + +#. What happens if you have two values with no operator between them? + +Start the Python interpreter and use it as a calculator. + +#. How many seconds are there in 42 minutes 42 seconds? + +#. How many miles are there in 10 kilometers? Hint: there are 1.61 + kilometers in a mile. + +#. If you run a 10 kilometer race in 42 minutes 42 seconds, what is your + average pace (time per mile in minutes and seconds)? What is your + average speed in miles per hour? diff --git a/book/02-statement.rst b/book/02-statement.rst new file mode 100644 index 0000000..83b8603 --- /dev/null +++ b/book/02-statement.rst @@ -0,0 +1,450 @@ +Variables, expressions and statements +===================================== + +One of the most powerful features of a programming language is the +ability to manipulate **variables**. A variable is a name that refers to +a value. + +Assignment statements +--------------------- + +An **assignment statement** creates a new variable and gives it a value: + +:: + + >>> message = 'And now for something completely different' + >>> n = 17 + >>> pi = 3.141592653589793 + +This example makes three assignments. The first assigns a string to a +new variable named message; the second gives the integer 17 to n; the +third assigns the (approximate) value of :math:`\pi` to pi. + +A common way to represent variables on paper is to write the name with +an arrow pointing to its value. This kind of figure is called a **state +diagram** because it shows what state each of the variables is in (think +of it as the variable’s state of mind). Figure [fig.state2] shows the +result of the previous example. + +.. figure:: figs/state2.pdf + :alt: State diagram. + + State diagram. + +Variable names +-------------- + +Programmers generally choose names for their variables that are +meaningful—they document what the variable is used for. + +Variable names can be as long as you like. They can contain both letters +and numbers, but they can’t begin with a number. It is legal to use +uppercase letters, but it is conventional to use only lower case for +variables names. + +The underscore character, ``_``, can appear in a name. It is often used +in names with multiple words, such as ``your_name`` or +``airspeed_of_unladen_swallow``. + +If you give a variable an illegal name, you get a syntax error: + +:: + + >>> 76trombones = 'big parade' + SyntaxError: invalid syntax + >>> more@ = 1000000 + SyntaxError: invalid syntax + >>> class = 'Advanced Theoretical Zymurgy' + SyntaxError: invalid syntax + +76trombones is illegal because it begins with a number. more@ is illegal +because it contains an illegal character, @. But what’s wrong with +class? + +It turns out that class is one of Python’s **keywords**. The interpreter +uses keywords to recognize the structure of the program, and they cannot +be used as variable names. + +Python 3 has these keywords: + +:: + + False class finally is return + None continue for lambda try + True def from nonlocal while + and del global not with + as elif if or yield + assert else import pass + break except in raise + +You don’t have to memorize this list. In most development environments, +keywords are displayed in a different color; if you try to use one as a +variable name, you’ll know. + +Expressions and statements +-------------------------- + +An **expression** is a combination of values, variables, and operators. +A value all by itself is considered an expression, and so is a variable, +so the following are all legal expressions: + +:: + + >>> 42 + 42 + >>> n + 17 + >>> n + 25 + 42 + +When you type an expression at the prompt, the interpreter **evaluates** +it, which means that it finds the value of the expression. In this +example, n has the value 17 and n + 25 has the value 42. + +A **statement** is a unit of code that has an effect, like creating a +variable or displaying a value. + +:: + + >>> n = 17 + >>> print(n) + +The first line is an assignment statement that gives a value to n. The +second line is a print statement that displays the value of n. + +When you type a statement, the interpreter **executes** it, which means +that it does whatever the statement says. In general, statements don’t +have values. + +Script mode +----------- + +So far we have run Python in **interactive mode**, which means that you +interact directly with the interpreter. Interactive mode is a good way +to get started, but if you are working with more than a few lines of +code, it can be clumsy. + +The alternative is to save code in a file called a **script** and then +run the interpreter in **script mode** to execute the script. By +convention, Python scripts have names that end with .py. + +If you know how to create and run a script on your computer, you are +ready to go. Otherwise I recommend using PythonAnywhere again. I have +posted instructions for running in script mode at +http://tinyurl.com/thinkpython2e. + +Because Python provides both modes, you can test bits of code in +interactive mode before you put them in a script. But there are +differences between interactive mode and script mode that can be +confusing. + +For example, if you are using Python as a calculator, you might type + +:: + + >>> miles = 26.2 + >>> miles * 1.61 + 42.182 + +The first line assigns a value to miles, but it has no visible effect. +The second line is an expression, so the interpreter evaluates it and +displays the result. It turns out that a marathon is about 42 +kilometers. + +But if you type the same code into a script and run it, you get no +output at all. In script mode an expression, all by itself, has no +visible effect. Python actually evaluates the expression, but it doesn’t +display the value unless you tell it to: + +:: + + miles = 26.2 + print(miles * 1.61) + +This behavior can be confusing at first. + +A script usually contains a sequence of statements. If there is more +than one statement, the results appear one at a time as the statements +execute. + +For example, the script + +:: + + print(1) + x = 2 + print(x) + +produces the output + +:: + + 1 + 2 + +The assignment statement produces no output. + +To check your understanding, type the following statements in the Python +interpreter and see what they do: + +:: + + 5 + x = 5 + x + 1 + +Now put the same statements in a script and run it. What is the output? +Modify the script by transforming each expression into a print statement +and then run it again. + +Order of operations +------------------- + +When an expression contains more than one operator, the order of +evaluation depends on the **order of operations**. For mathematical +operators, Python follows mathematical convention. The acronym +**PEMDAS** is a useful way to remember the rules: + +- **P**\ arentheses have the highest precedence and can be used to + force an expression to evaluate in the order you want. Since + expressions in parentheses are evaluated first, 2 \* (3-1) is 4, and + (1+1)\*\*(5-2) is 8. You can also use parentheses to make an + expression easier to read, as in (minute \* 100) / 60, even if it + doesn’t change the result. + +- **E**\ xponentiation has the next highest precedence, so 1 + 2\*\*3 + is 9, not 27, and 2 \* 3\*\*2 is 18, not 36. + +- **M**\ ultiplication and **D**\ ivision have higher precedence than + **A**\ ddition and **S**\ ubtraction. So 2\*3-1 is 5, not 4, and + 6+4/2 is 8, not 5. + +- Operators with the same precedence are evaluated from left to right + (except exponentiation). So in the expression degrees / 2 \* pi, the + division happens first and the result is multiplied by pi. To divide + by :math:`2 \pi`, you can use parentheses or write degrees / 2 / pi. + +I don’t work very hard to remember the precedence of operators. If I +can’t tell by looking at the expression, I use parentheses to make it +obvious. + +String operations +----------------- + +In general, you can’t perform mathematical operations on strings, even +if the strings look like numbers, so the following are illegal: + +:: + + '2'-'1' 'eggs'/'easy' 'third'*'a charm' + +But there are two exceptions, + and . + +The + operator performs **string concatenation**, which means it joins +the strings by linking them end-to-end. For example: + +:: + + >>> first = 'throat' + >>> second = 'warbler' + >>> first + second + throatwarbler + +The operator also works on strings; it performs repetition. For example, +``'Spam'*3`` is ``'SpamSpamSpam'``. If one of the values is a string, +the other has to be an integer. + +This use of + and makes sense by analogy with addition and +multiplication. Just as 4\*3 is equivalent to 4+4+4, we expect +``'Spam'*3`` to be the same as ``'Spam'+'Spam'+'Spam'``, and it is. On +the other hand, there is a significant way in which string concatenation +and repetition are different from integer addition and multiplication. +Can you think of a property that addition has that string concatenation +does not? + +Comments +-------- + +As programs get bigger and more complicated, they get more difficult to +read. Formal languages are dense, and it is often difficult to look at a +piece of code and figure out what it is doing, or why. + +For this reason, it is a good idea to add notes to your programs to +explain in natural language what the program is doing. These notes are +called **comments**, and they start with the ``#`` symbol: + +:: + + # compute the percentage of the hour that has elapsed + percentage = (minute * 100) / 60 + +In this case, the comment appears on a line by itself. You can also put +comments at the end of a line: + +:: + + percentage = (minute * 100) / 60 # percentage of an hour + +Everything from the # to the end of the line is ignored—it has no effect +on the execution of the program. + +Comments are most useful when they document non-obvious features of the +code. It is reasonable to assume that the reader can figure out *what* +the code does; it is more useful to explain *why*. + +This comment is redundant with the code and useless: + +:: + + v = 5 # assign 5 to v + +This comment contains useful information that is not in the code: + +:: + + v = 5 # velocity in meters/second. + +Good variable names can reduce the need for comments, but long names can +make complex expressions hard to read, so there is a tradeoff. + +Debugging +--------- + +Three kinds of errors can occur in a program: syntax errors, runtime +errors, and semantic errors. It is useful to distinguish between them in +order to track them down more quickly. + +Syntax error: + “Syntax” refers to the structure of a program and the rules about + that structure. For example, parentheses have to come in matching + pairs, so (1 + 2) is legal, but 8) is a **syntax error**. + + If there is a syntax error anywhere in your program, Python displays + an error message and quits, and you will not be able to run the + program. During the first few weeks of your programming career, you + might spend a lot of time tracking down syntax errors. As you gain + experience, you will make fewer errors and find them faster. + +Runtime error: + The second type of error is a runtime error, so called because the + error does not appear until after the program has started running. + These errors are also called **exceptions** because they usually + indicate that something exceptional (and bad) has happened. + + Runtime errors are rare in the simple programs you will see in the + first few chapters, so it might be a while before you encounter one. + +Semantic error: + The third type of error is “semantic”, which means related to + meaning. If there is a semantic error in your program, it will run + without generating error messages, but it will not do the right + thing. It will do something else. Specifically, it will do what you + told it to do. + + Identifying semantic errors can be tricky because it requires you to + work backward by looking at the output of the program and trying to + figure out what it is doing. + +Glossary +-------- + +variable: + A name that refers to a value. + +assignment: + A statement that assigns a value to a variable. + +state diagram: + A graphical representation of a set of variables and the values they + refer to. + +keyword: + A reserved word that is used to parse a program; you cannot use + keywords like if, def, and while as variable names. + +operand: + One of the values on which an operator operates. + +expression: + A combination of variables, operators, and values that represents a + single result. + +evaluate: + To simplify an expression by performing the operations in order to + yield a single value. + +statement: + A section of code that represents a command or action. So far, the + statements we have seen are assignments and print statements. + +execute: + To run a statement and do what it says. + +interactive mode: + A way of using the Python interpreter by typing code at the prompt. + +script mode: + A way of using the Python interpreter to read code from a script and + run it. + +script: + A program stored in a file. + +order of operations: + Rules governing the order in which expressions involving multiple + operators and operands are evaluated. + +concatenate: + To join two operands end-to-end. + +comment: + Information in a program that is meant for other programmers (or + anyone reading the source code) and has no effect on the execution + of the program. + +syntax error: + An error in a program that makes it impossible to parse (and + therefore impossible to interpret). + +exception: + An error that is detected while the program is running. + +semantics: + The meaning of a program. + +semantic error: + An error in a program that makes it do something other than what the + programmer intended. + +Exercises +--------- + +Repeating my advice from the previous chapter, whenever you learn a new +feature, you should try it out in interactive mode and make errors on +purpose to see what goes wrong. + +- We’ve seen that n = 42 is legal. What about 42 = n? + +- How about x = y = 1? + +- In some languages every statement ends with a semi-colon, ;. What + happens if you put a semi-colon at the end of a Python statement? + +- What if you put a period at the end of a statement? + +- In math notation you can multiply :math:`x` and :math:`y` like this: + :math:`x y`. What happens if you try that in Python? + +Practice using the Python interpreter as a calculator: + +#. The volume of a sphere with radius :math:`r` is + :math:`\frac{4}{3} \pi r^3`. What is the volume of a sphere with + radius 5? + +#. Suppose the cover price of a book is $24.95, but bookstores get a 40% + discount. Shipping costs $3 for the first copy and 75 cents for each + additional copy. What is the total wholesale cost for 60 copies? + +#. If I leave my house at 6:52 am and run 1 mile at an easy pace (8:15 + per mile), then 3 miles at tempo (7:12 per mile) and 1 mile at easy + pace again, what time do I get home for breakfast? diff --git a/book/03-function.rst b/book/03-function.rst new file mode 100644 index 0000000..f2f6bd5 --- /dev/null +++ b/book/03-function.rst @@ -0,0 +1,771 @@ +Functions +========= + +In the context of programming, a **function** is a named sequence of +statements that performs a computation. When you define a function, you +specify the name and the sequence of statements. Later, you can “call” +the function by name. + +Function calls +-------------- + +We have already seen one example of a **function call**: + +:: + + >>> type(42) + + +The name of the function is type. The expression in parentheses is +called the **argument** of the function. The result, for this function, +is the type of the argument. + +It is common to say that a function “takes” an argument and “returns” a +result. The result is also called the **return value**. + +Python provides functions that convert values from one type to another. +The int function takes any value and converts it to an integer, if it +can, or complains otherwise: + +:: + + >>> int('32') + 32 + >>> int('Hello') + ValueError: invalid literal for int(): Hello + +int can convert floating-point values to integers, but it doesn’t round +off; it chops off the fraction part: + +:: + + >>> int(3.99999) + 3 + >>> int(-2.3) + -2 + +float converts integers and strings to floating-point numbers: + +:: + + >>> float(32) + 32.0 + >>> float('3.14159') + 3.14159 + +Finally, str converts its argument to a string: + +:: + + >>> str(32) + '32' + >>> str(3.14159) + '3.14159' + +Math functions +-------------- + +Python has a math module that provides most of the familiar mathematical +functions. A **module** is a file that contains a collection of related +functions. + +Before we can use the functions in a module, we have to import it with +an **import statement**: + +:: + + >>> import math + +This statement creates a **module object** named math. If you display +the module object, you get some information about it: + +:: + + >>> math + + +The module object contains the functions and variables defined in the +module. To access one of the functions, you have to specify the name of +the module and the name of the function, separated by a dot (also known +as a period). This format is called **dot notation**. + +:: + + >>> ratio = signal_power / noise_power + >>> decibels = 10 * math.log10(ratio) + + >>> radians = 0.7 + >>> height = math.sin(radians) + +The first example uses ``math.log10`` to compute a signal-to-noise ratio +in decibels (assuming that ``signal_power`` and ``noise_power`` are +defined). The math module also provides log, which computes logarithms +base e. + +The second example finds the sine of radians. The name of the variable +is a hint that sin and the other trigonometric functions (cos, tan, +etc.) take arguments in radians. To convert from degrees to radians, +divide by 180 and multiply by :math:`\pi`: + +:: + + >>> degrees = 45 + >>> radians = degrees / 180.0 * math.pi + >>> math.sin(radians) + 0.707106781187 + +The expression math.pi gets the variable pi from the math module. Its +value is a floating-point approximation of :math:`\pi`, accurate to +about 15 digits. + +If you know trigonometry, you can check the previous result by comparing +it to the square root of two divided by two: + +:: + + >>> math.sqrt(2) / 2.0 + 0.707106781187 + +Composition +----------- + +So far, we have looked at the elements of a program—variables, +expressions, and statements—in isolation, without talking about how to +combine them. + +One of the most useful features of programming languages is their +ability to take small building blocks and **compose** them. For example, +the argument of a function can be any kind of expression, including +arithmetic operators: + +:: + + x = math.sin(degrees / 360.0 * 2 * math.pi) + +And even function calls: + +:: + + x = math.exp(math.log(x+1)) + +Almost anywhere you can put a value, you can put an arbitrary +expression, with one exception: the left side of an assignment statement +has to be a variable name. Any other expression on the left side is a +syntax error (we will see exceptions to this rule later). + +:: + + >>> minutes = hours * 60 # right + >>> hours * 60 = minutes # wrong! + SyntaxError: can't assign to operator + +Adding new functions +-------------------- + +So far, we have only been using the functions that come with Python, but +it is also possible to add new functions. A **function definition** +specifies the name of a new function and the sequence of statements that +run when the function is called. + +Here is an example: + +:: + + def print_lyrics(): + print("I'm a lumberjack, and I'm okay.") + print("I sleep all night and I work all day.") + +def is a keyword that indicates that this is a function definition. The +name of the function is ``print_lyrics``. The rules for function names +are the same as for variable names: letters, numbers and underscore are +legal, but the first character can’t be a number. You can’t use a +keyword as the name of a function, and you should avoid having a +variable and a function with the same name. + +The empty parentheses after the name indicate that this function doesn’t +take any arguments. + +The first line of the function definition is called the **header**; the +rest is called the **body**. The header has to end with a colon and the +body has to be indented. By convention, indentation is always four +spaces. The body can contain any number of statements. + +The strings in the print statements are enclosed in double quotes. +Single quotes and double quotes do the same thing; most people use +single quotes except in cases like this where a single quote (which is +also an apostrophe) appears in the string. + +All quotation marks (single and double) must be “straight quotes”, +usually located next to Enter on the keyboard. “Curly quotes”, like the +ones in this sentence, are not legal in Python. + +If you type a function definition in interactive mode, the interpreter +prints dots (...) to let you know that the definition isn’t complete: + +:: + + >>> def print_lyrics(): + ... print("I'm a lumberjack, and I'm okay.") + ... print("I sleep all night and I work all day.") + ... + +To end the function, you have to enter an empty line. + +Defining a function creates a **function object**, which has type +``function``: + +:: + + >>> print(print_lyrics) + + >>> type(print_lyrics) + + +The syntax for calling the new function is the same as for built-in +functions: + +:: + + >>> print_lyrics() + I'm a lumberjack, and I'm okay. + I sleep all night and I work all day. + +Once you have defined a function, you can use it inside another +function. For example, to repeat the previous refrain, we could write a +function called ``repeat_lyrics``: + +:: + + def repeat_lyrics(): + print_lyrics() + print_lyrics() + +And then call ``repeat_lyrics``: + +:: + + >>> repeat_lyrics() + I'm a lumberjack, and I'm okay. + I sleep all night and I work all day. + I'm a lumberjack, and I'm okay. + I sleep all night and I work all day. + +But that’s not really how the song goes. + +Definitions and uses +-------------------- + +Pulling together the code fragments from the previous section, the whole +program looks like this: + +:: + + def print_lyrics(): + print("I'm a lumberjack, and I'm okay.") + print("I sleep all night and I work all day.") + + def repeat_lyrics(): + print_lyrics() + print_lyrics() + + repeat_lyrics() + +This program contains two function definitions: ``print_lyrics`` and +``repeat_lyrics``. Function definitions get executed just like other +statements, but the effect is to create function objects. The statements +inside the function do not run until the function is called, and the +function definition generates no output. + +As you might expect, you have to create a function before you can run +it. In other words, the function definition has to run before the +function gets called. + +As an exercise, move the last line of this program to the top, so the +function call appears before the definitions. Run the program and see +what error message you get. + +Now move the function call back to the bottom and move the definition of +``print_lyrics`` after the definition of ``repeat_lyrics``. What happens +when you run this program? + +Flow of execution +----------------- + +To ensure that a function is defined before its first use, you have to +know the order statements run in, which is called the **flow of +execution**. + +Execution always begins at the first statement of the program. +Statements are run one at a time, in order from top to bottom. + +Function definitions do not alter the flow of execution of the program, +but remember that statements inside the function don’t run until the +function is called. + +A function call is like a detour in the flow of execution. Instead of +going to the next statement, the flow jumps to the body of the function, +runs the statements there, and then comes back to pick up where it left +off. + +That sounds simple enough, until you remember that one function can call +another. While in the middle of one function, the program might have to +run the statements in another function. Then, while running that new +function, the program might have to run yet another function! + +Fortunately, Python is good at keeping track of where it is, so each +time a function completes, the program picks up where it left off in the +function that called it. When it gets to the end of the program, it +terminates. + +In summary, when you read a program, you don’t always want to read from +top to bottom. Sometimes it makes more sense if you follow the flow of +execution. + +Parameters and arguments +------------------------ + +Some of the functions we have seen require arguments. For example, when +you call math.sin you pass a number as an argument. Some functions take +more than one argument: math.pow takes two, the base and the exponent. + +Inside the function, the arguments are assigned to variables called +**parameters**. Here is a definition for a function that takes an +argument: + +:: + + def print_twice(bruce): + print(bruce) + print(bruce) + +This function assigns the argument to a parameter named bruce. When the +function is called, it prints the value of the parameter (whatever it +is) twice. + +This function works with any value that can be printed. + +:: + + >>> print_twice('Spam') + Spam + Spam + >>> print_twice(42) + 42 + 42 + >>> print_twice(math.pi) + 3.14159265359 + 3.14159265359 + +The same rules of composition that apply to built-in functions also +apply to programmer-defined functions, so we can use any kind of +expression as an argument for ``print_twice``: + +:: + + >>> print_twice('Spam '*4) + Spam Spam Spam Spam + Spam Spam Spam Spam + >>> print_twice(math.cos(math.pi)) + -1.0 + -1.0 + +The argument is evaluated before the function is called, so in the +examples the expressions ``'Spam '*4`` and math.cos(math.pi) are only +evaluated once. + +You can also use a variable as an argument: + +:: + + >>> michael = 'Eric, the half a bee.' + >>> print_twice(michael) + Eric, the half a bee. + Eric, the half a bee. + +The name of the variable we pass as an argument (michael) has nothing to +do with the name of the parameter (bruce). It doesn’t matter what the +value was called back home (in the caller); here in ``print_twice``, we +call everybody bruce. + +Variables and parameters are local +---------------------------------- + +When you create a variable inside a function, it is **local**, which +means that it only exists inside the function. For example: + +:: + + def cat_twice(part1, part2): + cat = part1 + part2 + print_twice(cat) + +This function takes two arguments, concatenates them, and prints the +result twice. Here is an example that uses it: + +:: + + >>> line1 = 'Bing tiddle ' + >>> line2 = 'tiddle bang.' + >>> cat_twice(line1, line2) + Bing tiddle tiddle bang. + Bing tiddle tiddle bang. + +When ``cat_twice`` terminates, the variable cat is destroyed. If we try +to print it, we get an exception: + +:: + + >>> print(cat) + NameError: name 'cat' is not defined + +Parameters are also local. For example, outside ``print_twice``, there +is no such thing as bruce. + +Stack diagrams +-------------- + +To keep track of which variables can be used where, it is sometimes +useful to draw a **stack diagram**. Like state diagrams, stack diagrams +show the value of each variable, but they also show the function each +variable belongs to. + +Each function is represented by a **frame**. A frame is a box with the +name of a function beside it and the parameters and variables of the +function inside it. The stack diagram for the previous example is shown +in Figure [fig.stack]. + +.. figure:: figs/stack.pdf + :alt: Stack diagram. + + Stack diagram. + +The frames are arranged in a stack that indicates which function called +which, and so on. In this example, ``print_twice`` was called by +``cat_twice``, and ``cat_twice`` was called by ``__main__``, which is a +special name for the topmost frame. When you create a variable outside +of any function, it belongs to ``__main__``. + +Each parameter refers to the same value as its corresponding argument. +So, part1 has the same value as line1, part2 has the same value as +line2, and bruce has the same value as cat. + +If an error occurs during a function call, Python prints the name of the +function, the name of the function that called it, and the name of the +function that called *that*, all the way back to ``__main__``. + +For example, if you try to access cat from within ``print_twice``, you +get a NameError: + +:: + + Traceback (innermost last): + File "test.py", line 13, in __main__ + cat_twice(line1, line2) + File "test.py", line 5, in cat_twice + print_twice(cat) + File "test.py", line 9, in print_twice + print(cat) + NameError: name 'cat' is not defined + +This list of functions is called a **traceback**. It tells you what +program file the error occurred in, and what line, and what functions +were executing at the time. It also shows the line of code that caused +the error. + +The order of the functions in the traceback is the same as the order of +the frames in the stack diagram. The function that is currently running +is at the bottom. + +Fruitful functions and void functions +------------------------------------- + +Some of the functions we have used, such as the math functions, return +results; for lack of a better name, I call them **fruitful functions**. +Other functions, like ``print_twice``, perform an action but don’t +return a value. They are called **void functions**. + +When you call a fruitful function, you almost always want to do +something with the result; for example, you might assign it to a +variable or use it as part of an expression: + +:: + + x = math.cos(radians) + golden = (math.sqrt(5) + 1) / 2 + +When you call a function in interactive mode, Python displays the +result: + +:: + + >>> math.sqrt(5) + 2.2360679774997898 + +But in a script, if you call a fruitful function all by itself, the +return value is lost forever! + +:: + + math.sqrt(5) + +This script computes the square root of 5, but since it doesn’t store or +display the result, it is not very useful. + +Void functions might display something on the screen or have some other +effect, but they don’t have a return value. If you assign the result to +a variable, you get a special value called None. + +:: + + >>> result = print_twice('Bing') + Bing + Bing + >>> print(result) + None + +The value None is not the same as the string ``'None'``. It is a special +value that has its own type: + +:: + + >>> print(type(None)) + + +The functions we have written so far are all void. We will start writing +fruitful functions in a few chapters. + +Why functions? +-------------- + +It may not be clear why it is worth the trouble to divide a program into +functions. There are several reasons: + +- Creating a new function gives you an opportunity to name a group of + statements, which makes your program easier to read and debug. + +- Functions can make a program smaller by eliminating repetitive code. + Later, if you make a change, you only have to make it in one place. + +- Dividing a long program into functions allows you to debug the parts + one at a time and then assemble them into a working whole. + +- Well-designed functions are often useful for many programs. Once you + write and debug one, you can reuse it. + +Debugging +--------- + +One of the most important skills you will acquire is debugging. Although +it can be frustrating, debugging is one of the most intellectually rich, +challenging, and interesting parts of programming. + +In some ways debugging is like detective work. You are confronted with +clues and you have to infer the processes and events that led to the +results you see. + +Debugging is also like an experimental science. Once you have an idea +about what is going wrong, you modify your program and try again. If +your hypothesis was correct, you can predict the result of the +modification, and you take a step closer to a working program. If your +hypothesis was wrong, you have to come up with a new one. As Sherlock +Holmes pointed out, “When you have eliminated the impossible, whatever +remains, however improbable, must be the truth.” (A. Conan Doyle, *The +Sign of Four*) + +For some people, programming and debugging are the same thing. That is, +programming is the process of gradually debugging a program until it +does what you want. The idea is that you should start with a working +program and make small modifications, debugging them as you go. + +For example, Linux is an operating system that contains millions of +lines of code, but it started out as a simple program Linus Torvalds +used to explore the Intel 80386 chip. According to Larry Greenfield, +“One of Linus’s earlier projects was a program that would switch between +printing AAAA and BBBB. This later evolved to Linux.” (*The Linux Users’ +Guide* Beta Version 1). + +Glossary +-------- + +function: + A named sequence of statements that performs some useful operation. + Functions may or may not take arguments and may or may not produce a + result. + +function definition: + A statement that creates a new function, specifying its name, + parameters, and the statements it contains. + +function object: + A value created by a function definition. The name of the function + is a variable that refers to a function object. + +header: + The first line of a function definition. + +body: + The sequence of statements inside a function definition. + +parameter: + A name used inside a function to refer to the value passed as an + argument. + +function call: + A statement that runs a function. It consists of the function name + followed by an argument list in parentheses. + +argument: + A value provided to a function when the function is called. This + value is assigned to the corresponding parameter in the function. + +local variable: + A variable defined inside a function. A local variable can only be + used inside its function. + +return value: + The result of a function. If a function call is used as an + expression, the return value is the value of the expression. + +fruitful function: + A function that returns a value. + +void function: + A function that always returns None. + +None: + A special value returned by void functions. + +module: + A file that contains a collection of related functions and other + definitions. + +import statement: + A statement that reads a module file and creates a module object. + +module object: + A value created by an import statement that provides access to the + values defined in a module. + +dot notation: + The syntax for calling a function in another module by specifying + the module name followed by a dot (period) and the function name. + +composition: + Using an expression as part of a larger expression, or a statement + as part of a larger statement. + +flow of execution: + The order statements run in. + +stack diagram: + A graphical representation of a stack of functions, their variables, + and the values they refer to. + +frame: + A box in a stack diagram that represents a function call. It + contains the local variables and parameters of the function. + +traceback: + A list of the functions that are executing, printed when an + exception occurs. + +Exercises +--------- + +Write a function named ``right_justify`` that takes a string named s as +a parameter and prints the string with enough leading spaces so that the +last letter of the string is in column 70 of the display. + +:: + + >>> right_justify('monty') + monty + +Hint: Use string concatenation and repetition. Also, Python provides a +built-in function called len that returns the length of a string, so the +value of ``len('monty')`` is 5. + +A function object is a value you can assign to a variable or pass as an +argument. For example, ``do_twice`` is a function that takes a function +object as an argument and calls it twice: + +:: + + def do_twice(f): + f() + f() + +Here’s an example that uses ``do_twice`` to call a function named +``print_spam`` twice. + +:: + + def print_spam(): + print('spam') + + do_twice(print_spam) + +#. Type this example into a script and test it. + +#. Modify ``do_twice`` so that it takes two arguments, a function object + and a value, and calls the function twice, passing the value as an + argument. + +#. Copy the definition of ``print_twice`` from earlier in this chapter + to your script. + +#. Use the modified version of ``do_twice`` to call ``print_twice`` + twice, passing ``'spam'`` as an argument. + +#. Define a new function called ``do_four`` that takes a function object + and a value and calls the function four times, passing the value as a + parameter. There should be only two statements in the body of this + function, not four. + +Solution: http://thinkpython2.com/code/do_four.py. + +Note: This exercise should be done using only the statements and other +features we have learned so far. + +#. Write a function that draws a grid like the following: + + :: + + + - - - - + - - - - + + | | | + | | | + | | | + | | | + + - - - - + - - - - + + | | | + | | | + | | | + | | | + + - - - - + - - - - + + + Hint: to print more than one value on a line, you can print a + comma-separated sequence of values: + + :: + + print('+', '-') + + By default, print advances to the next line, but you can override + that behavior and put a space at the end, like this: + + :: + + print('+', end=' ') + print('-') + + The output of these statements is ``'+ -'``. + + A print statement with no argument ends the current line and goes to + the next line. + +#. Write a function that draws a similar grid with four rows and four + columns. + +Solution: http://thinkpython2.com/code/grid.py. Credit: This exercise is +based on an exercise in Oualline, *Practical C Programming, Third +Edition*, O’Reilly Media, 1997. diff --git a/book/04-case-ui.rst b/book/04-case-ui.rst new file mode 100644 index 0000000..8d6a5fd --- /dev/null +++ b/book/04-case-ui.rst @@ -0,0 +1,597 @@ +Case study: interface design +============================ + +This chapter presents a case study that demonstrates a process for +designing functions that work together. + +It introduces the turtle module, which allows you to create images using +turtle graphics. The turtle module is included in most Python +installations, but if you are running Python using PythonAnywhere, you +won’t be able to run the turtle examples (at least you couldn’t when I +wrote this). + +If you have already installed Python on your computer, you should be +able to run the examples. Otherwise, now is a good time to install. I +have posted instructions at http://tinyurl.com/thinkpython2e. + +Code examples from this chapter are available from +http://thinkpython2.com/code/polygon.py. + +The turtle module +----------------- + +To check whether you have the turtle module, open the Python interpreter +and type + +:: + + >>> import turtle + >>> bob = turtle.Turtle() + +When you run this code, it should create a new window with small arrow +that represents the turtle. Close the window. + +Create a file named mypolygon.py and type in the following code: + +:: + + import turtle + bob = turtle.Turtle() + print(bob) + turtle.mainloop() + +The turtle module (with a lowercase ’t’) provides a function called +Turtle (with an uppercase ’T’) that creates a Turtle object, which we +assign to a variable named bob. Printing bob displays something like: + +:: + + + +This means that bob refers to an object with type Turtle as defined in +module turtle. + +``mainloop`` tells the window to wait for the user to do something, +although in this case there’s not much for the user to do except close +the window. + +Once you create a Turtle, you can call a **method** to move it around +the window. A method is similar to a function, but it uses slightly +different syntax. For example, to move the turtle forward: + +:: + + bob.fd(100) + +The method, fd, is associated with the turtle object we’re calling bob. +Calling a method is like making a request: you are asking bob to move +forward. + +The argument of fd is a distance in pixels, so the actual size depends +on your display. + +Other methods you can call on a Turtle are bk to move backward, lt for +left turn, and rt right turn. The argument for lt and rt is an angle in +degrees. + +Also, each Turtle is holding a pen, which is either down or up; if the +pen is down, the Turtle leaves a trail when it moves. The methods pu and +pd stand for “pen up” and “pen down”. + +To draw a right angle, add these lines to the program (after creating +bob and before calling ``mainloop``): + +:: + + bob.fd(100) + bob.lt(90) + bob.fd(100) + +When you run this program, you should see bob move east and then north, +leaving two line segments behind. + +Now modify the program to draw a square. Don’t go on until you’ve got it +working! + +Simple repetition +----------------- + +Chances are you wrote something like this: + +:: + + bob.fd(100) + bob.lt(90) + + bob.fd(100) + bob.lt(90) + + bob.fd(100) + bob.lt(90) + + bob.fd(100) + +We can do the same thing more concisely with a for statement. Add this +example to mypolygon.py and run it again: + +:: + + for i in range(4): + print('Hello!') + +You should see something like this: + +:: + + Hello! + Hello! + Hello! + Hello! + +This is the simplest use of the for statement; we will see more later. +But that should be enough to let you rewrite your square-drawing +program. Don’t go on until you do. + +Here is a for statement that draws a square: + +:: + + for i in range(4): + bob.fd(100) + bob.lt(90) + +The syntax of a for statement is similar to a function definition. It +has a header that ends with a colon and an indented body. The body can +contain any number of statements. + +A for statement is also called a **loop** because the flow of execution +runs through the body and then loops back to the top. In this case, it +runs the body four times. + +This version is actually a little different from the previous +square-drawing code because it makes another turn after drawing the last +side of the square. The extra turn takes more time, but it simplifies +the code if we do the same thing every time through the loop. This +version also has the effect of leaving the turtle back in the starting +position, facing in the starting direction. + +Exercises +--------- + +The following is a series of exercises using TurtleWorld. They are meant +to be fun, but they have a point, too. While you are working on them, +think about what the point is. + +The following sections have solutions to the exercises, so don’t look +until you have finished (or at least tried). + +#. Write a function called square that takes a parameter named t, which + is a turtle. It should use the turtle to draw a square. + + Write a function call that passes bob as an argument to square, and + then run the program again. + +#. Add another parameter, named length, to square. Modify the body so + length of the sides is length, and then modify the function call to + provide a second argument. Run the program again. Test your program + with a range of values for length. + +#. Make a copy of square and change the name to polygon. Add another + parameter named n and modify the body so it draws an n-sided regular + polygon. Hint: The exterior angles of an n-sided regular polygon are + :math:`360/n` degrees. + +#. Write a function called circle that takes a turtle, t, and radius, r, + as parameters and that draws an approximate circle by calling polygon + with an appropriate length and number of sides. Test your function + with a range of values of r. + + Hint: figure out the circumference of the circle and make sure that + length \* n = circumference. + +#. Make a more general version of circle called arc that takes an + additional parameter angle, which determines what fraction of a + circle to draw. angle is in units of degrees, so when angle=360, arc + should draw a complete circle. + +Encapsulation +------------- + +The first exercise asks you to put your square-drawing code into a +function definition and then call the function, passing the turtle as a +parameter. Here is a solution: + +:: + + def square(t): + for i in range(4): + t.fd(100) + t.lt(90) + + square(bob) + +The innermost statements, fd and lt are indented twice to show that they +are inside the for loop, which is inside the function definition. The +next line, square(bob), is flush with the left margin, which indicates +the end of both the for loop and the function definition. + +Inside the function, t refers to the same turtle bob, so t.lt(90) has +the same effect as bob.lt(90). In that case, why not call the parameter +bob? The idea is that t can be any turtle, not just bob, so you could +create a second turtle and pass it as an argument to square: + +:: + + alice = Turtle() + square(alice) + +Wrapping a piece of code up in a function is called **encapsulation**. +One of the benefits of encapsulation is that it attaches a name to the +code, which serves as a kind of documentation. Another advantage is that +if you re-use the code, it is more concise to call a function twice than +to copy and paste the body! + +Generalization +-------------- + +The next step is to add a length parameter to square. Here is a +solution: + +:: + + def square(t, length): + for i in range(4): + t.fd(length) + t.lt(90) + + square(bob, 100) + +Adding a parameter to a function is called **generalization** because it +makes the function more general: in the previous version, the square is +always the same size; in this version it can be any size. + +The next step is also a generalization. Instead of drawing squares, +polygon draws regular polygons with any number of sides. Here is a +solution: + +:: + + def polygon(t, n, length): + angle = 360 / n + for i in range(n): + t.fd(length) + t.lt(angle) + + polygon(bob, 7, 70) + +This example draws a 7-sided polygon with side length 70. + +If you are using Python 2, the value of angle might be off because of +integer division. A simple solution is to compute angle = 360.0 / n. +Because the numerator is a floating-point number, the result is floating +point. + +When a function has more than a few numeric arguments, it is easy to +forget what they are, or what order they should be in. In that case it +is often a good idea to include the names of the parameters in the +argument list: + +:: + + polygon(bob, n=7, length=70) + +These are called **keyword arguments** because they include the +parameter names as “keywords” (not to be confused with Python keywords +like while and def). + +This syntax makes the program more readable. It is also a reminder about +how arguments and parameters work: when you call a function, the +arguments are assigned to the parameters. + +Interface design +---------------- + +The next step is to write circle, which takes a radius, r, as a +parameter. Here is a simple solution that uses polygon to draw a +50-sided polygon: + +:: + + import math + + def circle(t, r): + circumference = 2 * math.pi * r + n = 50 + length = circumference / n + polygon(t, n, length) + +The first line computes the circumference of a circle with radius r +using the formula :math:`2 \pi r`. Since we use math.pi, we have to +import math. By convention, import statements are usually at the +beginning of the script. + +n is the number of line segments in our approximation of a circle, so +length is the length of each segment. Thus, polygon draws a 50-sides +polygon that approximates a circle with radius r. + +One limitation of this solution is that n is a constant, which means +that for very big circles, the line segments are too long, and for small +circles, we waste time drawing very small segments. One solution would +be to generalize the function by taking n as a parameter. This would +give the user (whoever calls circle) more control, but the interface +would be less clean. + +The **interface** of a function is a summary of how it is used: what are +the parameters? What does the function do? And what is the return value? +An interface is “clean” if it allows the caller to do what they want +without dealing with unnecessary details. + +In this example, r belongs in the interface because it specifies the +circle to be drawn. n is less appropriate because it pertains to the +details of *how* the circle should be rendered. + +Rather than clutter up the interface, it is better to choose an +appropriate value of n depending on circumference: + +:: + + def circle(t, r): + circumference = 2 * math.pi * r + n = int(circumference / 3) + 1 + length = circumference / n + polygon(t, n, length) + +Now the number of segments is an integer near circumference/3, so the +length of each segment is approximately 3, which is small enough that +the circles look good, but big enough to be efficient, and acceptable +for any size circle. + +Refactoring +----------- + +When I wrote circle, I was able to re-use polygon because a many-sided +polygon is a good approximation of a circle. But arc is not as +cooperative; we can’t use polygon or circle to draw an arc. + +One alternative is to start with a copy of polygon and transform it into +arc. The result might look like this: + +:: + + def arc(t, r, angle): + arc_length = 2 * math.pi * r * angle / 360 + n = int(arc_length / 3) + 1 + step_length = arc_length / n + step_angle = angle / n + + for i in range(n): + t.fd(step_length) + t.lt(step_angle) + +The second half of this function looks like polygon, but we can’t re-use +polygon without changing the interface. We could generalize polygon to +take an angle as a third argument, but then polygon would no longer be +an appropriate name! Instead, let’s call the more general function +polyline: + +:: + + def polyline(t, n, length, angle): + for i in range(n): + t.fd(length) + t.lt(angle) + +Now we can rewrite polygon and arc to use polyline: + +:: + + def polygon(t, n, length): + angle = 360.0 / n + polyline(t, n, length, angle) + + def arc(t, r, angle): + arc_length = 2 * math.pi * r * angle / 360 + n = int(arc_length / 3) + 1 + step_length = arc_length / n + step_angle = float(angle) / n + polyline(t, n, step_length, step_angle) + +Finally, we can rewrite circle to use arc: + +:: + + def circle(t, r): + arc(t, r, 360) + +This process—rearranging a program to improve interfaces and facilitate +code re-use—is called **refactoring**. In this case, we noticed that +there was similar code in arc and polygon, so we “factored it out” into +polyline. + +If we had planned ahead, we might have written polyline first and +avoided refactoring, but often you don’t know enough at the beginning of +a project to design all the interfaces. Once you start coding, you +understand the problem better. Sometimes refactoring is a sign that you +have learned something. + +A development plan +------------------ + +A **development plan** is a process for writing programs. The process we +used in this case study is “encapsulation and generalization”. The steps +of this process are: + +#. Start by writing a small program with no function definitions. + +#. Once you get the program working, identify a coherent piece of it, + encapsulate the piece in a function and give it a name. + +#. Generalize the function by adding appropriate parameters. + +#. Repeat steps 1–3 until you have a set of working functions. Copy and + paste working code to avoid retyping (and re-debugging). + +#. Look for opportunities to improve the program by refactoring. For + example, if you have similar code in several places, consider + factoring it into an appropriately general function. + +This process has some drawbacks—we will see alternatives later—but it +can be useful if you don’t know ahead of time how to divide the program +into functions. This approach lets you design as you go along. + +docstring +--------- + +A **docstring** is a string at the beginning of a function that explains +the interface (“doc” is short for “documentation”). Here is an example: + +:: + + def polyline(t, n, length, angle): + """Draws n line segments with the given length and + angle (in degrees) between them. t is a turtle. + """ + for i in range(n): + t.fd(length) + t.lt(angle) + +By convention, all docstrings are triple-quoted strings, also known as +multiline strings because the triple quotes allow the string to span +more than one line. + +It is terse, but it contains the essential information someone would +need to use this function. It explains concisely what the function does +(without getting into the details of how it does it). It explains what +effect each parameter has on the behavior of the function and what type +each parameter should be (if it is not obvious). + +Writing this kind of documentation is an important part of interface +design. A well-designed interface should be simple to explain; if you +have a hard time explaining one of your functions, maybe the interface +could be improved. + +Debugging +--------- + +An interface is like a contract between a function and a caller. The +caller agrees to provide certain parameters and the function agrees to +do certain work. + +For example, polyline requires four arguments: t has to be a Turtle; n +has to be an integer; length should be a positive number; and angle has +to be a number, which is understood to be in degrees. + +These requirements are called **preconditions** because they are +supposed to be true before the function starts executing. Conversely, +conditions at the end of the function are **postconditions**. +Postconditions include the intended effect of the function (like drawing +line segments) and any side effects (like moving the Turtle or making +other changes). + +Preconditions are the responsibility of the caller. If the caller +violates a (properly documented!) precondition and the function doesn’t +work correctly, the bug is in the caller, not the function. + +If the preconditions are satisfied and the postconditions are not, the +bug is in the function. If your pre- and postconditions are clear, they +can help with debugging. + +Glossary +-------- + +method: + A function that is associated with an object and called using dot + notation. + +loop: + A part of a program that can run repeatedly. + +encapsulation: + The process of transforming a sequence of statements into a function + definition. + +generalization: + The process of replacing something unnecessarily specific (like a + number) with something appropriately general (like a variable or + parameter). + +keyword argument: + An argument that includes the name of the parameter as a “keyword”. + +interface: + A description of how to use a function, including the name and + descriptions of the arguments and return value. + +refactoring: + The process of modifying a working program to improve function + interfaces and other qualities of the code. + +development plan: + A process for writing programs. + +docstring: + A string that appears at the top of a function definition to + document the function’s interface. + +precondition: + A requirement that should be satisfied by the caller before a + function starts. + +postcondition: + A requirement that should be satisfied by the function before it + ends. + +Exercises +--------- + +Download the code in this chapter from +http://thinkpython2.com/code/polygon.py. + +#. Draw a stack diagram that shows the state of the program while + executing circle(bob, radius). You can do the arithmetic by hand or + add print statements to the code. + +#. The version of arc in Section [refactoring] is not very accurate + because the linear approximation of the circle is always outside the + true circle. As a result, the Turtle ends up a few pixels away from + the correct destination. My solution shows a way to reduce the effect + of this error. Read the code and see if it makes sense to you. If you + draw a diagram, you might see how it works. + +.. figure:: figs/flowers.pdf + :alt: Turtle flowers. + + Turtle flowers. + +Write an appropriately general set of functions that can draw flowers as +in Figure [fig.flowers]. + +Solution: http://thinkpython2.com/code/flower.py, also requires +http://thinkpython2.com/code/polygon.py. + +.. figure:: figs/pies.pdf + :alt: Turtle pies. + + Turtle pies. + +Write an appropriately general set of functions that can draw shapes as +in Figure [fig.pies]. + +Solution: http://thinkpython2.com/code/pie.py. + +The letters of the alphabet can be constructed from a moderate number of +basic elements, like vertical and horizontal lines and a few curves. +Design an alphabet that can be drawn with a minimal number of basic +elements and then write functions that draw the letters. + +You should write one function for each letter, with names ``draw_a``, +``draw_b``, etc., and put your functions in a file named letters.py. You +can download a “turtle typewriter” from +http://thinkpython2.com/code/typewriter.py to help you test your code. + +You can get a solution from http://thinkpython2.com/code/letters.py; it +also requires http://thinkpython2.com/code/polygon.py. + +Read about spirals at http://en.wikipedia.org/wiki/Spiral; then write a +program that draws an Archimedian spiral (or one of the other kinds). +Solution: http://thinkpython2.com/code/spiral.py. diff --git a/book/05-cond-recur.rst b/book/05-cond-recur.rst new file mode 100644 index 0000000..89337ef --- /dev/null +++ b/book/05-cond-recur.rst @@ -0,0 +1,727 @@ +Conditionals and recursion +========================== + +The main topic of this chapter is the if statement, which executes +different code depending on the state of the program. But first I want +to introduce two new operators: floor division and modulus. + +Floor division and modulus +-------------------------- + +The **floor division** operator, ``//``, divides two numbers and rounds +down to an integer. For example, suppose the run time of a movie is 105 +minutes. You might want to know how long that is in hours. Conventional +division returns a floating-point number: + +:: + + >>> minutes = 105 + >>> minutes / 60 + 1.75 + +But we don’t normally write hours with decimal points. Floor division +returns the integer number of hours, dropping the fraction part: + +:: + + >>> minutes = 105 + >>> hours = minutes // 60 + >>> hours + 1 + +To get the remainder, you could subtract off one hour in minutes: + +:: + + >>> remainder = minutes - hours * 60 + >>> remainder + 45 + +An alternative is to use the **modulus operator**, ``%``, which divides +two numbers and returns the remainder. + +:: + + >>> remainder = minutes % 60 + >>> remainder + 45 + +The modulus operator is more useful than it seems. For example, you can +check whether one number is divisible by another—if x % y is zero, then +x is divisible by y. + +Also, you can extract the right-most digit or digits from a number. For +example, x % 10 yields the right-most digit of x (in base 10). Similarly +x % 100 yields the last two digits. + +If you are using Python 2, division works differently. The division +operator, ``/``, performs floor division if both operands are integers, +and floating-point division if either operand is a float. + +Boolean expressions +------------------- + +A **boolean expression** is an expression that is either true or false. +The following examples use the operator ==, which compares two operands +and produces True if they are equal and False otherwise: + +:: + + >>> 5 == 5 + True + >>> 5 == 6 + False + +True and False are special values that belong to the type bool; they are +not strings: + +:: + + >>> type(True) + + >>> type(False) + + +The == operator is one of the **relational operators**; the others are: + +:: + + x != y # x is not equal to y + x > y # x is greater than y + x < y # x is less than y + x >= y # x is greater than or equal to y + x <= y # x is less than or equal to y + +Although these operations are probably familiar to you, the Python +symbols are different from the mathematical symbols. A common error is +to use a single equal sign (=) instead of a double equal sign (==). +Remember that = is an assignment operator and == is a relational +operator. There is no such thing as =< or =>. + +Logical operators +----------------- + +There are three **logical operators**: and, or, and not. The semantics +(meaning) of these operators is similar to their meaning in English. For +example, x > 0 and x < 10 is true only if x is greater than 0 *and* less +than 10. + +n%2 == 0 or n%3 == 0 is true if *either or both* of the conditions is +true, that is, if the number is divisible by 2 *or* 3. + +Finally, the not operator negates a boolean expression, so not (x > y) +is true if x > y is false, that is, if x is less than or equal to y. + +Strictly speaking, the operands of the logical operators should be +boolean expressions, but Python is not very strict. Any nonzero number +is interpreted as True: + +:: + + >>> 42 and True + True + +This flexibility can be useful, but there are some subtleties to it that +might be confusing. You might want to avoid it (unless you know what you +are doing). + +Conditional execution +--------------------- + +In order to write useful programs, we almost always need the ability to +check conditions and change the behavior of the program accordingly. +**Conditional statements** give us this ability. The simplest form is +the if statement: + +:: + + if x > 0: + print('x is positive') + +The boolean expression after if is called the **condition**. If it is +true, the indented statement runs. If not, nothing happens. + +if statements have the same structure as function definitions: a header +followed by an indented body. Statements like this are called **compound +statements**. + +There is no limit on the number of statements that can appear in the +body, but there has to be at least one. Occasionally, it is useful to +have a body with no statements (usually as a place keeper for code you +haven’t written yet). In that case, you can use the pass statement, +which does nothing. + +:: + + if x < 0: + pass # TODO: need to handle negative values! + +Alternative execution +--------------------- + +A second form of the if statement is “alternative execution”, in which +there are two possibilities and the condition determines which one runs. +The syntax looks like this: + +:: + + if x % 2 == 0: + print('x is even') + else: + print('x is odd') + +If the remainder when x is divided by 2 is 0, then we know that x is +even, and the program displays an appropriate message. If the condition +is false, the second set of statements runs. Since the condition must be +true or false, exactly one of the alternatives will run. The +alternatives are called **branches**, because they are branches in the +flow of execution. + +Chained conditionals +-------------------- + +Sometimes there are more than two possibilities and we need more than +two branches. One way to express a computation like that is a **chained +conditional**: + +:: + + if x < y: + print('x is less than y') + elif x > y: + print('x is greater than y') + else: + print('x and y are equal') + +elif is an abbreviation of “else if”. Again, exactly one branch will +run. There is no limit on the number of elif statements. If there is an +else clause, it has to be at the end, but there doesn’t have to be one. + +:: + + if choice == 'a': + draw_a() + elif choice == 'b': + draw_b() + elif choice == 'c': + draw_c() + +Each condition is checked in order. If the first is false, the next is +checked, and so on. If one of them is true, the corresponding branch +runs and the statement ends. Even if more than one condition is true, +only the first true branch runs. + +Nested conditionals +------------------- + +One conditional can also be nested within another. We could have written +the example in the previous section like this: + +:: + + if x == y: + print('x and y are equal') + else: + if x < y: + print('x is less than y') + else: + print('x is greater than y') + +The outer conditional contains two branches. The first branch contains a +simple statement. The second branch contains another if statement, which +has two branches of its own. Those two branches are both simple +statements, although they could have been conditional statements as +well. + +Although the indentation of the statements makes the structure apparent, +**nested conditionals** become difficult to read very quickly. It is a +good idea to avoid them when you can. + +Logical operators often provide a way to simplify nested conditional +statements. For example, we can rewrite the following code using a +single conditional: + +:: + + if 0 < x: + if x < 10: + print('x is a positive single-digit number.') + +The print statement runs only if we make it past both conditionals, so +we can get the same effect with the and operator: + +:: + + if 0 < x and x < 10: + print('x is a positive single-digit number.') + +For this kind of condition, Python provides a more concise option: + +:: + + if 0 < x < 10: + print('x is a positive single-digit number.') + +Recursion +--------- + +It is legal for one function to call another; it is also legal for a +function to call itself. It may not be obvious why that is a good thing, +but it turns out to be one of the most magical things a program can do. +For example, look at the following function: + +:: + + def countdown(n): + if n <= 0: + print('Blastoff!') + else: + print(n) + countdown(n-1) + +If n is 0 or negative, it outputs the word, “Blastoff!” Otherwise, it +outputs n and then calls a function named countdown—itself—passing n-1 +as an argument. + +What happens if we call this function like this? + +:: + + >>> countdown(3) + +The execution of countdown begins with n=3, and since n is greater than +0, it outputs the value 3, and then calls itself... + + The execution of countdown begins with n=2, and since n is greater + than 0, it outputs the value 2, and then calls itself... + + The execution of countdown begins with n=1, and since n is + greater than 0, it outputs the value 1, and then calls itself... + + The execution of countdown begins with n=0, and since n is + not greater than 0, it outputs the word, “Blastoff!” and + then returns. + + The countdown that got n=1 returns. + + The countdown that got n=2 returns. + +The countdown that got n=3 returns. + +And then you’re back in ``__main__``. So, the total output looks like +this: + +:: + + 3 + 2 + 1 + Blastoff! + +A function that calls itself is **recursive**; the process of executing +it is called **recursion**. + +As another example, we can write a function that prints a string n +times. + +:: + + def print_n(s, n): + if n <= 0: + return + print(s) + print_n(s, n-1) + +If n <= 0 the **return statement** exits the function. The flow of +execution immediately returns to the caller, and the remaining lines of +the function don’t run. + +The rest of the function is similar to countdown: it displays s and then +calls itself to display s :math:`n-1` additional times. So the number of +lines of output is 1 + (n - 1), which adds up to n. + +For simple examples like this, it is probably easier to use a for loop. +But we will see examples later that are hard to write with a for loop +and easy to write with recursion, so it is good to start early. + +Stack diagrams for recursive functions +-------------------------------------- + +In Section [stackdiagram], we used a stack diagram to represent the +state of a program during a function call. The same kind of diagram can +help interpret a recursive function. + +Every time a function gets called, Python creates a frame to contain the +function’s local variables and parameters. For a recursive function, +there might be more than one frame on the stack at the same time. + +Figure [fig.stack2] shows a stack diagram for countdown called with n = +3. + +.. figure:: figs/stack2.pdf + :alt: Stack diagram. + + Stack diagram. + +As usual, the top of the stack is the frame for ``__main__``. It is +empty because we did not create any variables in ``__main__`` or pass +any arguments to it. + +The four countdown frames have different values for the parameter n. The +bottom of the stack, where n=0, is called the **base case**. It does not +make a recursive call, so there are no more frames. + +As an exercise, draw a stack diagram for ``print_n`` called with +``s = 'Hello'`` and n=2. Then write a function called ``do_n`` that +takes a function object and a number, n, as arguments, and that calls +the given function n times. + +Infinite recursion +------------------ + +If a recursion never reaches a base case, it goes on making recursive +calls forever, and the program never terminates. This is known as +**infinite recursion**, and it is generally not a good idea. Here is a +minimal program with an infinite recursion: + +:: + + def recurse(): + recurse() + +In most programming environments, a program with infinite recursion does +not really run forever. Python reports an error message when the maximum +recursion depth is reached: + +:: + + File "", line 2, in recurse + File "", line 2, in recurse + File "", line 2, in recurse + . + . + . + File "", line 2, in recurse + RuntimeError: Maximum recursion depth exceeded + +This traceback is a little bigger than the one we saw in the previous +chapter. When the error occurs, there are 1000 recurse frames on the +stack! + +If you write encounter an infinite recursion by accident, review your +function to confirm that there is a base case that does not make a +recursive call. And if there is a base case, check whether you are +guaranteed to reach it. + +Keyboard input +-------------- + +The programs we have written so far accept no input from the user. They +just do the same thing every time. + +Python provides a built-in function called input that stops the program +and waits for the user to type something. When the user presses Return +or Enter, the program resumes and ``input`` returns what the user typed +as a string. In Python 2, the same function is called ``raw_input``. + +:: + + >>> text = input() + What are you waiting for? + >>> text + What are you waiting for? + +Before getting input from the user, it is a good idea to print a prompt +telling the user what to type. ``input`` can take a prompt as an +argument: + +:: + + >>> name = input('What...is your name?\n') + What...is your name? + Arthur, King of the Britons! + >>> name + Arthur, King of the Britons! + +The sequence ``\n`` at the end of the prompt represents a **newline**, +which is a special character that causes a line break. That’s why the +user’s input appears below the prompt. + +If you expect the user to type an integer, you can try to convert the +return value to int: + +:: + + >>> prompt = 'What...is the airspeed velocity of an unladen swallow?\n' + >>> speed = input(prompt) + What...is the airspeed velocity of an unladen swallow? + 42 + >>> int(speed) + 42 + +But if the user types something other than a string of digits, you get +an error: + +:: + + >>> speed = input(prompt) + What...is the airspeed velocity of an unladen swallow? + What do you mean, an African or a European swallow? + >>> int(speed) + ValueError: invalid literal for int() with base 10 + +We will see how to handle this kind of error later. + +Debugging +--------- + +When a syntax or runtime error occurs, the error message contains a lot +of information, but it can be overwhelming. The most useful parts are +usually: + +- What kind of error it was, and + +- Where it occurred. + +Syntax errors are usually easy to find, but there are a few gotchas. +Whitespace errors can be tricky because spaces and tabs are invisible +and we are used to ignoring them. + +:: + + >>> x = 5 + >>> y = 6 + File "", line 1 + y = 6 + ^ + IndentationError: unexpected indent + +In this example, the problem is that the second line is indented by one +space. But the error message points to y, which is misleading. In +general, error messages indicate where the problem was discovered, but +the actual error might be earlier in the code, sometimes on a previous +line. + +The same is true of runtime errors. Suppose you are trying to compute a +signal-to-noise ratio in decibels. The formula is +:math:`SNR_{db} = 10 \log_{10} (P_{signal} / P_{noise})`. In Python, you +might write something like this: + +:: + + import math + signal_power = 9 + noise_power = 10 + ratio = signal_power // noise_power + decibels = 10 * math.log10(ratio) + print(decibels) + +When you run this program, you get an exception: + +:: + + Traceback (most recent call last): + File "snr.py", line 5, in ? + decibels = 10 * math.log10(ratio) + ValueError: math domain error + +The error message indicates line 5, but there is nothing wrong with that +line. To find the real error, it might be useful to print the value of +ratio, which turns out to be 0. The problem is in line 4, which uses +floor division instead of floating-point division. + +You should take the time to read error messages carefully, but don’t +assume that everything they say is correct. + +Glossary +-------- + +floor division: + An operator, denoted //, that divides two numbers and rounds down + (toward zero) to an integer. + +modulus operator: + An operator, denoted with a percent sign (%), that works on integers + and returns the remainder when one number is divided by another. + +boolean expression: + An expression whose value is either True or False. + +relational operator: + One of the operators that compares its operands: ==, !=, >, <, >=, + and <=. + +logical operator: + One of the operators that combines boolean expressions: and, or, and + not. + +conditional statement: + A statement that controls the flow of execution depending on some + condition. + +condition: + The boolean expression in a conditional statement that determines + which branch runs. + +compound statement: + A statement that consists of a header and a body. The header ends + with a colon (:). The body is indented relative to the header. + +branch: + One of the alternative sequences of statements in a conditional + statement. + +chained conditional: + A conditional statement with a series of alternative branches. + +nested conditional: + A conditional statement that appears in one of the branches of + another conditional statement. + +return statement: + A statement that causes a function to end immediately and return to + the caller. + +recursion: + The process of calling the function that is currently executing. + +base case: + A conditional branch in a recursive function that does not make a + recursive call. + +infinite recursion: + A recursion that doesn’t have a base case, or never reaches it. + Eventually, an infinite recursion causes a runtime error. + +Exercises +--------- + +The time module provides a function, also named time, that returns the +current Greenwich Mean Time in “the epoch”, which is an arbitrary time +used as a reference point. On UNIX systems, the epoch is 1 January 1970. + +:: + + >>> import time + >>> time.time() + 1437746094.5735958 + +Write a script that reads the current time and converts it to a time of +day in hours, minutes, and seconds, plus the number of days since the +epoch. + +Fermat’s Last Theorem says that there are no positive integers +:math:`a`, :math:`b`, and :math:`c` such that + +.. math:: a^n + b^n = c^n + +for any values of :math:`n` greater than 2. + +#. Write a function named ``check_fermat`` that takes four parameters—a, + b, c and n—and checks to see if Fermat’s theorem holds. If :math:`n` + is greater than 2 and + + .. math:: a^n + b^n = c^n + + the program should print, “Holy smokes, Fermat was wrong!” Otherwise + the program should print, “No, that doesn’t work.” + +#. Write a function that prompts the user to input values for a, b, c + and n, converts them to integers, and uses ``check_fermat`` to check + whether they violate Fermat’s theorem. + +If you are given three sticks, you may or may not be able to arrange +them in a triangle. For example, if one of the sticks is 12 inches long +and the other two are one inch long, you will not be able to get the +short sticks to meet in the middle. For any three lengths, there is a +simple test to see if it is possible to form a triangle: + + If any of the three lengths is greater than the sum of the other + two, then you cannot form a triangle. Otherwise, you can. (If the + sum of two lengths equals the third, they form what is called a + “degenerate” triangle.) + +#. Write a function named ``is_triangle`` that takes three integers as + arguments, and that prints either “Yes” or “No”, depending on whether + you can or cannot form a triangle from sticks with the given lengths. + +#. Write a function that prompts the user to input three stick lengths, + converts them to integers, and uses ``is_triangle`` to check whether + sticks with the given lengths can form a triangle. + +What is the output of the following program? Draw a stack diagram that +shows the state of the program when it prints the result. + +:: + + def recurse(n, s): + if n == 0: + print(s) + else: + recurse(n-1, n+s) + + recurse(3, 0) + +#. What would happen if you called this function like this: recurse(-1, + 0)? + +#. Write a docstring that explains everything someone would need to know + in order to use this function (and nothing else). + +The following exercises use the turtle module, described in +Chapter [turtlechap]: + +Read the following function and see if you can figure out what it does. +Then run it (see the examples in Chapter [turtlechap]). + +:: + + def draw(t, length, n): + if n == 0: + return + angle = 50 + t.fd(length*n) + t.lt(angle) + draw(t, length, n-1) + t.rt(2*angle) + draw(t, length, n-1) + t.lt(angle) + t.bk(length*n) + +.. figure:: figs/koch.pdf + :alt: A Koch curve. + + A Koch curve. + +The Koch curve is a fractal that looks something like Figure [fig.koch]. +To draw a Koch curve with length :math:`x`, all you have to do is + +#. Draw a Koch curve with length :math:`x/3`. + +#. Turn left 60 degrees. + +#. Draw a Koch curve with length :math:`x/3`. + +#. Turn right 120 degrees. + +#. Draw a Koch curve with length :math:`x/3`. + +#. Turn left 60 degrees. + +#. Draw a Koch curve with length :math:`x/3`. + +The exception is if :math:`x` is less than 3: in that case, you can just +draw a straight line with length :math:`x`. + +#. Write a function called koch that takes a turtle and a length as + parameters, and that uses the turtle to draw a Koch curve with the + given length. + +#. Write a function called snowflake that draws three Koch curves to + make the outline of a snowflake. + + Solution: http://thinkpython2.com/code/koch.py. + +#. The Koch curve can be generalized in several ways. See + http://en.wikipedia.org/wiki/Koch_snowflake for examples and + implement your favorite. diff --git a/book/06-fruitful-fn.rst b/book/06-fruitful-fn.rst new file mode 100644 index 0000000..4836314 --- /dev/null +++ b/book/06-fruitful-fn.rst @@ -0,0 +1,746 @@ +Fruitful functions +================== + +Many of the Python functions we have used, such as the math functions, +produce return values. But the functions we’ve written are all void: +they have an effect, like printing a value or moving a turtle, but they +don’t have a return value. In this chapter you will learn to write +fruitful functions. + +Return values +------------- + +Calling the function generates a return value, which we usually assign +to a variable or use as part of an expression. + +:: + + e = math.exp(1.0) + height = radius * math.sin(radians) + +The functions we have written so far are void. Speaking casually, they +have no return value; more precisely, their return value is None. + +In this chapter, we are (finally) going to write fruitful functions. The +first example is area, which returns the area of a circle with the given +radius: + +:: + + def area(radius): + a = math.pi * radius**2 + return a + +We have seen the return statement before, but in a fruitful function the +return statement includes an expression. This statement means: “Return +immediately from this function and use the following expression as a +return value.” The expression can be arbitrarily complicated, so we +could have written this function more concisely: + +:: + + def area(radius): + return math.pi * radius**2 + +On the other hand, **temporary variables** like a can make debugging +easier. + +Sometimes it is useful to have multiple return statements, one in each +branch of a conditional: + +:: + + def absolute_value(x): + if x < 0: + return -x + else: + return x + +Since these return statements are in an alternative conditional, only +one runs. + +As soon as a return statement runs, the function terminates without +executing any subsequent statements. Code that appears after a return +statement, or any other place the flow of execution can never reach, is +called **dead code**. + +In a fruitful function, it is a good idea to ensure that every possible +path through the program hits a return statement. For example: + +:: + + def absolute_value(x): + if x < 0: + return -x + if x > 0: + return x + +This function is incorrect because if x happens to be 0, neither +condition is true, and the function ends without hitting a return +statement. If the flow of execution gets to the end of a function, the +return value is None, which is not the absolute value of 0. + +:: + + >>> absolute_value(0) + None + +By the way, Python provides a built-in function called abs that computes +absolute values. + +As an exercise, write a compare function takes two values, x and y, and +returns 1 if x > y, 0 if x == y, and -1 if x < y. + +Incremental development +----------------------- + +As you write larger functions, you might find yourself spending more +time debugging. + +To deal with increasingly complex programs, you might want to try a +process called **incremental development**. The goal of incremental +development is to avoid long debugging sessions by adding and testing +only a small amount of code at a time. + +As an example, suppose you want to find the distance between two points, +given by the coordinates :math:`(x_1, y_1)` and :math:`(x_2, y_2)`. By +the Pythagorean theorem, the distance is: + +.. math:: \mathrm{distance} = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} + +The first step is to consider what a distance function should look like +in Python. In other words, what are the inputs (parameters) and what is +the output (return value)? + +In this case, the inputs are two points, which you can represent using +four numbers. The return value is the distance represented by a +floating-point value. + +Immediately you can write an outline of the function: + +:: + + def distance(x1, y1, x2, y2): + return 0.0 + +Obviously, this version doesn’t compute distances; it always returns +zero. But it is syntactically correct, and it runs, which means that you +can test it before you make it more complicated. + +To test the new function, call it with sample arguments: + +:: + + >>> distance(1, 2, 4, 6) + 0.0 + +I chose these values so that the horizontal distance is 3 and the +vertical distance is 4; that way, the result is 5, the hypotenuse of a +3-4-5 triangle. When testing a function, it is useful to know the right +answer. + +At this point we have confirmed that the function is syntactically +correct, and we can start adding code to the body. A reasonable next +step is to find the differences :math:`x_2 - x_1` and :math:`y_2 - y_1`. +The next version stores those values in temporary variables and prints +them. + +:: + + def distance(x1, y1, x2, y2): + dx = x2 - x1 + dy = y2 - y1 + print('dx is', dx) + print('dy is', dy) + return 0.0 + +If the function is working, it should display ``dx is 3`` and +``dy is 4``. If so, we know that the function is getting the right +arguments and performing the first computation correctly. If not, there +are only a few lines to check. + +Next we compute the sum of squares of dx and dy: + +:: + + def distance(x1, y1, x2, y2): + dx = x2 - x1 + dy = y2 - y1 + dsquared = dx**2 + dy**2 + print('dsquared is: ', dsquared) + return 0.0 + +Again, you would run the program at this stage and check the output +(which should be 25). Finally, you can use math.sqrt to compute and +return the result: + +:: + + def distance(x1, y1, x2, y2): + dx = x2 - x1 + dy = y2 - y1 + dsquared = dx**2 + dy**2 + result = math.sqrt(dsquared) + return result + +If that works correctly, you are done. Otherwise, you might want to +print the value of result before the return statement. + +The final version of the function doesn’t display anything when it runs; +it only returns a value. The print statements we wrote are useful for +debugging, but once you get the function working, you should remove +them. Code like that is called **scaffolding** because it is helpful for +building the program but is not part of the final product. + +When you start out, you should add only a line or two of code at a time. +As you gain more experience, you might find yourself writing and +debugging bigger chunks. Either way, incremental development can save +you a lot of debugging time. + +The key aspects of the process are: + +#. Start with a working program and make small incremental changes. At + any point, if there is an error, you should have a good idea where it + is. + +#. Use variables to hold intermediate values so you can display and + check them. + +#. Once the program is working, you might want to remove some of the + scaffolding or consolidate multiple statements into compound + expressions, but only if it does not make the program difficult to + read. + +As an exercise, use incremental development to write a function called +hypotenuse that returns the length of the hypotenuse of a right triangle +given the lengths of the other two legs as arguments. Record each stage +of the development process as you go. + +Composition +----------- + +As you should expect by now, you can call one function from within +another. As an example, we’ll write a function that takes two points, +the center of the circle and a point on the perimeter, and computes the +area of the circle. + +Assume that the center point is stored in the variables xc and yc, and +the perimeter point is in xp and yp. The first step is to find the +radius of the circle, which is the distance between the two points. We +just wrote a function, distance, that does that: + +:: + + radius = distance(xc, yc, xp, yp) + +The next step is to find the area of a circle with that radius; we just +wrote that, too: + +:: + + result = area(radius) + +Encapsulating these steps in a function, we get: + +:: + + def circle_area(xc, yc, xp, yp): + radius = distance(xc, yc, xp, yp) + result = area(radius) + return result + +The temporary variables radius and result are useful for development and +debugging, but once the program is working, we can make it more concise +by composing the function calls: + +:: + + def circle_area(xc, yc, xp, yp): + return area(distance(xc, yc, xp, yp)) + +Boolean functions +----------------- + +Functions can return booleans, which is often convenient for hiding +complicated tests inside functions. For example: + +:: + + def is_divisible(x, y): + if x % y == 0: + return True + else: + return False + +It is common to give boolean functions names that sound like yes/no +questions; ``is_divisible`` returns either True or False to indicate +whether x is divisible by y. + +Here is an example: + +:: + + >>> is_divisible(6, 4) + False + >>> is_divisible(6, 3) + True + +The result of the == operator is a boolean, so we can write the function +more concisely by returning it directly: + +:: + + def is_divisible(x, y): + return x % y == 0 + +Boolean functions are often used in conditional statements: + +:: + + if is_divisible(x, y): + print('x is divisible by y') + +It might be tempting to write something like: + +:: + + if is_divisible(x, y) == True: + print('x is divisible by y' + +But the extra comparison is unnecessary. + +As an exercise, write a function ``is_between(x, y, z)`` that returns +True if :math:`x \le y \le z` or False otherwise. + +More recursion +-------------- + +We have only covered a small subset of Python, but you might be +interested to know that this subset is a *complete* programming +language, which means that anything that can be computed can be +expressed in this language. Any program ever written could be rewritten +using only the language features you have learned so far (actually, you +would need a few commands to control devices like the mouse, disks, +etc., but that’s all). + +Proving that claim is a nontrivial exercise first accomplished by Alan +Turing, one of the first computer scientists (some would argue that he +was a mathematician, but a lot of early computer scientists started as +mathematicians). Accordingly, it is known as the Turing Thesis. For a +more complete (and accurate) discussion of the Turing Thesis, I +recommend Michael Sipser’s book *Introduction to the Theory of +Computation*. + +To give you an idea of what you can do with the tools you have learned +so far, we’ll evaluate a few recursively defined mathematical functions. +A recursive definition is similar to a circular definition, in the sense +that the definition contains a reference to the thing being defined. A +truly circular definition is not very useful: + +vorpal: + An adjective used to describe something that is vorpal. + +If you saw that definition in the dictionary, you might be annoyed. On +the other hand, if you looked up the definition of the factorial +function, denoted with the symbol :math:`!`, you might get something +like this: + +.. math:: + + \begin{aligned} + && 0! = 1 \\ + && n! = n (n-1)!\end{aligned} + +This definition says that the factorial of 0 is 1, and the factorial of +any other value, :math:`n`, is :math:`n` multiplied by the factorial of +:math:`n-1`. + +So :math:`3!` is 3 times :math:`2!`, which is 2 times :math:`1!`, which +is 1 times :math:`0!`. Putting it all together, :math:`3!` equals 3 +times 2 times 1 times 1, which is 6. + +If you can write a recursive definition of something, you can write a +Python program to evaluate it. The first step is to decide what the +parameters should be. In this case it should be clear that factorial +takes an integer: + +:: + + def factorial(n): + +If the argument happens to be 0, all we have to do is return 1: + +:: + + def factorial(n): + if n == 0: + return 1 + +Otherwise, and this is the interesting part, we have to make a recursive +call to find the factorial of :math:`n-1` and then multiply it by +:math:`n`: + +:: + + def factorial(n): + if n == 0: + return 1 + else: + recurse = factorial(n-1) + result = n * recurse + return result + +The flow of execution for this program is similar to the flow of +countdown in Section [recursion]. If we call factorial with the value 3: + +Since 3 is not 0, we take the second branch and calculate the factorial +of n-1... + + Since 2 is not 0, we take the second branch and calculate the + factorial of n-1... + + Since 1 is not 0, we take the second branch and calculate the + factorial of n-1... + + Since 0 equals 0, we take the first branch and return 1 + without making any more recursive calls. + + The return value, 1, is multiplied by :math:`n`, which is 1, and + the result is returned. + + The return value, 1, is multiplied by :math:`n`, which is 2, and the + result is returned. + +The return value (2) is multiplied by :math:`n`, which is 3, and the +result, 6, becomes the return value of the function call that started +the whole process. + +Figure [fig.stack3] shows what the stack diagram looks like for this +sequence of function calls. + +.. figure:: figs/stack3.pdf + :alt: Stack diagram. + + Stack diagram. + +The return values are shown being passed back up the stack. In each +frame, the return value is the value of result, which is the product of +n and recurse. + +In the last frame, the local variables recurse and result do not exist, +because the branch that creates them does not run. + +Leap of faith +------------- + +Following the flow of execution is one way to read programs, but it can +quickly become overwhelming. An alternative is what I call the “leap of +faith”. When you come to a function call, instead of following the flow +of execution, you *assume* that the function works correctly and returns +the right result. + +In fact, you are already practicing this leap of faith when you use +built-in functions. When you call math.cos or math.exp, you don’t +examine the bodies of those functions. You just assume that they work +because the people who wrote the built-in functions were good +programmers. + +The same is true when you call one of your own functions. For example, +in Section [boolean], we wrote a function called ``is_divisible`` that +determines whether one number is divisible by another. Once we have +convinced ourselves that this function is correct—by examining the code +and testing—we can use the function without looking at the body again. + +The same is true of recursive programs. When you get to the recursive +call, instead of following the flow of execution, you should assume that +the recursive call works (returns the correct result) and then ask +yourself, “Assuming that I can find the factorial of :math:`n-1`, can I +compute the factorial of :math:`n`?” It is clear that you can, by +multiplying by :math:`n`. + +Of course, it’s a bit strange to assume that the function works +correctly when you haven’t finished writing it, but that’s why it’s +called a leap of faith! + +One more example +---------------- + +After factorial, the most common example of a recursively defined +mathematical function is fibonacci, which has the following definition +(see http://en.wikipedia.org/wiki/Fibonacci_number): + +.. math:: + + \begin{aligned} + && \mathrm{fibonacci}(0) = 0 \\ + && \mathrm{fibonacci}(1) = 1 \\ + && \mathrm{fibonacci}(n) = \mathrm{fibonacci}(n-1) + \mathrm{fibonacci}(n-2)\end{aligned} + +Translated into Python, it looks like this: + +:: + + def fibonacci (n): + if n == 0: + return 0 + elif n == 1: + return 1 + else: + return fibonacci(n-1) + fibonacci(n-2) + +If you try to follow the flow of execution here, even for fairly small +values of :math:`n`, your head explodes. But according to the leap of +faith, if you assume that the two recursive calls work correctly, then +it is clear that you get the right result by adding them together. + +Checking types +-------------- + +What happens if we call factorial and give it 1.5 as an argument? + +:: + + >>> factorial(1.5) + RuntimeError: Maximum recursion depth exceeded + +It looks like an infinite recursion. How can that be? The function has a +base case—when n == 0. But if n is not an integer, we can *miss* the +base case and recurse forever. + +In the first recursive call, the value of n is 0.5. In the next, it is +-0.5. From there, it gets smaller (more negative), but it will never be +0. + +We have two choices. We can try to generalize the factorial function to +work with floating-point numbers, or we can make factorial check the +type of its argument. The first option is called the gamma function and +it’s a little beyond the scope of this book. So we’ll go for the second. + +We can use the built-in function isinstance to verify the type of the +argument. While we’re at it, we can also make sure the argument is +positive: + +:: + + def factorial (n): + if not isinstance(n, int): + print('Factorial is only defined for integers.') + return None + elif n < 0: + print('Factorial is not defined for negative integers.') + return None + elif n == 0: + return 1 + else: + return n * factorial(n-1) + +The first base case handles nonintegers; the second handles negative +integers. In both cases, the program prints an error message and returns +None to indicate that something went wrong: + +:: + + >>> factorial('fred') + Factorial is only defined for integers. + None + >>> factorial(-2) + Factorial is not defined for negative integers. + None + +If we get past both checks, we know that :math:`n` is positive or zero, +so we can prove that the recursion terminates. + +This program demonstrates a pattern sometimes called a **guardian**. The +first two conditionals act as guardians, protecting the code that +follows from values that might cause an error. The guardians make it +possible to prove the correctness of the code. + +In Section [raise] we will see a more flexible alternative to printing +an error message: raising an exception. + +Debugging +--------- + +Breaking a large program into smaller functions creates natural +checkpoints for debugging. If a function is not working, there are three +possibilities to consider: + +- There is something wrong with the arguments the function is getting; + a precondition is violated. + +- There is something wrong with the function; a postcondition is + violated. + +- There is something wrong with the return value or the way it is being + used. + +To rule out the first possibility, you can add a print statement at the +beginning of the function and display the values of the parameters (and +maybe their types). Or you can write code that checks the preconditions +explicitly. + +If the parameters look good, add a print statement before each return +statement and display the return value. If possible, check the result by +hand. Consider calling the function with values that make it easy to +check the result (as in Section [incremental.development]). + +If the function seems to be working, look at the function call to make +sure the return value is being used correctly (or used at all!). + +Adding print statements at the beginning and end of a function can help +make the flow of execution more visible. For example, here is a version +of factorial with print statements: + +:: + + def factorial(n): + space = ' ' * (4 * n) + print(space, 'factorial', n) + if n == 0: + print(space, 'returning 1') + return 1 + else: + recurse = factorial(n-1) + result = n * recurse + print(space, 'returning', result) + return result + +space is a string of space characters that controls the indentation of +the output. Here is the result of factorial(4) : + +:: + + factorial 4 + factorial 3 + factorial 2 + factorial 1 + factorial 0 + returning 1 + returning 1 + returning 2 + returning 6 + returning 24 + +If you are confused about the flow of execution, this kind of output can +be helpful. It takes some time to develop effective scaffolding, but a +little bit of scaffolding can save a lot of debugging. + +Glossary +-------- + +temporary variable: + A variable used to store an intermediate value in a complex + calculation. + +dead code: + Part of a program that can never run, often because it appears after + a return statement. + +incremental development: + A program development plan intended to avoid debugging by adding and + testing only a small amount of code at a time. + +scaffolding: + Code that is used during program development but is not part of the + final version. + +guardian: + A programming pattern that uses a conditional statement to check for + and handle circumstances that might cause an error. + +Exercises +--------- + +Draw a stack diagram for the following program. What does the program +print? + +:: + + def b(z): + prod = a(z, z) + print(z, prod) + return prod + + def a(x, y): + x = x + 1 + return x * y + + def c(x, y, z): + total = x + y + z + square = b(total)**2 + return square + + x = 1 + y = x + 1 + print(c(x, y+3, x+y)) + +[ackermann] + +The Ackermann function, :math:`A(m, n)`, is defined: + +.. math:: + + \begin{aligned} + A(m, n) = \begin{cases} + n+1 & \mbox{if } m = 0 \\ + A(m-1, 1) & \mbox{if } m > 0 \mbox{ and } n = 0 \\ + A(m-1, A(m, n-1)) & \mbox{if } m > 0 \mbox{ and } n > 0. + \end{cases} \end{aligned} + +See http://en.wikipedia.org/wiki/Ackermann_function. Write a function +named ack that evaluates the Ackermann function. Use your function to +evaluate ack(3, 4), which should be 125. What happens for larger values +of m and n? Solution: http://thinkpython2.com/code/ackermann.py. + +[palindrome] + +A palindrome is a word that is spelled the same backward and forward, +like “noon” and “redivider”. Recursively, a word is a palindrome if the +first and last letters are the same and the middle is a palindrome. + +The following are functions that take a string argument and return the +first, last, and middle letters: + +:: + + def first(word): + return word[0] + + def last(word): + return word[-1] + + def middle(word): + return word[1:-1] + +We’ll see how they work in Chapter [strings]. + +#. Type these functions into a file named palindrome.py and test them + out. What happens if you call middle with a string with two letters? + One letter? What about the empty string, which is written ``''`` and + contains no letters? + +#. Write a function called ``is_palindrome`` that takes a string + argument and returns True if it is a palindrome and False otherwise. + Remember that you can use the built-in function len to check the + length of a string. + +Solution: http://thinkpython2.com/code/palindrome_soln.py. + +A number, :math:`a`, is a power of :math:`b` if it is divisible by +:math:`b` and :math:`a/b` is a power of :math:`b`. Write a function +called ``is_power`` that takes parameters a and b and returns True if a +is a power of b. Note: you will have to think about the base case. + +The greatest common divisor (GCD) of :math:`a` and :math:`b` is the +largest number that divides both of them with no remainder. + +One way to find the GCD of two numbers is based on the observation that +if :math:`r` is the remainder when :math:`a` is divided by :math:`b`, +then :math:`gcd(a, +b) = gcd(b, r)`. As a base case, we can use :math:`gcd(a, 0) = a`. + +Write a function called ``gcd`` that takes parameters a and b and +returns their greatest common divisor. + +Credit: This exercise is based on an example from Abelson and Sussman’s +*Structure and Interpretation of Computer Programs*. diff --git a/book/07-iteration.rst b/book/07-iteration.rst new file mode 100644 index 0000000..005edae --- /dev/null +++ b/book/07-iteration.rst @@ -0,0 +1,474 @@ +Iteration +========= + +This chapter is about iteration, which is the ability to run a block of +statements repeatedly. We saw a kind of iteration, using recursion, in +Section [recursion]. We saw another kind, using a for loop, in +Section [repetition]. In this chapter we’ll see yet another kind, using +a while statement. But first I want to say a little more about variable +assignment. + +Reassignment +------------ + +As you may have discovered, it is legal to make more than one assignment +to the same variable. A new assignment makes an existing variable refer +to a new value (and stop referring to the old value). + +:: + + >>> x = 5 + >>> x + 5 + >>> x = 7 + >>> x + 7 + +The first time we display x, its value is 5; the second time, its value +is 7. + +Figure [fig.assign2] shows what **reassignment** looks like in a state +diagram. + +At this point I want to address a common source of confusion. Because +Python uses the equal sign (=) for assignment, it is tempting to +interpret a statement like a = b as a mathematical proposition of +equality; that is, the claim that a and b are equal. But this +interpretation is wrong. + +First, equality is a symmetric relationship and assignment is not. For +example, in mathematics, if :math:`a=7` then :math:`7=a`. But in Python, +the statement a = 7 is legal and 7 = a is not. + +Also, in mathematics, a proposition of equality is either true or false +for all time. If :math:`a=b` now, then :math:`a` will always equal +:math:`b`. In Python, an assignment statement can make two variables +equal, but they don’t have to stay that way: + +:: + + >>> a = 5 + >>> b = a # a and b are now equal + >>> a = 3 # a and b are no longer equal + >>> b + 5 + +The third line changes the value of a but does not change the value of +b, so they are no longer equal. + +Reassigning variables is often useful, but you should use it with +caution. If the values of variables change frequently, it can make the +code difficult to read and debug. + +.. figure:: figs/assign2.pdf + :alt: State diagram. + + State diagram. + +Updating variables +------------------ + +A common kind of reassignment is an **update**, where the new value of +the variable depends on the old. + +:: + + >>> x = x + 1 + +This means “get the current value of x, add one, and then update x with +the new value.” + +If you try to update a variable that doesn’t exist, you get an error, +because Python evaluates the right side before it assigns a value to x: + +:: + + >>> x = x + 1 + NameError: name 'x' is not defined + +Before you can update a variable, you have to **initialize** it, usually +with a simple assignment: + +:: + + >>> x = 0 + >>> x = x + 1 + +Updating a variable by adding 1 is called an **increment**; subtracting +1 is called a **decrement**. + +The while statement +------------------- + +Computers are often used to automate repetitive tasks. Repeating +identical or similar tasks without making errors is something that +computers do well and people do poorly. In a computer program, +repetition is also called **iteration**. + +We have already seen two functions, countdown and ``print_n``, that +iterate using recursion. Because iteration is so common, Python provides +language features to make it easier. One is the for statement we saw in +Section [repetition]. We’ll get back to that later. + +Another is the while statement. Here is a version of countdown that uses +a while statement: + +:: + + def countdown(n): + while n > 0: + print(n) + n = n - 1 + print('Blastoff!') + +You can almost read the while statement as if it were English. It means, +“While n is greater than 0, display the value of n and then decrement n. +When you get to 0, display the word Blastoff!” + +More formally, here is the flow of execution for a while statement: + +#. Determine whether the condition is true or false. + +#. If false, exit the while statement and continue execution at the next + statement. + +#. If the condition is true, run the body and then go back to step 1. + +This type of flow is called a loop because the third step loops back +around to the top. + +The body of the loop should change the value of one or more variables so +that the condition becomes false eventually and the loop terminates. +Otherwise the loop will repeat forever, which is called an **infinite +loop**. An endless source of amusement for computer scientists is the +observation that the directions on shampoo, “Lather, rinse, repeat”, are +an infinite loop. + +In the case of countdown, we can prove that the loop terminates: if n is +zero or negative, the loop never runs. Otherwise, n gets smaller each +time through the loop, so eventually we have to get to 0. + +For some other loops, it is not so easy to tell. For example: + +:: + + def sequence(n): + while n != 1: + print(n) + if n % 2 == 0: # n is even + n = n / 2 + else: # n is odd + n = n*3 + 1 + +The condition for this loop is n != 1, so the loop will continue until n +is 1, which makes the condition false. + +Each time through the loop, the program outputs the value of n and then +checks whether it is even or odd. If it is even, n is divided by 2. If +it is odd, the value of n is replaced with n\*3 + 1. For example, if the +argument passed to sequence is 3, the resulting values of n are 3, 10, +5, 16, 8, 4, 2, 1. + +Since n sometimes increases and sometimes decreases, there is no obvious +proof that n will ever reach 1, or that the program terminates. For some +particular values of n, we can prove termination. For example, if the +starting value is a power of two, n will be even every time through the +loop until it reaches 1. The previous example ends with such a sequence, +starting with 16. + +The hard question is whether we can prove that this program terminates +for *all* positive values of n. So far, no one has been able to prove it +*or* disprove it! (See http://en.wikipedia.org/wiki/Collatz_conjecture.) + +As an exercise, rewrite the function ``print_n`` from +Section [recursion] using iteration instead of recursion. + +break +----- + +Sometimes you don’t know it’s time to end a loop until you get half way +through the body. In that case you can use the break statement to jump +out of the loop. + +For example, suppose you want to take input from the user until they +type done. You could write: + +:: + + while True: + line = input('> ') + if line == 'done': + break + print(line) + + print('Done!') + +The loop condition is True, which is always true, so the loop runs until +it hits the break statement. + +Each time through, it prompts the user with an angle bracket. If the +user types done, the break statement exits the loop. Otherwise the +program echoes whatever the user types and goes back to the top of the +loop. Here’s a sample run: + +:: + + > not done + not done + > done + Done! + +This way of writing while loops is common because you can check the +condition anywhere in the loop (not just at the top) and you can express +the stop condition affirmatively (“stop when this happens”) rather than +negatively (“keep going until that happens”). + +Square roots +------------ + +Loops are often used in programs that compute numerical results by +starting with an approximate answer and iteratively improving it. + +For example, one way of computing square roots is Newton’s method. +Suppose that you want to know the square root of :math:`a`. If you start +with almost any estimate, :math:`x`, you can compute a better estimate +with the following formula: + +.. math:: y = \frac{x + a/x}{2} + +For example, if :math:`a` is 4 and :math:`x` is 3: + +:: + + >>> a = 4 + >>> x = 3 + >>> y = (x + a/x) / 2 + >>> y + 2.16666666667 + +The result is closer to the correct answer (:math:`\sqrt{4} = 2`). If we +repeat the process with the new estimate, it gets even closer: + +:: + + >>> x = y + >>> y = (x + a/x) / 2 + >>> y + 2.00641025641 + +After a few more updates, the estimate is almost exact: + +:: + + >>> x = y + >>> y = (x + a/x) / 2 + >>> y + 2.00001024003 + >>> x = y + >>> y = (x + a/x) / 2 + >>> y + 2.00000000003 + +In general we don’t know ahead of time how many steps it takes to get to +the right answer, but we know when we get there because the estimate +stops changing: + +:: + + >>> x = y + >>> y = (x + a/x) / 2 + >>> y + 2.0 + >>> x = y + >>> y = (x + a/x) / 2 + >>> y + 2.0 + +When y == x, we can stop. Here is a loop that starts with an initial +estimate, x, and improves it until it stops changing: + +:: + + while True: + print(x) + y = (x + a/x) / 2 + if y == x: + break + x = y + +For most values of a this works fine, but in general it is dangerous to +test float equality. Floating-point values are only approximately right: +most rational numbers, like :math:`1/3`, and irrational numbers, like +:math:`\sqrt{2}`, can’t be represented exactly with a float. + +Rather than checking whether x and y are exactly equal, it is safer to +use the built-in function abs to compute the absolute value, or +magnitude, of the difference between them: + +:: + + if abs(y-x) < epsilon: + break + +Where ``epsilon`` has a value like 0.0000001 that determines how close +is close enough. + +Algorithms +---------- + +Newton’s method is an example of an **algorithm**: it is a mechanical +process for solving a category of problems (in this case, computing +square roots). + +To understand what an algorithm is, it might help to start with +something that is not an algorithm. When you learned to multiply +single-digit numbers, you probably memorized the multiplication table. +In effect, you memorized 100 specific solutions. That kind of knowledge +is not algorithmic. + +But if you were “lazy”, you might have learned a few tricks. For +example, to find the product of :math:`n` and 9, you can write +:math:`n-1` as the first digit and :math:`10-n` as the second digit. +This trick is a general solution for multiplying any single-digit number +by 9. That’s an algorithm! + +Similarly, the techniques you learned for addition with carrying, +subtraction with borrowing, and long division are all algorithms. One of +the characteristics of algorithms is that they do not require any +intelligence to carry out. They are mechanical processes where each step +follows from the last according to a simple set of rules. + +Executing algorithms is boring, but designing them is interesting, +intellectually challenging, and a central part of computer science. + +Some of the things that people do naturally, without difficulty or +conscious thought, are the hardest to express algorithmically. +Understanding natural language is a good example. We all do it, but so +far no one has been able to explain *how* we do it, at least not in the +form of an algorithm. + +Debugging +--------- + +As you start writing bigger programs, you might find yourself spending +more time debugging. More code means more chances to make an error and +more places for bugs to hide. + +One way to cut your debugging time is “debugging by bisection”. For +example, if there are 100 lines in your program and you check them one +at a time, it would take 100 steps. + +Instead, try to break the problem in half. Look at the middle of the +program, or near it, for an intermediate value you can check. Add a +print statement (or something else that has a verifiable effect) and run +the program. + +If the mid-point check is incorrect, there must be a problem in the +first half of the program. If it is correct, the problem is in the +second half. + +Every time you perform a check like this, you halve the number of lines +you have to search. After six steps (which is fewer than 100), you would +be down to one or two lines of code, at least in theory. + +In practice it is not always clear what the “middle of the program” is +and not always possible to check it. It doesn’t make sense to count +lines and find the exact midpoint. Instead, think about places in the +program where there might be errors and places where it is easy to put a +check. Then choose a spot where you think the chances are about the same +that the bug is before or after the check. + +Glossary +-------- + +reassignment: + Assigning a new value to a variable that already exists. + +update: + An assignment where the new value of the variable depends on the + old. + +initialization: + An assignment that gives an initial value to a variable that will be + updated. + +increment: + An update that increases the value of a variable (often by one). + +decrement: + An update that decreases the value of a variable. + +iteration: + Repeated execution of a set of statements using either a recursive + function call or a loop. + +infinite loop: + A loop in which the terminating condition is never satisfied. + +algorithm: + A general process for solving a category of problems. + +Exercises +--------- + +Copy the loop from Section [squareroot] and encapsulate it in a function +called ``mysqrt`` that takes a as a parameter, chooses a reasonable +value of x, and returns an estimate of the square root of a. + +To test it, write a function named ``test_square_root`` that prints a +table like this: + +:: + + a mysqrt(a) math.sqrt(a) diff + - --------- ------------ ---- + 1.0 1.0 1.0 0.0 + 2.0 1.41421356237 1.41421356237 2.22044604925e-16 + 3.0 1.73205080757 1.73205080757 0.0 + 4.0 2.0 2.0 0.0 + 5.0 2.2360679775 2.2360679775 0.0 + 6.0 2.44948974278 2.44948974278 0.0 + 7.0 2.64575131106 2.64575131106 0.0 + 8.0 2.82842712475 2.82842712475 4.4408920985e-16 + 9.0 3.0 3.0 0.0 + +The first column is a number, :math:`a`; the second column is the square +root of :math:`a` computed with ``mysqrt``; the third column is the +square root computed by math.sqrt; the fourth column is the absolute +value of the difference between the two estimates. + +The built-in function eval takes a string and evaluates it using the +Python interpreter. For example: + +:: + + >>> eval('1 + 2 * 3') + 7 + >>> import math + >>> eval('math.sqrt(5)') + 2.2360679774997898 + >>> eval('type(math.pi)') + + +Write a function called ``eval_loop`` that iteratively prompts the user, +takes the resulting input and evaluates it using eval, and prints the +result. + +It should continue until the user enters ``'done'``, and then return the +value of the last expression it evaluated. + +The mathematician Srinivasa Ramanujan found an infinite series that can +be used to generate a numerical approximation of :math:`1 / \pi`: + +.. math:: + + \frac{1}{\pi} = \frac{2\sqrt{2}}{9801} + \sum^\infty_{k=0} \frac{(4k)!(1103+26390k)}{(k!)^4 396^{4k}} + +Write a function called ``estimate_pi`` that uses this formula to +compute and return an estimate of :math:`\pi`. It should use a while +loop to compute terms of the summation until the last term is smaller +than 1e-15 (which is Python notation for :math:`10^{-15}`). You can +check the result by comparing it to math.pi. + +Solution: http://thinkpython2.com/code/pi.py. diff --git a/book/08-string.rst b/book/08-string.rst new file mode 100644 index 0000000..552b491 --- /dev/null +++ b/book/08-string.rst @@ -0,0 +1,692 @@ +Strings +======= + +Strings are not like integers, floats, and booleans. A string is a +**sequence**, which means it is an ordered collection of other values. +In this chapter you’ll see how to access the characters that make up a +string, and you’ll learn about some of the methods strings provide. + +A string is a sequence +---------------------- + +A string is a sequence of characters. You can access the characters one +at a time with the bracket operator: + +:: + + >>> fruit = 'banana' + >>> letter = fruit[1] + +The second statement selects character number 1 from fruit and assigns +it to letter. + +The expression in brackets is called an **index**. The index indicates +which character in the sequence you want (hence the name). + +But you might not get what you expect: + +:: + + >>> letter + 'a' + +For most people, the first letter of ``'banana'`` is b, not a. But for +computer scientists, the index is an offset from the beginning of the +string, and the offset of the first letter is zero. + +:: + + >>> letter = fruit[0] + >>> letter + 'b' + +So b is the 0th letter (“zero-eth”) of ``'banana'``, a is the 1th letter +(“one-eth”), and n is the 2th letter (“two-eth”). + +As an index you can use an expression that contains variables and +operators: + +:: + + >>> i = 1 + >>> fruit[i] + 'a' + >>> fruit[i+1] + 'n' + +But the value of the index has to be an integer. Otherwise you get: + +:: + + >>> letter = fruit[1.5] + TypeError: string indices must be integers + +len +--- + +len is a built-in function that returns the number of characters in a +string: + +:: + + >>> fruit = 'banana' + >>> len(fruit) + 6 + +To get the last letter of a string, you might be tempted to try +something like this: + +:: + + >>> length = len(fruit) + >>> last = fruit[length] + IndexError: string index out of range + +The reason for the IndexError is that there is no letter in ’banana’ +with the index 6. Since we started counting at zero, the six letters are +numbered 0 to 5. To get the last character, you have to subtract 1 from +length: + +:: + + >>> last = fruit[length-1] + >>> last + 'a' + +Or you can use negative indices, which count backward from the end of +the string. The expression fruit[-1] yields the last letter, fruit[-2] +yields the second to last, and so on. + +Traversal with a for loop +------------------------- + +A lot of computations involve processing a string one character at a +time. Often they start at the beginning, select each character in turn, +do something to it, and continue until the end. This pattern of +processing is called a **traversal**. One way to write a traversal is +with a while loop: + +:: + + index = 0 + while index < len(fruit): + letter = fruit[index] + print(letter) + index = index + 1 + +This loop traverses the string and displays each letter on a line by +itself. The loop condition is index < len(fruit), so when index is equal +to the length of the string, the condition is false, and the body of the +loop doesn’t run. The last character accessed is the one with the index +len(fruit)-1, which is the last character in the string. + +As an exercise, write a function that takes a string as an argument and +displays the letters backward, one per line. + +Another way to write a traversal is with a for loop: + +:: + + for letter in fruit: + print(letter) + +Each time through the loop, the next character in the string is assigned +to the variable letter. The loop continues until no characters are left. + +The following example shows how to use concatenation (string addition) +and a for loop to generate an abecedarian series (that is, in +alphabetical order). In Robert McCloskey’s book *Make Way for +Ducklings*, the names of the ducklings are Jack, Kack, Lack, Mack, Nack, +Ouack, Pack, and Quack. This loop outputs these names in order: + +:: + + prefixes = 'JKLMNOPQ' + suffix = 'ack' + + for letter in prefixes: + print(letter + suffix) + +The output is: + +:: + + Jack + Kack + Lack + Mack + Nack + Oack + Pack + Qack + +Of course, that’s not quite right because “Ouack” and “Quack” are +misspelled. As an exercise, modify the program to fix this error. + +String slices +------------- + +A segment of a string is called a **slice**. Selecting a slice is +similar to selecting a character: + +:: + + >>> s = 'Monty Python' + >>> s[0:5] + 'Monty' + >>> s[6:12] + 'Python' + +The operator returns the part of the string from the “n-eth” character +to the “m-eth” character, including the first but excluding the last. +This behavior is counterintuitive, but it might help to imagine the +indices pointing *between* the characters, as in Figure [fig.banana]. + +.. figure:: figs/banana.pdf + :alt: Slice indices. + + Slice indices. + +If you omit the first index (before the colon), the slice starts at the +beginning of the string. If you omit the second index, the slice goes to +the end of the string: + +:: + + >>> fruit = 'banana' + >>> fruit[:3] + 'ban' + >>> fruit[3:] + 'ana' + +If the first index is greater than or equal to the second the result is +an **empty string**, represented by two quotation marks: + +:: + + >>> fruit = 'banana' + >>> fruit[3:3] + '' + +An empty string contains no characters and has length 0, but other than +that, it is the same as any other string. + +Continuing this example, what do you think fruit[:] means? Try it and +see. + +Strings are immutable +--------------------- + +It is tempting to use the operator on the left side of an assignment, +with the intention of changing a character in a string. For example: + +:: + + >>> greeting = 'Hello, world!' + >>> greeting[0] = 'J' + TypeError: 'str' object does not support item assignment + +The “object” in this case is the string and the “item” is the character +you tried to assign. For now, an object is the same thing as a value, +but we will refine that definition later (Section [equivalence]). + +The reason for the error is that strings are **immutable**, which means +you can’t change an existing string. The best you can do is create a new +string that is a variation on the original: + +:: + + >>> greeting = 'Hello, world!' + >>> new_greeting = 'J' + greeting[1:] + >>> new_greeting + 'Jello, world!' + +This example concatenates a new first letter onto a slice of greeting. +It has no effect on the original string. + +Searching +--------- + +What does the following function do? + +:: + + def find(word, letter): + index = 0 + while index < len(word): + if word[index] == letter: + return index + index = index + 1 + return -1 + +In a sense, find is the inverse of the operator. Instead of taking an +index and extracting the corresponding character, it takes a character +and finds the index where that character appears. If the character is +not found, the function returns -1. + +This is the first example we have seen of a return statement inside a +loop. If word[index] == letter, the function breaks out of the loop and +returns immediately. + +If the character doesn’t appear in the string, the program exits the +loop normally and returns -1. + +This pattern of computation—traversing a sequence and returning when we +find what we are looking for—is called a **search**. + +As an exercise, modify find so that it has a third parameter, the index +in word where it should start looking. + +Looping and counting +-------------------- + +The following program counts the number of times the letter a appears in +a string: + +:: + + word = 'banana' + count = 0 + for letter in word: + if letter == 'a': + count = count + 1 + print(count) + +This program demonstrates another pattern of computation called a +**counter**. The variable count is initialized to 0 and then incremented +each time an a is found. When the loop exits, count contains the +result—the total number of a’s. + +As an exercise, encapsulate this code in a function named count, and +generalize it so that it accepts the string and the letter as arguments. + +Then rewrite the function so that instead of traversing the string, it +uses the three-parameter version of find from the previous section. + +String methods +-------------- + +Strings provide methods that perform a variety of useful operations. A +method is similar to a function—it takes arguments and returns a +value—but the syntax is different. For example, the method upper takes a +string and returns a new string with all uppercase letters. + +Instead of the function syntax upper(word), it uses the method syntax +word.upper(). + +:: + + >>> word = 'banana' + >>> new_word = word.upper() + >>> new_word + 'BANANA' + +This form of dot notation specifies the name of the method, upper, and +the name of the string to apply the method to, word. The empty +parentheses indicate that this method takes no arguments. + +A method call is called an **invocation**; in this case, we would say +that we are invoking upper on word. + +As it turns out, there is a string method named find that is remarkably +similar to the function we wrote: + +:: + + >>> word = 'banana' + >>> index = word.find('a') + >>> index + 1 + +In this example, we invoke find on word and pass the letter we are +looking for as a parameter. + +Actually, the find method is more general than our function; it can find +substrings, not just characters: + +:: + + >>> word.find('na') + 2 + +By default, find starts at the beginning of the string, but it can take +a second argument, the index where it should start: + +:: + + >>> word.find('na', 3) + 4 + +This is an example of an **optional argument**; find can also take a +third argument, the index where it should stop: + +:: + + >>> name = 'bob' + >>> name.find('b', 1, 2) + -1 + +This search fails because b does not appear in the index range from 1 to +2, not including 2. Searching up to, but not including, the second index +makes find consistent with the slice operator. + +The in operator +--------------- + +The word in is a boolean operator that takes two strings and returns +True if the first appears as a substring in the second: + +:: + + >>> 'a' in 'banana' + True + >>> 'seed' in 'banana' + False + +For example, the following function prints all the letters from word1 +that also appear in word2: + +:: + + def in_both(word1, word2): + for letter in word1: + if letter in word2: + print(letter) + +With well-chosen variable names, Python sometimes reads like English. +You could read this loop, “for (each) letter in (the first) word, if +(the) letter (appears) in (the second) word, print (the) letter.” + +Here’s what you get if you compare apples and oranges: + +:: + + >>> in_both('apples', 'oranges') + a + e + s + +String comparison +----------------- + +The relational operators work on strings. To see if two strings are +equal: + +:: + + if word == 'banana': + print('All right, bananas.') + +Other relational operations are useful for putting words in alphabetical +order: + +:: + + if word < 'banana': + print('Your word, ' + word + ', comes before banana.') + elif word > 'banana': + print('Your word, ' + word + ', comes after banana.') + else: + print('All right, bananas.') + +Python does not handle uppercase and lowercase letters the same way +people do. All the uppercase letters come before all the lowercase +letters, so: + +:: + + Your word, Pineapple, comes before banana. + +A common way to address this problem is to convert strings to a standard +format, such as all lowercase, before performing the comparison. Keep +that in mind in case you have to defend yourself against a man armed +with a Pineapple. + +Debugging +--------- + +When you use indices to traverse the values in a sequence, it is tricky +to get the beginning and end of the traversal right. Here is a function +that is supposed to compare two words and return True if one of the +words is the reverse of the other, but it contains two errors: + +:: + + def is_reverse(word1, word2): + if len(word1) != len(word2): + return False + + i = 0 + j = len(word2) + + while j > 0: + if word1[i] != word2[j]: + return False + i = i+1 + j = j-1 + + return True + +The first if statement checks whether the words are the same length. If +not, we can return False immediately. Otherwise, for the rest of the +function, we can assume that the words are the same length. This is an +example of the guardian pattern in Section [guardian]. + +i and j are indices: i traverses word1 forward while j traverses word2 +backward. If we find two letters that don’t match, we can return False +immediately. If we get through the whole loop and all the letters match, +we return True. + +If we test this function with the words “pots” and “stop”, we expect the +return value True, but we get an IndexError: + +:: + + >>> is_reverse('pots', 'stop') + ... + File "reverse.py", line 15, in is_reverse + if word1[i] != word2[j]: + IndexError: string index out of range + +For debugging this kind of error, my first move is to print the values +of the indices immediately before the line where the error appears. + +:: + + while j > 0: + print(i, j) # print here + + if word1[i] != word2[j]: + return False + i = i+1 + j = j-1 + +Now when I run the program again, I get more information: + +:: + + >>> is_reverse('pots', 'stop') + 0 4 + ... + IndexError: string index out of range + +The first time through the loop, the value of j is 4, which is out of +range for the string ``'pots'``. The index of the last character is 3, +so the initial value for j should be len(word2)-1. + +If I fix that error and run the program again, I get: + +:: + + >>> is_reverse('pots', 'stop') + 0 3 + 1 2 + 2 1 + True + +This time we get the right answer, but it looks like the loop only ran +three times, which is suspicious. To get a better idea of what is +happening, it is useful to draw a state diagram. During the first +iteration, the frame for ``is_reverse`` is shown in Figure [fig.state4]. + +.. figure:: figs/state4.pdf + :alt: State diagram. + + State diagram. + +I took some license by arranging the variables in the frame and adding +dotted lines to show that the values of i and j indicate characters in +word1 and word2. + +Starting with this diagram, run the program on paper, changing the +values of i and j during each iteration. Find and fix the second error +in this function. [isreverse] + +Glossary +-------- + +object: + Something a variable can refer to. For now, you can use “object” and + “value” interchangeably. + +sequence: + An ordered collection of values where each value is identified by an + integer index. + +item: + One of the values in a sequence. + +index: + An integer value used to select an item in a sequence, such as a + character in a string. In Python indices start from 0. + +slice: + A part of a string specified by a range of indices. + +empty string: + A string with no characters and length 0, represented by two + quotation marks. + +immutable: + The property of a sequence whose items cannot be changed. + +traverse: + To iterate through the items in a sequence, performing a similar + operation on each. + +search: + A pattern of traversal that stops when it finds what it is looking + for. + +counter: + A variable used to count something, usually initialized to zero and + then incremented. + +invocation: + A statement that calls a method. + +optional argument: + A function or method argument that is not required. + +Exercises +--------- + +Read the documentation of the string methods at +http://docs.python.org/3/library/stdtypes.html#string-methods. You might +want to experiment with some of them to make sure you understand how +they work. strip and replace are particularly useful. + +The documentation uses a syntax that might be confusing. For example, in +``find(sub[, start[, end]])``, the brackets indicate optional arguments. +So sub is required, but start is optional, and if you include start, +then end is optional. + +There is a string method called count that is similar to the function in +Section [counter]. Read the documentation of this method and write an +invocation that counts the number of a’s in ``'banana'``. + +A string slice can take a third index that specifies the “step size”; +that is, the number of spaces between successive characters. A step size +of 2 means every other character; 3 means every third, etc. + +:: + + >>> fruit = 'banana' + >>> fruit[0:5:2] + 'bnn' + +A step size of -1 goes through the word backwards, so the slice +``[::-1]`` generates a reversed string. + +Use this idiom to write a one-line version of ``is_palindrome`` from +Exercise [palindrome]. + +The following functions are all *intended* to check whether a string +contains any lowercase letters, but at least some of them are wrong. For +each function, describe what the function actually does (assuming that +the parameter is a string). + +:: + + def any_lowercase1(s): + for c in s: + if c.islower(): + return True + else: + return False + + def any_lowercase2(s): + for c in s: + if 'c'.islower(): + return 'True' + else: + return 'False' + + def any_lowercase3(s): + for c in s: + flag = c.islower() + return flag + + def any_lowercase4(s): + flag = False + for c in s: + flag = flag or c.islower() + return flag + + def any_lowercase5(s): + for c in s: + if not c.islower(): + return False + return True + +[exrotate] A Caesar cypher is a weak form of encryption that involves +“rotating” each letter by a fixed number of places. To rotate a letter +means to shift it through the alphabet, wrapping around to the beginning +if necessary, so ’A’ rotated by 3 is ’D’ and ’Z’ rotated by 1 is ’A’. + +To rotate a word, rotate each letter by the same amount. For example, +“cheer” rotated by 7 is “jolly” and “melon” rotated by -10 is “cubed”. +In the movie *2001: A Space Odyssey*, the ship computer is called HAL, +which is IBM rotated by -1. + +Write a function called ``rotate_word`` that takes a string and an +integer as parameters, and returns a new string that contains the +letters from the original string rotated by the given amount. + +You might want to use the built-in function ord, which converts a +character to a numeric code, and chr, which converts numeric codes to +characters. Letters of the alphabet are encoded in alphabetical order, +so for example: + +:: + + >>> ord('c') - ord('a') + 2 + +Because ``'c'`` is the two-eth letter of the alphabet. But beware: the +numeric codes for upper case letters are different. + +Potentially offensive jokes on the Internet are sometimes encoded in +ROT13, which is a Caesar cypher with rotation 13. If you are not easily +offended, find and decode some of them. Solution: +http://thinkpython2.com/code/rotate.py. diff --git a/book/09-case-word.rst b/book/09-case-word.rst new file mode 100644 index 0000000..713f6b0 --- /dev/null +++ b/book/09-case-word.rst @@ -0,0 +1,400 @@ +Case study: word play +===================== + +This chapter presents the second case study, which involves solving word +puzzles by searching for words that have certain properties. For +example, we’ll find the longest palindromes in English and search for +words whose letters appear in alphabetical order. And I will present +another program development plan: reduction to a previously solved +problem. + +Reading word lists +------------------ + +For the exercises in this chapter we need a list of English words. There +are lots of word lists available on the Web, but the one most suitable +for our purpose is one of the word lists collected and contributed to +the public domain by Grady Ward as part of the Moby lexicon project (see +http://wikipedia.org/wiki/Moby_Project). It is a list of 113,809 +official crosswords; that is, words that are considered valid in +crossword puzzles and other word games. In the Moby collection, the +filename is 113809of.fic; you can download a copy, with the simpler name +words.txt, from http://thinkpython2.com/code/words.txt. + +This file is in plain text, so you can open it with a text editor, but +you can also read it from Python. The built-in function open takes the +name of the file as a parameter and returns a **file object** you can +use to read the file. + +:: + + >>> fin = open('words.txt') + +fin is a common name for a file object used for input. The file object +provides several methods for reading, including readline, which reads +characters from the file until it gets to a newline and returns the +result as a string: + +:: + + >>> fin.readline() + 'aa\r\n' + +The first word in this particular list is “aa”, which is a kind of lava. +The sequence ``\r\n`` represents two whitespace characters, a carriage +return and a newline, that separate this word from the next. + +The file object keeps track of where it is in the file, so if you call +readline again, you get the next word: + +:: + + >>> fin.readline() + 'aah\r\n' + +The next word is “aah”, which is a perfectly legitimate word, so stop +looking at me like that. Or, if it’s the whitespace that’s bothering +you, we can get rid of it with the string method strip: + +:: + + >>> line = fin.readline() + >>> word = line.strip() + >>> word + 'aahed' + +You can also use a file object as part of a for loop. This program reads +words.txt and prints each word, one per line: + +:: + + fin = open('words.txt') + for line in fin: + word = line.strip() + print(word) + +Exercises +--------- + +There are solutions to these exercises in the next section. You should +at least attempt each one before you read the solutions. + +Write a program that reads words.txt and prints only the words with more +than 20 characters (not counting whitespace). + +In 1939 Ernest Vincent Wright published a 50,000 word novel called +*Gadsby* that does not contain the letter “e”. Since “e” is the most +common letter in English, that’s not easy to do. + +In fact, it is difficult to construct a solitary thought without using +that most common symbol. It is slow going at first, but with caution and +hours of training you can gradually gain facility. + +All right, I’ll stop now. + +Write a function called ``has_no_e`` that returns True if the given word +doesn’t have the letter “e” in it. + +Modify your program from the previous section to print only the words +that have no “e” and compute the percentage of the words in the list +that have no “e”. + +Write a function named avoids that takes a word and a string of +forbidden letters, and that returns True if the word doesn’t use any of +the forbidden letters. + +Modify your program to prompt the user to enter a string of forbidden +letters and then print the number of words that don’t contain any of +them. Can you find a combination of 5 forbidden letters that excludes +the smallest number of words? + +Write a function named ``uses_only`` that takes a word and a string of +letters, and that returns True if the word contains only letters in the +list. Can you make a sentence using only the letters acefhlo? Other than +“Hoe alfalfa?” + +Write a function named ``uses_all`` that takes a word and a string of +required letters, and that returns True if the word uses all the +required letters at least once. How many words are there that use all +the vowels aeiou? How about aeiouy? + +Write a function called ``is_abecedarian`` that returns True if the +letters in a word appear in alphabetical order (double letters are ok). +How many abecedarian words are there? + +Search +------ + +All of the exercises in the previous section have something in common; +they can be solved with the search pattern we saw in Section [find]. The +simplest example is: + +:: + + def has_no_e(word): + for letter in word: + if letter == 'e': + return False + return True + +The for loop traverses the characters in word. If we find the letter +“e”, we can immediately return False; otherwise we have to go to the +next letter. If we exit the loop normally, that means we didn’t find an +“e”, so we return True. + +You could write this function more concisely using the in operator, but +I started with this version because it demonstrates the logic of the +search pattern. + +is a more general version of ``has_no_e`` but it has the same structure: + +:: + + def avoids(word, forbidden): + for letter in word: + if letter in forbidden: + return False + return True + +We can return False as soon as we find a forbidden letter; if we get to +the end of the loop, we return True. + +``uses_only`` is similar except that the sense of the condition is +reversed: + +:: + + def uses_only(word, available): + for letter in word: + if letter not in available: + return False + return True + +Instead of a list of forbidden letters, we have a list of available +letters. If we find a letter in word that is not in available, we can +return False. + +``uses_all`` is similar except that we reverse the role of the word and +the string of letters: + +:: + + def uses_all(word, required): + for letter in required: + if letter not in word: + return False + return True + +Instead of traversing the letters in word, the loop traverses the +required letters. If any of the required letters do not appear in the +word, we can return False. + +If you were really thinking like a computer scientist, you would have +recognized that ``uses_all`` was an instance of a previously solved +problem, and you would have written: + +:: + + def uses_all(word, required): + return uses_only(required, word) + +This is an example of a program development plan called **reduction to a +previously solved problem**, which means that you recognize the problem +you are working on as an instance of a solved problem and apply an +existing solution. + +Looping with indices +-------------------- + +I wrote the functions in the previous section with for loops because I +only needed the characters in the strings; I didn’t have to do anything +with the indices. + +For ``is_abecedarian`` we have to compare adjacent letters, which is a +little tricky with a for loop: + +:: + + def is_abecedarian(word): + previous = word[0] + for c in word: + if c < previous: + return False + previous = c + return True + +An alternative is to use recursion: + +:: + + def is_abecedarian(word): + if len(word) <= 1: + return True + if word[0] > word[1]: + return False + return is_abecedarian(word[1:]) + +Another option is to use a while loop: + +:: + + def is_abecedarian(word): + i = 0 + while i < len(word)-1: + if word[i+1] < word[i]: + return False + i = i+1 + return True + +The loop starts at i=0 and ends when i=len(word)-1. Each time through +the loop, it compares the :math:`i`\ th character (which you can think +of as the current character) to the :math:`i+1`\ th character (which you +can think of as the next). + +If the next character is less than (alphabetically before) the current +one, then we have discovered a break in the abecedarian trend, and we +return False. + +If we get to the end of the loop without finding a fault, then the word +passes the test. To convince yourself that the loop ends correctly, +consider an example like ``'flossy'``. The length of the word is 6, so +the last time the loop runs is when i is 4, which is the index of the +second-to-last character. On the last iteration, it compares the +second-to-last character to the last, which is what we want. + +Here is a version of ``is_palindrome`` (see Exercise [palindrome]) that +uses two indices; one starts at the beginning and goes up; the other +starts at the end and goes down. + +:: + + def is_palindrome(word): + i = 0 + j = len(word)-1 + + while i>> cheeses = ['Cheddar', 'Edam', 'Gouda'] + >>> numbers = [42, 123] + >>> empty = [] + >>> print(cheeses, numbers, empty) + ['Cheddar', 'Edam', 'Gouda'] [42, 123] [] + +Lists are mutable +----------------- + +The syntax for accessing the elements of a list is the same as for +accessing the characters of a string—the bracket operator. The +expression inside the brackets specifies the index. Remember that the +indices start at 0: + +:: + + >>> cheeses[0] + 'Cheddar' + +Unlike strings, lists are mutable. When the bracket operator appears on +the left side of an assignment, it identifies the element of the list +that will be assigned. + +:: + + >>> numbers = [42, 123] + >>> numbers[1] = 5 + >>> numbers + [42, 5] + +The one-eth element of numbers, which used to be 123, is now 5. + +Figure [fig.liststate] shows the state diagram for cheeses, numbers and +empty: + +.. figure:: figs/liststate.pdf + :alt: State diagram. + + State diagram. + +Lists are represented by boxes with the word “list” outside and the +elements of the list inside. cheeses refers to a list with three +elements indexed 0, 1 and 2. numbers contains two elements; the diagram +shows that the value of the second element has been reassigned from 123 +to 5. empty refers to a list with no elements. + +List indices work the same way as string indices: + +- Any integer expression can be used as an index. + +- If you try to read or write an element that does not exist, you get + an IndexError. + +- If an index has a negative value, it counts backward from the end of + the list. + +The in operator also works on lists. + +:: + + >>> cheeses = ['Cheddar', 'Edam', 'Gouda'] + >>> 'Edam' in cheeses + True + >>> 'Brie' in cheeses + False + +Traversing a list +----------------- + +The most common way to traverse the elements of a list is with a for +loop. The syntax is the same as for strings: + +:: + + for cheese in cheeses: + print(cheese) + +This works well if you only need to read the elements of the list. But +if you want to write or update the elements, you need the indices. A +common way to do that is to combine the built-in functions range and +len: + +:: + + for i in range(len(numbers)): + numbers[i] = numbers[i] * 2 + +This loop traverses the list and updates each element. len returns the +number of elements in the list. range returns a list of indices from 0 +to :math:`n-1`, where :math:`n` is the length of the list. Each time +through the loop i gets the index of the next element. The assignment +statement in the body uses i to read the old value of the element and to +assign the new value. + +A for loop over an empty list never runs the body: + +:: + + for x in []: + print('This never happens.') + +Although a list can contain another list, the nested list still counts +as a single element. The length of this list is four: + +:: + + ['spam', 1, ['Brie', 'Roquefort', 'Pol le Veq'], [1, 2, 3]] + +List operations +--------------- + +The + operator concatenates lists: + +:: + + >>> a = [1, 2, 3] + >>> b = [4, 5, 6] + >>> c = a + b + >>> c + [1, 2, 3, 4, 5, 6] + +The operator repeats a list a given number of times: + +:: + + >>> [0] * 4 + [0, 0, 0, 0] + >>> [1, 2, 3] * 3 + [1, 2, 3, 1, 2, 3, 1, 2, 3] + +The first example repeats four times. The second example repeats the +list three times. + +List slices +----------- + +The slice operator also works on lists: + +:: + + >>> t = ['a', 'b', 'c', 'd', 'e', 'f'] + >>> t[1:3] + ['b', 'c'] + >>> t[:4] + ['a', 'b', 'c', 'd'] + >>> t[3:] + ['d', 'e', 'f'] + +If you omit the first index, the slice starts at the beginning. If you +omit the second, the slice goes to the end. So if you omit both, the +slice is a copy of the whole list. + +:: + + >>> t[:] + ['a', 'b', 'c', 'd', 'e', 'f'] + +Since lists are mutable, it is often useful to make a copy before +performing operations that modify lists. + +A slice operator on the left side of an assignment can update multiple +elements: + +:: + + >>> t = ['a', 'b', 'c', 'd', 'e', 'f'] + >>> t[1:3] = ['x', 'y'] + >>> t + ['a', 'x', 'y', 'd', 'e', 'f'] + +List methods +------------ + +Python provides methods that operate on lists. For example, append adds +a new element to the end of a list: + +:: + + >>> t = ['a', 'b', 'c'] + >>> t.append('d') + >>> t + ['a', 'b', 'c', 'd'] + +extend takes a list as an argument and appends all of the elements: + +:: + + >>> t1 = ['a', 'b', 'c'] + >>> t2 = ['d', 'e'] + >>> t1.extend(t2) + >>> t1 + ['a', 'b', 'c', 'd', 'e'] + +This example leaves t2 unmodified. + +sort arranges the elements of the list from low to high: + +:: + + >>> t = ['d', 'c', 'e', 'b', 'a'] + >>> t.sort() + >>> t + ['a', 'b', 'c', 'd', 'e'] + +Most list methods are void; they modify the list and return None. If you +accidentally write t = t.sort(), you will be disappointed with the +result. + +Map, filter and reduce +---------------------- + +To add up all the numbers in a list, you can use a loop like this: + +:: + + def add_all(t): + total = 0 + for x in t: + total += x + return total + +total is initialized to 0. Each time through the loop, x gets one +element from the list. The += operator provides a short way to update a +variable. This **augmented assignment statement**, + +:: + + total += x + +is equivalent to + +:: + + total = total + x + +As the loop runs, total accumulates the sum of the elements; a variable +used this way is sometimes called an **accumulator**. + +Adding up the elements of a list is such a common operation that Python +provides it as a built-in function, sum: + +:: + + >>> t = [1, 2, 3] + >>> sum(t) + 6 + +An operation like this that combines a sequence of elements into a +single value is sometimes called **reduce**. + +Sometimes you want to traverse one list while building another. For +example, the following function takes a list of strings and returns a +new list that contains capitalized strings: + +:: + + def capitalize_all(t): + res = [] + for s in t: + res.append(s.capitalize()) + return res + +res is initialized with an empty list; each time through the loop, we +append the next element. So res is another kind of accumulator. + +An operation like ``capitalize_all`` is sometimes called a **map** +because it “maps” a function (in this case the method capitalize) onto +each of the elements in a sequence. + +Another common operation is to select some of the elements from a list +and return a sublist. For example, the following function takes a list +of strings and returns a list that contains only the uppercase strings: + +:: + + def only_upper(t): + res = [] + for s in t: + if s.isupper(): + res.append(s) + return res + +isupper is a string method that returns True if the string contains only +upper case letters. + +An operation like ``only_upper`` is called a **filter** because it +selects some of the elements and filters out the others. + +Most common list operations can be expressed as a combination of map, +filter and reduce. + +Deleting elements +----------------- + +There are several ways to delete elements from a list. If you know the +index of the element you want, you can use pop: + +:: + + >>> t = ['a', 'b', 'c'] + >>> x = t.pop(1) + >>> t + ['a', 'c'] + >>> x + 'b' + +pop modifies the list and returns the element that was removed. If you +don’t provide an index, it deletes and returns the last element. + +If you don’t need the removed value, you can use the del operator: + +:: + + >>> t = ['a', 'b', 'c'] + >>> del t[1] + >>> t + ['a', 'c'] + +If you know the element you want to remove (but not the index), you can +use remove: + +:: + + >>> t = ['a', 'b', 'c'] + >>> t.remove('b') + >>> t + ['a', 'c'] + +The return value from remove is None. + +To remove more than one element, you can use del with a slice index: + +:: + + >>> t = ['a', 'b', 'c', 'd', 'e', 'f'] + >>> del t[1:5] + >>> t + ['a', 'f'] + +As usual, the slice selects all the elements up to but not including the +second index. + +Lists and strings +----------------- + +A string is a sequence of characters and a list is a sequence of values, +but a list of characters is not the same as a string. To convert from a +string to a list of characters, you can use list: + +:: + + >>> s = 'spam' + >>> t = list(s) + >>> t + ['s', 'p', 'a', 'm'] + +Because list is the name of a built-in function, you should avoid using +it as a variable name. I also avoid l because it looks too much like 1. +So that’s why I use t. + +The list function breaks a string into individual letters. If you want +to break a string into words, you can use the split method: + +:: + + >>> s = 'pining for the fjords' + >>> t = s.split() + >>> t + ['pining', 'for', 'the', 'fjords'] + +An optional argument called a **delimiter** specifies which characters +to use as word boundaries. The following example uses a hyphen as a +delimiter: + +:: + + >>> s = 'spam-spam-spam' + >>> delimiter = '-' + >>> t = s.split(delimiter) + >>> t + ['spam', 'spam', 'spam'] + +join is the inverse of split. It takes a list of strings and +concatenates the elements. join is a string method, so you have to +invoke it on the delimiter and pass the list as a parameter: + +:: + + >>> t = ['pining', 'for', 'the', 'fjords'] + >>> delimiter = ' ' + >>> s = delimiter.join(t) + >>> s + 'pining for the fjords' + +In this case the delimiter is a space character, so join puts a space +between words. To concatenate strings without spaces, you can use the +empty string, ``''``, as a delimiter. + +Objects and values +------------------ + +If we run these assignment statements: + +:: + + a = 'banana' + b = 'banana' + +We know that a and b both refer to a string, but we don’t know whether +they refer to the *same* string. There are two possible states, shown in +Figure [fig.list1]. + +.. figure:: figs/list1.pdf + :alt: State diagram. + + State diagram. + +In one case, a and b refer to two different objects that have the same +value. In the second case, they refer to the same object. + +To check whether two variables refer to the same object, you can use the +is operator. + +:: + + >>> a = 'banana' + >>> b = 'banana' + >>> a is b + True + +In this example, Python only created one string object, and both a and b +refer to it. But when you create two lists, you get two objects: + +:: + + >>> a = [1, 2, 3] + >>> b = [1, 2, 3] + >>> a is b + False + +So the state diagram looks like Figure [fig.list2]. + +.. figure:: figs/list2.pdf + :alt: State diagram. + + State diagram. + +In this case we would say that the two lists are **equivalent**, because +they have the same elements, but not **identical**, because they are not +the same object. If two objects are identical, they are also equivalent, +but if they are equivalent, they are not necessarily identical. + +Until now, we have been using “object” and “value” interchangeably, but +it is more precise to say that an object has a value. If you evaluate , +you get a list object whose value is a sequence of integers. If another +list has the same elements, we say it has the same value, but it is not +the same object. + +Aliasing +-------- + +If a refers to an object and you assign b = a, then both variables refer +to the same object: + +:: + + >>> a = [1, 2, 3] + >>> b = a + >>> b is a + True + +The state diagram looks like Figure [fig.list3]. + +.. figure:: figs/list3.pdf + :alt: State diagram. + + State diagram. + +The association of a variable with an object is called a **reference**. +In this example, there are two references to the same object. + +An object with more than one reference has more than one name, so we say +that the object is **aliased**. + +If the aliased object is mutable, changes made with one alias affect the +other: + +:: + + >>> b[0] = 42 + >>> a + [42, 2, 3] + +Although this behavior can be useful, it is error-prone. In general, it +is safer to avoid aliasing when you are working with mutable objects. + +For immutable objects like strings, aliasing is not as much of a +problem. In this example: + +:: + + a = 'banana' + b = 'banana' + +It almost never makes a difference whether a and b refer to the same +string or not. + +List arguments +-------------- + +When you pass a list to a function, the function gets a reference to the +list. If the function modifies the list, the caller sees the change. For +example, ``delete_head`` removes the first element from a list: + +:: + + def delete_head(t): + del t[0] + +Here’s how it is used: + +:: + + >>> letters = ['a', 'b', 'c'] + >>> delete_head(letters) + >>> letters + ['b', 'c'] + +The parameter t and the variable letters are aliases for the same +object. The stack diagram looks like Figure [fig.stack5]. + +.. figure:: figs/stack5.pdf + :alt: Stack diagram. + + Stack diagram. + +Since the list is shared by two frames, I drew it between them. + +It is important to distinguish between operations that modify lists and +operations that create new lists. For example, the append method +modifies a list, but the + operator creates a new list: + +:: + + >>> t1 = [1, 2] + >>> t2 = t1.append(3) + >>> t1 + [1, 2, 3] + >>> t2 + None + +append modifies the list and returns None. + +:: + + >>> t3 = t1 + [4] + >>> t1 + [1, 2, 3] + >>> t3 + [1, 2, 3, 4] + >>> t1 + +The + operator creates a new list and leaves the original list +unchanged. + +This difference is important when you write functions that are supposed +to modify lists. For example, this function *does not* delete the head +of a list: + +:: + + def bad_delete_head(t): + t = t[1:] # WRONG! + +The slice operator creates a new list and the assignment makes t refer +to it, but that doesn’t affect the caller. + +:: + + >>> t4 = [1, 2, 3] + >>> bad_delete_head(t4) + >>> t4 + [1, 2, 3] + +At the beginning of ``bad_delete_head``, t and t4 refer to the same +list. At the end, t refers to a new list, but t4 still refers to the +original, unmodified list. + +An alternative is to write a function that creates and returns a new +list. For example, tail returns all but the first element of a list: + +:: + + def tail(t): + return t[1:] + +This function leaves the original list unmodified. Here’s how it is +used: + +:: + + >>> letters = ['a', 'b', 'c'] + >>> rest = tail(letters) + >>> rest + ['b', 'c'] + +Debugging +--------- + +Careless use of lists (and other mutable objects) can lead to long hours +of debugging. Here are some common pitfalls and ways to avoid them: + +#. Most list methods modify the argument and return None. This is the + opposite of the string methods, which return a new string and leave + the original alone. + + If you are used to writing string code like this: + + :: + + word = word.strip() + + It is tempting to write list code like this: + + :: + + t = t.sort() # WRONG! + + Because sort returns None, the next operation you perform with t is + likely to fail. + + Before using list methods and operators, you should read the + documentation carefully and then test them in interactive mode. + +#. Pick an idiom and stick with it. + + Part of the problem with lists is that there are too many ways to do + things. For example, to remove an element from a list, you can use + pop, remove, del, or even a slice assignment. + + To add an element, you can use the append method or the + operator. + Assuming that t is a list and x is a list element, these are correct: + + :: + + t.append(x) + t = t + [x] + t += [x] + + And these are wrong: + + :: + + t.append([x]) # WRONG! + t = t.append(x) # WRONG! + t + [x] # WRONG! + t = t + x # WRONG! + + Try out each of these examples in interactive mode to make sure you + understand what they do. Notice that only the last one causes a + runtime error; the other three are legal, but they do the wrong + thing. + +#. Make copies to avoid aliasing. + + If you want to use a method like sort that modifies the argument, but + you need to keep the original list as well, you can make a copy. + + :: + + >>> t = [3, 1, 2] + >>> t2 = t[:] + >>> t2.sort() + >>> t + [3, 1, 2] + >>> t2 + [1, 2, 3] + + In this example you could also use the built-in function sorted, + which returns a new, sorted list and leaves the original alone. + + :: + + >>> t2 = sorted(t) + >>> t + [3, 1, 2] + >>> t2 + [1, 2, 3] + +Glossary +-------- + +list: + A sequence of values. + +element: + One of the values in a list (or other sequence), also called items. + +nested list: + A list that is an element of another list. + +accumulator: + A variable used in a loop to add up or accumulate a result. + +augmented assignment: + A statement that updates the value of a variable using an operator + like ``+=``. + +reduce: + A processing pattern that traverses a sequence and accumulates the + elements into a single result. + +map: + A processing pattern that traverses a sequence and performs an + operation on each element. + +filter: + A processing pattern that traverses a list and selects the elements + that satisfy some criterion. + +object: + Something a variable can refer to. An object has a type and a value. + +equivalent: + Having the same value. + +identical: + Being the same object (which implies equivalence). + +reference: + The association between a variable and its value. + +aliasing: + A circumstance where two or more variables refer to the same object. + +delimiter: + A character or string used to indicate where a string should be + split. + +Exercises +--------- + +You can download solutions to these exercises from +http://thinkpython2.com/code/list_exercises.py. + +Write a function called ``nested_sum`` that takes a list of lists of +integers and adds up the elements from all of the nested lists. For +example: + +:: + + >>> t = [[1, 2], [3], [4, 5, 6]] + >>> nested_sum(t) + 21 + +[cumulative] + +Write a function called cumsum that takes a list of numbers and returns +the cumulative sum; that is, a new list where the :math:`i`\ th element +is the sum of the first :math:`i+1` elements from the original list. For +example: + +:: + + >>> t = [1, 2, 3] + >>> cumsum(t) + [1, 3, 6] + +Write a function called ``middle`` that takes a list and returns a new +list that contains all but the first and last elements. For example: + +:: + + >>> t = [1, 2, 3, 4] + >>> middle(t) + [2, 3] + +Write a function called ``chop`` that takes a list, modifies it by +removing the first and last elements, and returns None. For example: + +:: + + >>> t = [1, 2, 3, 4] + >>> chop(t) + >>> t + [2, 3] + +Write a function called ``is_sorted`` that takes a list as a parameter +and returns True if the list is sorted in ascending order and False +otherwise. For example: + +:: + + >>> is_sorted([1, 2, 2]) + True + >>> is_sorted(['b', 'a']) + False + +[anagram] + +Two words are anagrams if you can rearrange the letters from one to +spell the other. Write a function called ``is_anagram`` that takes two +strings and returns True if they are anagrams. + +[duplicate] + +Write a function called ``has_duplicates`` that takes a list and returns +True if there is any element that appears more than once. It should not +modify the original list. + +This exercise pertains to the so-called Birthday Paradox, which you can +read about at http://en.wikipedia.org/wiki/Birthday_paradox. + +If there are 23 students in your class, what are the chances that two of +you have the same birthday? You can estimate this probability by +generating random samples of 23 birthdays and checking for matches. +Hint: you can generate random birthdays with the randint function in the +random module. + +You can download my solution from +http://thinkpython2.com/code/birthday.py. + +Write a function that reads the file words.txt and builds a list with +one element per word. Write two versions of this function, one using the +append method and the other using the idiom t = t + [x]. Which one takes +longer to run? Why? + +Solution: http://thinkpython2.com/code/wordlist.py. + +[wordlist1] [bisection] + +To check whether a word is in the word list, you could use the in +operator, but it would be slow because it searches through the words in +order. + +Because the words are in alphabetical order, we can speed things up with +a bisection search (also known as binary search), which is similar to +what you do when you look a word up in the dictionary. You start in the +middle and check to see whether the word you are looking for comes +before the word in the middle of the list. If so, you search the first +half of the list the same way. Otherwise you search the second half. + +Either way, you cut the remaining search space in half. If the word list +has 113,809 words, it will take about 17 steps to find the word or +conclude that it’s not there. + +Write a function called ``in_bisect`` that takes a sorted list and a +target value and returns the index of the value in the list if it’s +there, or None if it’s not. + +Or you could read the documentation of the bisect module and use that! +Solution: http://thinkpython2.com/code/inlist.py. + +Two words are a “reverse pair” if each is the reverse of the other. +Write a program that finds all the reverse pairs in the word list. +Solution: http://thinkpython2.com/code/reverse_pair.py. + +Two words “interlock” if taking alternating letters from each forms a +new word. For example, “shoe” and “cold” interlock to form “schooled”. +Solution: http://thinkpython2.com/code/interlock.py. Credit: This +exercise is inspired by an example at http://puzzlers.org. + +#. Write a program that finds all pairs of words that interlock. Hint: + don’t enumerate all pairs! + +#. Can you find any words that are three-way interlocked; that is, every + third letter forms a word, starting from the first, second or third? diff --git a/book/11-dict.rst b/book/11-dict.rst new file mode 100644 index 0000000..3836e59 --- /dev/null +++ b/book/11-dict.rst @@ -0,0 +1,752 @@ +Dictionaries +============ + +This chapter presents another built-in type called a dictionary. +Dictionaries are one of Python’s best features; they are the building +blocks of many efficient and elegant algorithms. + +A dictionary is a mapping +------------------------- + +A **dictionary** is like a list, but more general. In a list, the +indices have to be integers; in a dictionary they can be (almost) any +type. + +A dictionary contains a collection of indices, which are called +**keys**, and a collection of values. Each key is associated with a +single value. The association of a key and a value is called a +**key-value pair** or sometimes an **item**. + +In mathematical language, a dictionary represents a **mapping** from +keys to values, so you can also say that each key “maps to” a value. As +an example, we’ll build a dictionary that maps from English to Spanish +words, so the keys and the values are all strings. + +The function dict creates a new dictionary with no items. Because dict +is the name of a built-in function, you should avoid using it as a +variable name. + +:: + + >>> eng2sp = dict() + >>> eng2sp + {} + +The squiggly-brackets, ``{}``, represent an empty dictionary. To add +items to the dictionary, you can use square brackets: + +:: + + >>> eng2sp['one'] = 'uno' + +This line creates an item that maps from the key ``'one'`` to the value +``'uno'``. If we print the dictionary again, we see a key-value pair +with a colon between the key and value: + +:: + + >>> eng2sp + {'one': 'uno'} + +This output format is also an input format. For example, you can create +a new dictionary with three items: + +:: + + >>> eng2sp = {'one': 'uno', 'two': 'dos', 'three': 'tres'} + +But if you print eng2sp, you might be surprised: + +:: + + >>> eng2sp + {'one': 'uno', 'three': 'tres', 'two': 'dos'} + +The order of the key-value pairs might not be the same. If you type the +same example on your computer, you might get a different result. In +general, the order of items in a dictionary is unpredictable. + +But that’s not a problem because the elements of a dictionary are never +indexed with integer indices. Instead, you use the keys to look up the +corresponding values: + +:: + + >>> eng2sp['two'] + 'dos' + +The key ``'two'`` always maps to the value ``'dos'`` so the order of the +items doesn’t matter. + +If the key isn’t in the dictionary, you get an exception: + +:: + + >>> eng2sp['four'] + KeyError: 'four' + +The len function works on dictionaries; it returns the number of +key-value pairs: + +:: + + >>> len(eng2sp) + 3 + +The in operator works on dictionaries, too; it tells you whether +something appears as a *key* in the dictionary (appearing as a value is +not good enough). + +:: + + >>> 'one' in eng2sp + True + >>> 'uno' in eng2sp + False + +To see whether something appears as a value in a dictionary, you can use +the method values, which returns a collection of values, and then use +the in operator: + +:: + + >>> vals = eng2sp.values() + >>> 'uno' in vals + True + +The in operator uses different algorithms for lists and dictionaries. +For lists, it searches the elements of the list in order, as in +Section [find]. As the list gets longer, the search time gets longer in +direct proportion. + +For dictionaries, Python uses an algorithm called a **hashtable** that +has a remarkable property: the in operator takes about the same amount +of time no matter how many items are in the dictionary. I explain how +that’s possible in Section [hashtable], but the explanation might not +make sense until you’ve read a few more chapters. + +Dictionary as a collection of counters +-------------------------------------- + +Suppose you are given a string and you want to count how many times each +letter appears. There are several ways you could do it: + +#. You could create 26 variables, one for each letter of the alphabet. + Then you could traverse the string and, for each character, increment + the corresponding counter, probably using a chained conditional. + +#. You could create a list with 26 elements. Then you could convert each + character to a number (using the built-in function ord), use the + number as an index into the list, and increment the appropriate + counter. + +#. You could create a dictionary with characters as keys and counters as + the corresponding values. The first time you see a character, you + would add an item to the dictionary. After that you would increment + the value of an existing item. + +Each of these options performs the same computation, but each of them +implements that computation in a different way. + +An **implementation** is a way of performing a computation; some +implementations are better than others. For example, an advantage of the +dictionary implementation is that we don’t have to know ahead of time +which letters appear in the string and we only have to make room for the +letters that do appear. + +Here is what the code might look like: + +:: + + def histogram(s): + d = dict() + for c in s: + if c not in d: + d[c] = 1 + else: + d[c] += 1 + return d + +The name of the function is histogram, which is a statistical term for a +collection of counters (or frequencies). + +The first line of the function creates an empty dictionary. The for loop +traverses the string. Each time through the loop, if the character c is +not in the dictionary, we create a new item with key c and the initial +value 1 (since we have seen this letter once). If c is already in the +dictionary we increment d[c]. + +Here’s how it works: + +:: + + >>> h = histogram('brontosaurus') + >>> h + {'a': 1, 'b': 1, 'o': 2, 'n': 1, 's': 2, 'r': 2, 'u': 2, 't': 1} + +The histogram indicates that the letters ``'a'`` and ``'b'`` appear +once; ``'o'`` appears twice, and so on. + +Dictionaries have a method called get that takes a key and a default +value. If the key appears in the dictionary, get returns the +corresponding value; otherwise it returns the default value. For +example: + +:: + + >>> h = histogram('a') + >>> h + {'a': 1} + >>> h.get('a', 0) + 1 + >>> h.get('b', 0) + 0 + +As an exercise, use get to write histogram more concisely. You should be +able to eliminate the if statement. + +Looping and dictionaries +------------------------ + +If you use a dictionary in a for statement, it traverses the keys of the +dictionary. For example, ``print_hist`` prints each key and the +corresponding value: + +:: + + def print_hist(h): + for c in h: + print(c, h[c]) + +Here’s what the output looks like: + +:: + + >>> h = histogram('parrot') + >>> print_hist(h) + a 1 + p 1 + r 2 + t 1 + o 1 + +Again, the keys are in no particular order. To traverse the keys in +sorted order, you can use the built-in function sorted: + +:: + + >>> for key in sorted(h): + ... print(key, h[key]) + a 1 + o 1 + p 1 + r 2 + t 1 + +Reverse lookup +-------------- + +Given a dictionary d and a key k, it is easy to find the corresponding +value v = d[k]. This operation is called a **lookup**. + +But what if you have v and you want to find k? You have two problems: +first, there might be more than one key that maps to the value v. +Depending on the application, you might be able to pick one, or you +might have to make a list that contains all of them. Second, there is no +simple syntax to do a **reverse lookup**; you have to search. + +Here is a function that takes a value and returns the first key that +maps to that value: + +:: + + def reverse_lookup(d, v): + for k in d: + if d[k] == v: + return k + raise LookupError() + +This function is yet another example of the search pattern, but it uses +a feature we haven’t seen before, raise. The **raise statement** causes +an exception; in this case it causes a LookupError, which is a built-in +exception used to indicate that a lookup operation failed. + +If we get to the end of the loop, that means v doesn’t appear in the +dictionary as a value, so we raise an exception. + +Here is an example of a successful reverse lookup: + +:: + + >>> h = histogram('parrot') + >>> key = reverse_lookup(h, 2) + >>> key + 'r' + +And an unsuccessful one: + +:: + + >>> key = reverse_lookup(h, 3) + Traceback (most recent call last): + File "", line 1, in + File "", line 5, in reverse_lookup + LookupError + +The effect when you raise an exception is the same as when Python raises +one: it prints a traceback and an error message. + +The raise statement can take a detailed error message as an optional +argument. For example: + +:: + + >>> raise LookupError('value does not appear in the dictionary') + Traceback (most recent call last): + File "", line 1, in ? + LookupError: value does not appear in the dictionary + +A reverse lookup is much slower than a forward lookup; if you have to do +it often, or if the dictionary gets big, the performance of your program +will suffer. + +Dictionaries and lists +---------------------- + +Lists can appear as values in a dictionary. For example, if you are +given a dictionary that maps from letters to frequencies, you might want +to invert it; that is, create a dictionary that maps from frequencies to +letters. Since there might be several letters with the same frequency, +each value in the inverted dictionary should be a list of letters. + +Here is a function that inverts a dictionary: + +:: + + def invert_dict(d): + inverse = dict() + for key in d: + val = d[key] + if val not in inverse: + inverse[val] = [key] + else: + inverse[val].append(key) + return inverse + +Each time through the loop, key gets a key from d and val gets the +corresponding value. If val is not in inverse, that means we haven’t +seen it before, so we create a new item and initialize it with a +**singleton** (a list that contains a single element). Otherwise we have +seen this value before, so we append the corresponding key to the list. + +Here is an example: + +:: + + >>> hist = histogram('parrot') + >>> hist + {'a': 1, 'p': 1, 'r': 2, 't': 1, 'o': 1} + >>> inverse = invert_dict(hist) + >>> inverse + {1: ['a', 'p', 't', 'o'], 2: ['r']} + +.. figure:: figs/dict1.pdf + :alt: State diagram. + + State diagram. + +Figure [fig.dict1] is a state diagram showing hist and inverse. A +dictionary is represented as a box with the type dict above it and the +key-value pairs inside. If the values are integers, floats or strings, I +draw them inside the box, but I usually draw lists outside the box, just +to keep the diagram simple. + +Lists can be values in a dictionary, as this example shows, but they +cannot be keys. Here’s what happens if you try: + +:: + + >>> t = [1, 2, 3] + >>> d = dict() + >>> d[t] = 'oops' + Traceback (most recent call last): + File "", line 1, in ? + TypeError: list objects are unhashable + +I mentioned earlier that a dictionary is implemented using a hashtable +and that means that the keys have to be **hashable**. + +A **hash** is a function that takes a value (of any kind) and returns an +integer. Dictionaries use these integers, called hash values, to store +and look up key-value pairs. + +This system works fine if the keys are immutable. But if the keys are +mutable, like lists, bad things happen. For example, when you create a +key-value pair, Python hashes the key and stores it in the corresponding +location. If you modify the key and then hash it again, it would go to a +different location. In that case you might have two entries for the same +key, or you might not be able to find a key. Either way, the dictionary +wouldn’t work correctly. + +That’s why keys have to be hashable, and why mutable types like lists +aren’t. The simplest way to get around this limitation is to use tuples, +which we will see in the next chapter. + +Since dictionaries are mutable, they can’t be used as keys, but they +*can* be used as values. + +Memos +----- + +If you played with the fibonacci function from +Section [one.more.example], you might have noticed that the bigger the +argument you provide, the longer the function takes to run. Furthermore, +the run time increases quickly. + +To understand why, consider Figure [fig.fibonacci], which shows the +**call graph** for fibonacci with n=4: + +.. figure:: figs/fibonacci.pdf + :alt: Call graph. + + Call graph. + +A call graph shows a set of function frames, with lines connecting each +frame to the frames of the functions it calls. At the top of the graph, +fibonacci with n=4 calls fibonacci with n=3 and n=2. In turn, fibonacci +with n=3 calls fibonacci with n=2 and n=1. And so on. + +Count how many times fibonacci(0) and fibonacci(1) are called. This is +an inefficient solution to the problem, and it gets worse as the +argument gets bigger. + +One solution is to keep track of values that have already been computed +by storing them in a dictionary. A previously computed value that is +stored for later use is called a **memo**. Here is a “memoized” version +of fibonacci: + +:: + + known = {0:0, 1:1} + + def fibonacci(n): + if n in known: + return known[n] + + res = fibonacci(n-1) + fibonacci(n-2) + known[n] = res + return res + +known is a dictionary that keeps track of the Fibonacci numbers we +already know. It starts with two items: 0 maps to 0 and 1 maps to 1. + +Whenever fibonacci is called, it checks known. If the result is already +there, it can return immediately. Otherwise it has to compute the new +value, add it to the dictionary, and return it. + +If you run this version of fibonacci and compare it with the original, +you will find that it is much faster. + +Global variables +---------------- + +In the previous example, known is created outside the function, so it +belongs to the special frame called ``__main__``. Variables in +``__main__`` are sometimes called **global** because they can be +accessed from any function. Unlike local variables, which disappear when +their function ends, global variables persist from one function call to +the next. + +It is common to use global variables for **flags**; that is, boolean +variables that indicate (“flag”) whether a condition is true. For +example, some programs use a flag named verbose to control the level of +detail in the output: + +:: + + verbose = True + + def example1(): + if verbose: + print('Running example1') + +If you try to reassign a global variable, you might be surprised. The +following example is supposed to keep track of whether the function has +been called: + +:: + + been_called = False + + def example2(): + been_called = True # WRONG + +But if you run it you will see that the value of ``been_called`` doesn’t +change. The problem is that example2 creates a new local variable named +``been_called``. The local variable goes away when the function ends, +and has no effect on the global variable. + +To reassign a global variable inside a function you have to **declare** +the global variable before you use it: + +:: + + been_called = False + + def example2(): + global been_called + been_called = True + +The **global statement** tells the interpreter something like, “In this +function, when I say ``been_called``, I mean the global variable; don’t +create a local one.” + +Here’s an example that tries to update a global variable: + +:: + + count = 0 + + def example3(): + count = count + 1 # WRONG + +If you run it you get: + +:: + + UnboundLocalError: local variable 'count' referenced before assignment + +Python assumes that count is local, and under that assumption you are +reading it before writing it. The solution, again, is to declare count +global. + +:: + + def example3(): + global count + count += 1 + +If a global variable refers to a mutable value, you can modify the value +without declaring the variable: + +:: + + known = {0:0, 1:1} + + def example4(): + known[2] = 1 + +So you can add, remove and replace elements of a global list or +dictionary, but if you want to reassign the variable, you have to +declare it: + +:: + + def example5(): + global known + known = dict() + +Global variables can be useful, but if you have a lot of them, and you +modify them frequently, they can make programs hard to debug. + +Debugging +--------- + +As you work with bigger datasets it can become unwieldy to debug by +printing and checking the output by hand. Here are some suggestions for +debugging large datasets: + +Scale down the input: + If possible, reduce the size of the dataset. For example if the + program reads a text file, start with just the first 10 lines, or + with the smallest example you can find. You can either edit the + files themselves, or (better) modify the program so it reads only + the first n lines. + + If there is an error, you can reduce n to the smallest value that + manifests the error, and then increase it gradually as you find and + correct errors. + +Check summaries and types: + Instead of printing and checking the entire dataset, consider + printing summaries of the data: for example, the number of items in + a dictionary or the total of a list of numbers. + + A common cause of runtime errors is a value that is not the right + type. For debugging this kind of error, it is often enough to print + the type of a value. + +Write self-checks: + Sometimes you can write code to check for errors automatically. For + example, if you are computing the average of a list of numbers, you + could check that the result is not greater than the largest element + in the list or less than the smallest. This is called a “sanity + check” because it detects results that are “insane”. + + Another kind of check compares the results of two different + computations to see if they are consistent. This is called a + “consistency check”. + +Format the output: + Formatting debugging output can make it easier to spot an error. We + saw an example in Section [factdebug]. The pprint module provides a + pprint function that displays built-in types in a more + human-readable format (pprint stands for “pretty print”). + +Again, time you spend building scaffolding can reduce the time you spend +debugging. + +Glossary +-------- + +mapping: + A relationship in which each element of one set corresponds to an + element of another set. + +dictionary: + A mapping from keys to their corresponding values. + +key-value pair: + The representation of the mapping from a key to a value. + +item: + In a dictionary, another name for a key-value pair. + +key: + An object that appears in a dictionary as the first part of a + key-value pair. + +value: + An object that appears in a dictionary as the second part of a + key-value pair. This is more specific than our previous use of the + word “value”. + +implementation: + A way of performing a computation. + +hashtable: + The algorithm used to implement Python dictionaries. + +hash function: + A function used by a hashtable to compute the location for a key. + +hashable: + A type that has a hash function. Immutable types like integers, + floats and strings are hashable; mutable types like lists and + dictionaries are not. + +lookup: + A dictionary operation that takes a key and finds the corresponding + value. + +reverse lookup: + A dictionary operation that takes a value and finds one or more keys + that map to it. + +raise statement: + A statement that (deliberately) raises an exception. + +singleton: + A list (or other sequence) with a single element. + +call graph: + A diagram that shows every frame created during the execution of a + program, with an arrow from each caller to each callee. + +memo: + A computed value stored to avoid unnecessary future computation. + +global variable: + A variable defined outside a function. Global variables can be + accessed from any function. + +global statement: + A statement that declares a variable name global. + +flag: + A boolean variable used to indicate whether a condition is true. + +declaration: + A statement like global that tells the interpreter something about a + variable. + +Exercises +--------- + +[wordlist2] + +Write a function that reads the words in words.txt and stores them as +keys in a dictionary. It doesn’t matter what the values are. Then you +can use the in operator as a fast way to check whether a string is in +the dictionary. + +If you did Exercise [wordlist1], you can compare the speed of this +implementation with the list in operator and the bisection search. + +[setdefault] + +Read the documentation of the dictionary method setdefault and use it to +write a more concise version of ``invert_dict``. Solution: +http://thinkpython2.com/code/invert_dict.py. + +Memoize the Ackermann function from Exercise [ackermann] and see if +memoization makes it possible to evaluate the function with bigger +arguments. Hint: no. Solution: +http://thinkpython2.com/code/ackermann_memo.py. + +If you did Exercise [duplicate], you already have a function named +``has_duplicates`` that takes a list as a parameter and returns True if +there is any object that appears more than once in the list. + +Use a dictionary to write a faster, simpler version of +``has_duplicates``. Solution: +http://thinkpython2.com/code/has_duplicates.py. + +[exrotatepairs] + +Two words are “rotate pairs” if you can rotate one of them and get the +other (see ``rotate_word`` in Exercise [exrotate]). + +Write a program that reads a wordlist and finds all the rotate pairs. +Solution: http://thinkpython2.com/code/rotate_pairs.py. + +Here’s another Puzzler from *Car Talk* +(http://www.cartalk.com/content/puzzlers): + + This was sent in by a fellow named Dan O’Leary. He came upon a + common one-syllable, five-letter word recently that has the + following unique property. When you remove the first letter, the + remaining letters form a homophone of the original word, that is a + word that sounds exactly the same. Replace the first letter, that + is, put it back and remove the second letter and the result is yet + another homophone of the original word. And the question is, what’s + the word? + + Now I’m going to give you an example that doesn’t work. Let’s look + at the five-letter word, ‘wrack.’ W-R-A-C-K, you know like to ‘wrack + with pain.’ If I remove the first letter, I am left with a + four-letter word, ’R-A-C-K.’ As in, ‘Holy cow, did you see the rack + on that buck! It must have been a nine-pointer!’ It’s a perfect + homophone. If you put the ‘w’ back, and remove the ‘r,’ instead, + you’re left with the word, ‘wack,’ which is a real word, it’s just + not a homophone of the other two words. + + But there is, however, at least one word that Dan and we know of, + which will yield two homophones if you remove either of the first + two letters to make two, new four-letter words. The question is, + what’s the word? + +You can use the dictionary from Exercise [wordlist2] to check whether a +string is in the word list. + +To check whether two words are homophones, you can use the CMU +Pronouncing Dictionary. You can download it from +http://www.speech.cs.cmu.edu/cgi-bin/cmudict or from +http://thinkpython2.com/code/c06d and you can also download +http://thinkpython2.com/code/pronounce.py, which provides a function +named ``read_dictionary`` that reads the pronouncing dictionary and +returns a Python dictionary that maps from each word to a string that +describes its primary pronunciation. + +Write a program that lists all the words that solve the Puzzler. +Solution: http://thinkpython2.com/code/homophone.py. diff --git a/book/12-tuple.rst b/book/12-tuple.rst new file mode 100644 index 0000000..c506a57 --- /dev/null +++ b/book/12-tuple.rst @@ -0,0 +1,685 @@ +Tuples +====== + +This chapter presents one more built-in type, the tuple, and then shows +how lists, dictionaries, and tuples work together. I also present a +useful feature for variable-length argument lists, the gather and +scatter operators. + +One note: there is no consensus on how to pronounce “tuple”. Some people +say “tuh-ple”, which rhymes with “supple”. But in the context of +programming, most people say “too-ple”, which rhymes with “quadruple”. + +Tuples are immutable +-------------------- + +A tuple is a sequence of values. The values can be any type, and they +are indexed by integers, so in that respect tuples are a lot like lists. +The important difference is that tuples are immutable. + +Syntactically, a tuple is a comma-separated list of values: + +:: + + >>> t = 'a', 'b', 'c', 'd', 'e' + +Although it is not necessary, it is common to enclose tuples in +parentheses: + +:: + + >>> t = ('a', 'b', 'c', 'd', 'e') + +To create a tuple with a single element, you have to include a final +comma: + +:: + + >>> t1 = 'a', + >>> type(t1) + + +A value in parentheses is not a tuple: + +:: + + >>> t2 = ('a') + >>> type(t2) + + +Another way to create a tuple is the built-in function tuple. With no +argument, it creates an empty tuple: + +:: + + >>> t = tuple() + >>> t + () + +If the argument is a sequence (string, list or tuple), the result is a +tuple with the elements of the sequence: + +:: + + >>> t = tuple('lupins') + >>> t + ('l', 'u', 'p', 'i', 'n', 's') + +Because tuple is the name of a built-in function, you should avoid using +it as a variable name. + +Most list operators also work on tuples. The bracket operator indexes an +element: + +:: + + >>> t = ('a', 'b', 'c', 'd', 'e') + >>> t[0] + 'a' + +And the slice operator selects a range of elements. + +:: + + >>> t[1:3] + ('b', 'c') + +But if you try to modify one of the elements of the tuple, you get an +error: + +:: + + >>> t[0] = 'A' + TypeError: object doesn't support item assignment + +Because tuples are immutable, you can’t modify the elements. But you can +replace one tuple with another: + +:: + + >>> t = ('A',) + t[1:] + >>> t + ('A', 'b', 'c', 'd', 'e') + +This statement makes a new tuple and then makes t refer to it. + +The relational operators work with tuples and other sequences; Python +starts by comparing the first element from each sequence. If they are +equal, it goes on to the next elements, and so on, until it finds +elements that differ. Subsequent elements are not considered (even if +they are really big). + +:: + + >>> (0, 1, 2) < (0, 3, 4) + True + >>> (0, 1, 2000000) < (0, 3, 4) + True + +Tuple assignment +---------------- + +It is often useful to swap the values of two variables. With +conventional assignments, you have to use a temporary variable. For +example, to swap a and b: + +:: + + >>> temp = a + >>> a = b + >>> b = temp + +This solution is cumbersome; **tuple assignment** is more elegant: + +:: + + >>> a, b = b, a + +The left side is a tuple of variables; the right side is a tuple of +expressions. Each value is assigned to its respective variable. All the +expressions on the right side are evaluated before any of the +assignments. + +The number of variables on the left and the number of values on the +right have to be the same: + +:: + + >>> a, b = 1, 2, 3 + ValueError: too many values to unpack + +More generally, the right side can be any kind of sequence (string, list +or tuple). For example, to split an email address into a user name and a +domain, you could write: + +:: + + >>> addr = 'monty@python.org' + >>> uname, domain = addr.split('@') + +The return value from split is a list with two elements; the first +element is assigned to uname, the second to domain. + +:: + + >>> uname + 'monty' + >>> domain + 'python.org' + +Tuples as return values +----------------------- + +Strictly speaking, a function can only return one value, but if the +value is a tuple, the effect is the same as returning multiple values. +For example, if you want to divide two integers and compute the quotient +and remainder, it is inefficient to compute x/y and then x%y. It is +better to compute them both at the same time. + +The built-in function divmod takes two arguments and returns a tuple of +two values, the quotient and remainder. You can store the result as a +tuple: + +:: + + >>> t = divmod(7, 3) + >>> t + (2, 1) + +Or use tuple assignment to store the elements separately: + +:: + + >>> quot, rem = divmod(7, 3) + >>> quot + 2 + >>> rem + 1 + +Here is an example of a function that returns a tuple: + +:: + + def min_max(t): + return min(t), max(t) + +max and min are built-in functions that find the largest and smallest +elements of a sequence. ``min_max`` computes both and returns a tuple of +two values. + +Variable-length argument tuples +------------------------------- + +Functions can take a variable number of arguments. A parameter name that +begins with **gathers** arguments into a tuple. For example, printall +takes any number of arguments and prints them: + +:: + + def printall(*args): + print(args) + +The gather parameter can have any name you like, but args is +conventional. Here’s how the function works: + +:: + + >>> printall(1, 2.0, '3') + (1, 2.0, '3') + +The complement of gather is **scatter**. If you have a sequence of +values and you want to pass it to a function as multiple arguments, you +can use the operator. For example, divmod takes exactly two arguments; +it doesn’t work with a tuple: + +:: + + >>> t = (7, 3) + >>> divmod(t) + TypeError: divmod expected 2 arguments, got 1 + +But if you scatter the tuple, it works: + +:: + + >>> divmod(*t) + (2, 1) + +Many of the built-in functions use variable-length argument tuples. For +example, max and min can take any number of arguments: + +:: + + >>> max(1, 2, 3) + 3 + +But sum does not. + +:: + + >>> sum(1, 2, 3) + TypeError: sum expected at most 2 arguments, got 3 + +As an exercise, write a function called sumall that takes any number of +arguments and returns their sum. + +Lists and tuples +---------------- + +zip is a built-in function that takes two or more sequences and returns +a list of tuples where each tuple contains one element from each +sequence. The name of the function refers to a zipper, which joins and +interleaves two rows of teeth. + +This example zips a string and a list: + +:: + + >>> s = 'abc' + >>> t = [0, 1, 2] + >>> zip(s, t) + + +The result is a **zip object** that knows how to iterate through the +pairs. The most common use of zip is in a for loop: + +:: + + >>> for pair in zip(s, t): + ... print(pair) + ... + ('a', 0) + ('b', 1) + ('c', 2) + +A zip object is a kind of **iterator**, which is any object that +iterates through a sequence. Iterators are similar to lists in some +ways, but unlike lists, you can’t use an index to select an element from +an iterator. + +If you want to use list operators and methods, you can use a zip object +to make a list: + +:: + + >>> list(zip(s, t)) + [('a', 0), ('b', 1), ('c', 2)] + +The result is a list of tuples; in this example, each tuple contains a +character from the string and the corresponding element from the list. + +If the sequences are not the same length, the result has the length of +the shorter one. + +:: + + >>> list(zip('Anne', 'Elk')) + [('A', 'E'), ('n', 'l'), ('n', 'k')] + +You can use tuple assignment in a for loop to traverse a list of tuples: + +:: + + t = [('a', 0), ('b', 1), ('c', 2)] + for letter, number in t: + print(number, letter) + +Each time through the loop, Python selects the next tuple in the list +and assigns the elements to letter and number. The output of this loop +is: + +:: + + 0 a + 1 b + 2 c + +If you combine zip, for and tuple assignment, you get a useful idiom for +traversing two (or more) sequences at the same time. For example, +``has_match`` takes two sequences, t1 and t2, and returns True if there +is an index i such that t1[i] == t2[i]: + +:: + + def has_match(t1, t2): + for x, y in zip(t1, t2): + if x == y: + return True + return False + +If you need to traverse the elements of a sequence and their indices, +you can use the built-in function enumerate: + +:: + + for index, element in enumerate('abc'): + print(index, element) + +The result from enumerate is an enumerate object, which iterates a +sequence of pairs; each pair contains an index (starting from 0) and an +element from the given sequence. In this example, the output is + +:: + + 0 a + 1 b + 2 c + +Again. + +Dictionaries and tuples +----------------------- + +Dictionaries have a method called items that returns a sequence of +tuples, where each tuple is a key-value pair. + +:: + + >>> d = {'a':0, 'b':1, 'c':2} + >>> t = d.items() + >>> t + dict_items([('c', 2), ('a', 0), ('b', 1)]) + +The result is a ``dict_items`` object, which is an iterator that +iterates the key-value pairs. You can use it in a for loop like this: + +:: + + >>> for key, value in d.items(): + ... print(key, value) + ... + c 2 + a 0 + b 1 + +As you should expect from a dictionary, the items are in no particular +order. + +Going in the other direction, you can use a list of tuples to initialize +a new dictionary: + +:: + + >>> t = [('a', 0), ('c', 2), ('b', 1)] + >>> d = dict(t) + >>> d + {'a': 0, 'c': 2, 'b': 1} + +Combining dict with zip yields a concise way to create a dictionary: + +:: + + >>> d = dict(zip('abc', range(3))) + >>> d + {'a': 0, 'c': 2, 'b': 1} + +The dictionary method update also takes a list of tuples and adds them, +as key-value pairs, to an existing dictionary. + +It is common to use tuples as keys in dictionaries (primarily because +you can’t use lists). For example, a telephone directory might map from +last-name, first-name pairs to telephone numbers. Assuming that we have +defined last, first and number, we could write: + +:: + + directory[last, first] = number + +The expression in brackets is a tuple. We could use tuple assignment to +traverse this dictionary. + +:: + + for last, first in directory: + print(first, last, directory[last,first]) + +This loop traverses the keys in directory, which are tuples. It assigns +the elements of each tuple to last and first, then prints the name and +corresponding telephone number. + +There are two ways to represent tuples in a state diagram. The more +detailed version shows the indices and elements just as they appear in a +list. For example, the tuple ``('Cleese', 'John')`` would appear as in +Figure [fig.tuple1]. + +.. figure:: figs/tuple1.pdf + :alt: State diagram. + + State diagram. + +But in a larger diagram you might want to leave out the details. For +example, a diagram of the telephone directory might appear as in +Figure [fig.dict2]. + +.. figure:: figs/dict2.pdf + :alt: State diagram. + + State diagram. + +Here the tuples are shown using Python syntax as a graphical shorthand. +The telephone number in the diagram is the complaints line for the BBC, +so please don’t call it. + +Sequences of sequences +---------------------- + +I have focused on lists of tuples, but almost all of the examples in +this chapter also work with lists of lists, tuples of tuples, and tuples +of lists. To avoid enumerating the possible combinations, it is +sometimes easier to talk about sequences of sequences. + +In many contexts, the different kinds of sequences (strings, lists and +tuples) can be used interchangeably. So how should you choose one over +the others? + +To start with the obvious, strings are more limited than other sequences +because the elements have to be characters. They are also immutable. If +you need the ability to change the characters in a string (as opposed to +creating a new string), you might want to use a list of characters +instead. + +Lists are more common than tuples, mostly because they are mutable. But +there are a few cases where you might prefer tuples: + +#. In some contexts, like a return statement, it is syntactically + simpler to create a tuple than a list. + +#. If you want to use a sequence as a dictionary key, you have to use an + immutable type like a tuple or string. + +#. If you are passing a sequence as an argument to a function, using + tuples reduces the potential for unexpected behavior due to aliasing. + +Because tuples are immutable, they don’t provide methods like sort and +reverse, which modify existing lists. But Python provides the built-in +function sorted, which takes any sequence and returns a new list with +the same elements in sorted order, and reversed, which takes a sequence +and returns an iterator that traverses the list in reverse order. + +Debugging +--------- + +Lists, dictionaries and tuples are examples of **data structures**; in +this chapter we are starting to see compound data structures, like lists +of tuples, or dictionaries that contain tuples as keys and lists as +values. Compound data structures are useful, but they are prone to what +I call **shape errors**; that is, errors caused when a data structure +has the wrong type, size, or structure. For example, if you are +expecting a list with one integer and I give you a plain old integer +(not in a list), it won’t work. + +To help debug these kinds of errors, I have written a module called +structshape that provides a function, also called structshape, that +takes any kind of data structure as an argument and returns a string +that summarizes its shape. You can download it from +http://thinkpython2.com/code/structshape.py + +Here’s the result for a simple list: + +:: + + >>> from structshape import structshape + >>> t = [1, 2, 3] + >>> structshape(t) + 'list of 3 int' + +A fancier program might write “list of 3 int\ *s*”, but it was easier +not to deal with plurals. Here’s a list of lists: + +:: + + >>> t2 = [[1,2], [3,4], [5,6]] + >>> structshape(t2) + 'list of 3 list of 2 int' + +If the elements of the list are not the same type, structshape groups +them, in order, by type: + +:: + + >>> t3 = [1, 2, 3, 4.0, '5', '6', [7], [8], 9] + >>> structshape(t3) + 'list of (3 int, float, 2 str, 2 list of int, int)' + +Here’s a list of tuples: + +:: + + >>> s = 'abc' + >>> lt = list(zip(t, s)) + >>> structshape(lt) + 'list of 3 tuple of (int, str)' + +And here’s a dictionary with 3 items that map integers to strings. + +:: + + >>> d = dict(lt) + >>> structshape(d) + 'dict of 3 int->str' + +If you are having trouble keeping track of your data structures, +structshape can help. + +Glossary +-------- + +tuple: + An immutable sequence of elements. + +tuple assignment: + An assignment with a sequence on the right side and a tuple of + variables on the left. The right side is evaluated and then its + elements are assigned to the variables on the left. + +gather: + The operation of assembling a variable-length argument tuple. + +scatter: + The operation of treating a sequence as a list of arguments. + +zip object: + The result of calling a built-in function zip; an object that + iterates through a sequence of tuples. + +iterator: + An object that can iterate through a sequence, but which does not + provide list operators and methods. + +data structure: + A collection of related values, often organized in lists, + dictionaries, tuples, etc. + +shape error: + An error caused because a value has the wrong shape; that is, the + wrong type or size. + +Exercises +--------- + +Write a function called ``most_frequent`` that takes a string and prints +the letters in decreasing order of frequency. Find text samples from +several different languages and see how letter frequency varies between +languages. Compare your results with the tables at +http://en.wikipedia.org/wiki/Letter_frequencies. Solution: +http://thinkpython2.com/code/most_frequent.py. + +[anagrams] + +More anagrams! + +#. Write a program that reads a word list from a file (see + Section [wordlist]) and prints all the sets of words that are + anagrams. + + Here is an example of what the output might look like: + + :: + + ['deltas', 'desalt', 'lasted', 'salted', 'slated', 'staled'] + ['retainers', 'ternaries'] + ['generating', 'greatening'] + ['resmelts', 'smelters', 'termless'] + + Hint: you might want to build a dictionary that maps from a + collection of letters to a list of words that can be spelled with + those letters. The question is, how can you represent the collection + of letters in a way that can be used as a key? + +#. Modify the previous program so that it prints the longest list of + anagrams first, followed by the second longest, and so on. + +#. In Scrabble a “bingo” is when you play all seven tiles in your rack, + along with a letter on the board, to form an eight-letter word. What + collection of 8 letters forms the most possible bingos? Hint: there + are seven. + + Solution: http://thinkpython2.com/code/anagram_sets.py. + +Two words form a “metathesis pair” if you can transform one into the +other by swapping two letters; for example, “converse” and “conserve”. +Write a program that finds all of the metathesis pairs in the +dictionary. Hint: don’t test all pairs of words, and don’t test all +possible swaps. Solution: http://thinkpython2.com/code/metathesis.py. +Credit: This exercise is inspired by an example at http://puzzlers.org. + +Here’s another Car Talk Puzzler +(http://www.cartalk.com/content/puzzlers): + + What is the longest English word, that remains a valid English word, + as you remove its letters one at a time? + + Now, letters can be removed from either end, or the middle, but you + can’t rearrange any of the letters. Every time you drop a letter, + you wind up with another English word. If you do that, you’re + eventually going to wind up with one letter and that too is going to + be an English word—one that’s found in the dictionary. I want to + know what’s the longest word and how many letters does it have? + + I’m going to give you a little modest example: Sprite. Ok? You start + off with sprite, you take a letter off, one from the interior of the + word, take the r away, and we’re left with the word spite, then we + take the e off the end, we’re left with spit, we take the s off, + we’re left with pit, it, and I. + +Write a program to find all words that can be reduced in this way, and +then find the longest one. + +This exercise is a little more challenging than most, so here are some +suggestions: + +#. You might want to write a function that takes a word and computes a + list of all the words that can be formed by removing one letter. + These are the “children” of the word. + +#. Recursively, a word is reducible if any of its children are + reducible. As a base case, you can consider the empty string + reducible. + +#. The wordlist I provided, words.txt, doesn’t contain single letter + words. So you might want to add “I”, “a”, and the empty string. + +#. To improve the performance of your program, you might want to memoize + the words that are known to be reducible. + +Solution: http://thinkpython2.com/code/reducible.py. diff --git a/book/13-case-struct.rst b/book/13-case-struct.rst new file mode 100644 index 0000000..8af257c --- /dev/null +++ b/book/13-case-struct.rst @@ -0,0 +1,686 @@ +Case study: data structure selection +==================================== + +At this point you have learned about Python’s core data structures, and +you have seen some of the algorithms that use them. If you would like to +know more about algorithms, this might be a good time to read +Chapter [algorithms]. But you don’t have to read it before you go on; +you can read it whenever you are interested. + +This chapter presents a case study with exercises that let you think +about choosing data structures and practice using them. + +Word frequency analysis +----------------------- + +As usual, you should at least attempt the exercises before you read my +solutions. + +Write a program that reads a file, breaks each line into words, strips +whitespace and punctuation from the words, and converts them to +lowercase. + +Hint: The string module provides a string named whitespace, which +contains space, tab, newline, etc., and punctuation which contains the +punctuation characters. Let’s see if we can make Python swear: + +:: + + >>> import string + >>> string.punctuation + '!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~' + +Also, you might consider using the string methods strip, replace and +translate. + +Go to Project Gutenberg (http://gutenberg.org) and download your +favorite out-of-copyright book in plain text format. + +Modify your program from the previous exercise to read the book you +downloaded, skip over the header information at the beginning of the +file, and process the rest of the words as before. + +Then modify the program to count the total number of words in the book, +and the number of times each word is used. + +Print the number of different words used in the book. Compare different +books by different authors, written in different eras. Which author uses +the most extensive vocabulary? + +Modify the program from the previous exercise to print the 20 most +frequently used words in the book. + +Modify the previous program to read a word list (see Section [wordlist]) +and then print all the words in the book that are not in the word list. +How many of them are typos? How many of them are common words that +*should* be in the word list, and how many of them are really obscure? + +Random numbers +-------------- + +Given the same inputs, most computer programs generate the same outputs +every time, so they are said to be **deterministic**. Determinism is +usually a good thing, since we expect the same calculation to yield the +same result. For some applications, though, we want the computer to be +unpredictable. Games are an obvious example, but there are more. + +Making a program truly nondeterministic turns out to be difficult, but +there are ways to make it at least seem nondeterministic. One of them is +to use algorithms that generate **pseudorandom** numbers. Pseudorandom +numbers are not truly random because they are generated by a +deterministic computation, but just by looking at the numbers it is all +but impossible to distinguish them from random. + +The random module provides functions that generate pseudorandom numbers +(which I will simply call “random” from here on). + +The function random returns a random float between 0.0 and 1.0 +(including 0.0 but not 1.0). Each time you call random, you get the next +number in a long series. To see a sample, run this loop: + +:: + + import random + + for i in range(10): + x = random.random() + print(x) + +The function randint takes parameters low and high and returns an +integer between low and high (including both). + +:: + + >>> random.randint(5, 10) + 5 + >>> random.randint(5, 10) + 9 + +To choose an element from a sequence at random, you can use choice: + +:: + + >>> t = [1, 2, 3] + >>> random.choice(t) + 2 + >>> random.choice(t) + 3 + +The random module also provides functions to generate random values from +continuous distributions including Gaussian, exponential, gamma, and a +few more. + +Write a function named ``choose_from_hist`` that takes a histogram as +defined in Section [histogram] and returns a random value from the +histogram, chosen with probability in proportion to frequency. For +example, for this histogram: + +:: + + >>> t = ['a', 'a', 'b'] + >>> hist = histogram(t) + >>> hist + {'a': 2, 'b': 1} + +your function should return ``'a'`` with probability :math:`2/3` and +``'b'`` with probability :math:`1/3`. + +Word histogram +-------------- + +You should attempt the previous exercises before you go on. You can +download my solution from http://thinkpython2.com/code/analyze_book1.py. +You will also need http://thinkpython2.com/code/emma.txt. + +Here is a program that reads a file and builds a histogram of the words +in the file: + +:: + + import string + + def process_file(filename): + hist = dict() + fp = open(filename) + for line in fp: + process_line(line, hist) + return hist + + def process_line(line, hist): + line = line.replace('-', ' ') + + for word in line.split(): + word = word.strip(string.punctuation + string.whitespace) + word = word.lower() + hist[word] = hist.get(word, 0) + 1 + + hist = process_file('emma.txt') + +This program reads emma.txt, which contains the text of *Emma* by Jane +Austen. + +``process_file`` loops through the lines of the file, passing them one +at a time to ``process_line``. The histogram hist is being used as an +accumulator. + +``process_line`` uses the string method replace to replace hyphens with +spaces before using split to break the line into a list of strings. It +traverses the list of words and uses strip and lower to remove +punctuation and convert to lower case. (It is a shorthand to say that +strings are “converted”; remember that strings are immutable, so methods +like strip and lower return new strings.) + +Finally, ``process_line`` updates the histogram by creating a new item +or incrementing an existing one. + +To count the total number of words in the file, we can add up the +frequencies in the histogram: + +:: + + def total_words(hist): + return sum(hist.values()) + +The number of different words is just the number of items in the +dictionary: + +:: + + def different_words(hist): + return len(hist) + +Here is some code to print the results: + +:: + + print('Total number of words:', total_words(hist)) + print('Number of different words:', different_words(hist)) + +And the results: + +:: + + Total number of words: 161080 + Number of different words: 7214 + +Most common words +----------------- + +To find the most common words, we can make a list of tuples, where each +tuple contains a word and its frequency, and sort it. + +The following function takes a histogram and returns a list of +word-frequency tuples: + +:: + + def most_common(hist): + t = [] + for key, value in hist.items(): + t.append((value, key)) + + t.sort(reverse=True) + return t + +In each tuple, the frequency appears first, so the resulting list is +sorted by frequency. Here is a loop that prints the ten most common +words: + +:: + + t = most_common(hist) + print('The most common words are:') + for freq, word in t[:10]: + print(word, freq, sep='\t') + +I use the keyword argument sep to tell print to use a tab character as a +“separator”, rather than a space, so the second column is lined up. Here +are the results from *Emma*: + +:: + + The most common words are: + to 5242 + the 5205 + and 4897 + of 4295 + i 3191 + a 3130 + it 2529 + her 2483 + was 2400 + she 2364 + +This code can be simplified using the key parameter of the sort +function. If you are curious, you can read about it at +https://wiki.python.org/moin/HowTo/Sorting. + +Optional parameters +------------------- + +We have seen built-in functions and methods that take optional +arguments. It is possible to write programmer-defined functions with +optional arguments, too. For example, here is a function that prints the +most common words in a histogram + +:: + + def print_most_common(hist, num=10): + t = most_common(hist) + print('The most common words are:') + for freq, word in t[:num]: + print(word, freq, sep='\t') + +The first parameter is required; the second is optional. The **default +value** of num is 10. + +If you only provide one argument: + +:: + + print_most_common(hist) + +num gets the default value. If you provide two arguments: + +:: + + print_most_common(hist, 20) + +num gets the value of the argument instead. In other words, the optional +argument **overrides** the default value. + +If a function has both required and optional parameters, all the +required parameters have to come first, followed by the optional ones. + +Dictionary subtraction +---------------------- + +Finding the words from the book that are not in the word list from +words.txt is a problem you might recognize as set subtraction; that is, +we want to find all the words from one set (the words in the book) that +are not in the other (the words in the list). + +subtract takes dictionaries d1 and d2 and returns a new dictionary that +contains all the keys from d1 that are not in d2. Since we don’t really +care about the values, we set them all to None. + +:: + + def subtract(d1, d2): + res = dict() + for key in d1: + if key not in d2: + res[key] = None + return res + +To find the words in the book that are not in words.txt, we can use +``process_file`` to build a histogram for words.txt, and then subtract: + +:: + + words = process_file('words.txt') + diff = subtract(hist, words) + + print("Words in the book that aren't in the word list:") + for word in diff.keys(): + print(word, end=' ') + +Here are some of the results from *Emma*: + +:: + + Words in the book that aren't in the word list: + rencontre jane's blanche woodhouses disingenuousness + friend's venice apartment ... + +Some of these words are names and possessives. Others, like “rencontre”, +are no longer in common use. But a few are common words that should +really be in the list! + +Python provides a data structure called set that provides many common +set operations. You can read about them in Section [sets], or read the +documentation at +http://docs.python.org/3/library/stdtypes.html#types-set. + +Write a program that uses set subtraction to find words in the book that +are not in the word list. Solution: +http://thinkpython2.com/code/analyze_book2.py. + +Random words +------------ + +To choose a random word from the histogram, the simplest algorithm is to +build a list with multiple copies of each word, according to the +observed frequency, and then choose from the list: + +:: + + def random_word(h): + t = [] + for word, freq in h.items(): + t.extend([word] * freq) + + return random.choice(t) + +The expression \* freq creates a list with freq copies of the string +word. The extend method is similar to append except that the argument is +a sequence. + +This algorithm works, but it is not very efficient; each time you choose +a random word, it rebuilds the list, which is as big as the original +book. An obvious improvement is to build the list once and then make +multiple selections, but the list is still big. + +An alternative is: + +#. Use keys to get a list of the words in the book. + +#. Build a list that contains the cumulative sum of the word frequencies + (see Exercise [cumulative]). The last item in this list is the total + number of words in the book, :math:`n`. + +#. Choose a random number from 1 to :math:`n`. Use a bisection search + (See Exercise [bisection]) to find the index where the random number + would be inserted in the cumulative sum. + +#. Use the index to find the corresponding word in the word list. + +[randhist] + +Write a program that uses this algorithm to choose a random word from +the book. Solution: http://thinkpython2.com/code/analyze_book3.py. + +Markov analysis +--------------- + +If you choose words from the book at random, you can get a sense of the +vocabulary, but you probably won’t get a sentence: + +:: + + this the small regard harriet which knightley's it most things + +A series of random words seldom makes sense because there is no +relationship between successive words. For example, in a real sentence +you would expect an article like “the” to be followed by an adjective or +a noun, and probably not a verb or adverb. + +One way to measure these kinds of relationships is Markov analysis, +which characterizes, for a given sequence of words, the probability of +the words that might come next. For example, the song *Eric, the Half a +Bee* begins: + + | Half a bee, philosophically, + | Must, ipso facto, half not be. + | But half the bee has got to be + | Vis a vis, its entity. D’you see? + | But can a bee be said to be + | Or not to be an entire bee + | When half the bee is not a bee + | Due to some ancient injury? + +In this text, the phrase “half the” is always followed by the word +“bee”, but the phrase “the bee” might be followed by either “has” or +“is”. + +The result of Markov analysis is a mapping from each prefix (like “half +the” and “the bee”) to all possible suffixes (like “has” and “is”). + +Given this mapping, you can generate a random text by starting with any +prefix and choosing at random from the possible suffixes. Next, you can +combine the end of the prefix and the new suffix to form the next +prefix, and repeat. + +For example, if you start with the prefix “Half a”, then the next word +has to be “bee”, because the prefix only appears once in the text. The +next prefix is “a bee”, so the next suffix might be “philosophically”, +“be” or “due”. + +In this example the length of the prefix is always two, but you can do +Markov analysis with any prefix length. + +Markov analysis: + +#. Write a program to read a text from a file and perform Markov + analysis. The result should be a dictionary that maps from prefixes + to a collection of possible suffixes. The collection might be a list, + tuple, or dictionary; it is up to you to make an appropriate choice. + You can test your program with prefix length two, but you should + write the program in a way that makes it easy to try other lengths. + +#. Add a function to the previous program to generate random text based + on the Markov analysis. Here is an example from *Emma* with prefix + length 2: + + He was very clever, be it sweetness or be angry, ashamed or only + amused, at such a stroke. She had never thought of Hannah till + you were never meant for me?“ ”I cannot make speeches, Emma:" he + soon cut it all himself. + + For this example, I left the punctuation attached to the words. The + result is almost syntactically correct, but not quite. Semantically, + it almost makes sense, but not quite. + + What happens if you increase the prefix length? Does the random text + make more sense? + +#. Once your program is working, you might want to try a mash-up: if you + combine text from two or more books, the random text you generate + will blend the vocabulary and phrases from the sources in interesting + ways. + +Credit: This case study is based on an example from Kernighan and Pike, +*The Practice of Programming*, Addison-Wesley, 1999. + +You should attempt this exercise before you go on; then you can can +download my solution from http://thinkpython2.com/code/markov.py. You +will also need http://thinkpython2.com/code/emma.txt. + +Data structures +--------------- + +Using Markov analysis to generate random text is fun, but there is also +a point to this exercise: data structure selection. In your solution to +the previous exercises, you had to choose: + +- How to represent the prefixes. + +- How to represent the collection of possible suffixes. + +- How to represent the mapping from each prefix to the collection of + possible suffixes. + +The last one is easy: a dictionary is the obvious choice for a mapping +from keys to corresponding values. + +For the prefixes, the most obvious options are string, list of strings, +or tuple of strings. + +For the suffixes, one option is a list; another is a histogram +(dictionary). + +How should you choose? The first step is to think about the operations +you will need to implement for each data structure. For the prefixes, we +need to be able to remove words from the beginning and add to the end. +For example, if the current prefix is “Half a”, and the next word is +“bee”, you need to be able to form the next prefix, “a bee”. + +Your first choice might be a list, since it is easy to add and remove +elements, but we also need to be able to use the prefixes as keys in a +dictionary, so that rules out lists. With tuples, you can’t append or +remove, but you can use the addition operator to form a new tuple: + +:: + + def shift(prefix, word): + return prefix[1:] + (word,) + +shift takes a tuple of words, prefix, and a string, word, and forms a +new tuple that has all the words in prefix except the first, and word +added to the end. + +For the collection of suffixes, the operations we need to perform +include adding a new suffix (or increasing the frequency of an existing +one), and choosing a random suffix. + +Adding a new suffix is equally easy for the list implementation or the +histogram. Choosing a random element from a list is easy; choosing from +a histogram is harder to do efficiently (see Exercise [randhist]). + +So far we have been talking mostly about ease of implementation, but +there are other factors to consider in choosing data structures. One is +run time. Sometimes there is a theoretical reason to expect one data +structure to be faster than other; for example, I mentioned that the in +operator is faster for dictionaries than for lists, at least when the +number of elements is large. + +But often you don’t know ahead of time which implementation will be +faster. One option is to implement both of them and see which is better. +This approach is called **benchmarking**. A practical alternative is to +choose the data structure that is easiest to implement, and then see if +it is fast enough for the intended application. If so, there is no need +to go on. If not, there are tools, like the profile module, that can +identify the places in a program that take the most time. + +The other factor to consider is storage space. For example, using a +histogram for the collection of suffixes might take less space because +you only have to store each word once, no matter how many times it +appears in the text. In some cases, saving space can also make your +program run faster, and in the extreme, your program might not run at +all if you run out of memory. But for many applications, space is a +secondary consideration after run time. + +One final thought: in this discussion, I have implied that we should use +one data structure for both analysis and generation. But since these are +separate phases, it would also be possible to use one structure for +analysis and then convert to another structure for generation. This +would be a net win if the time saved during generation exceeded the time +spent in conversion. + +Debugging +--------- + +When you are debugging a program, and especially if you are working on a +hard bug, there are five things to try: + +Reading: + Examine your code, read it back to yourself, and check that it says + what you meant to say. + +Running: + Experiment by making changes and running different versions. Often + if you display the right thing at the right place in the program, + the problem becomes obvious, but sometimes you have to build + scaffolding. + +Ruminating: + Take some time to think! What kind of error is it: syntax, runtime, + or semantic? What information can you get from the error messages, + or from the output of the program? What kind of error could cause + the problem you’re seeing? What did you change last, before the + problem appeared? + +Rubberducking: + If you explain the problem to someone else, you sometimes find the + answer before you finish asking the question. Often you don’t need + the other person; you could just talk to a rubber duck. And that’s + the origin of the well-known strategy called **rubber duck + debugging**. I am not making this up; see + https://en.wikipedia.org/wiki/Rubber_duck_debugging. + +Retreating: + At some point, the best thing to do is back off, undoing recent + changes, until you get back to a program that works and that you + understand. Then you can start rebuilding. + +Beginning programmers sometimes get stuck on one of these activities and +forget the others. Each activity comes with its own failure mode. + +For example, reading your code might help if the problem is a +typographical error, but not if the problem is a conceptual +misunderstanding. If you don’t understand what your program does, you +can read it 100 times and never see the error, because the error is in +your head. + +Running experiments can help, especially if you run small, simple tests. +But if you run experiments without thinking or reading your code, you +might fall into a pattern I call “random walk programming”, which is the +process of making random changes until the program does the right thing. +Needless to say, random walk programming can take a long time. + +You have to take time to think. Debugging is like an experimental +science. You should have at least one hypothesis about what the problem +is. If there are two or more possibilities, try to think of a test that +would eliminate one of them. + +But even the best debugging techniques will fail if there are too many +errors, or if the code you are trying to fix is too big and complicated. +Sometimes the best option is to retreat, simplifying the program until +you get to something that works and that you understand. + +Beginning programmers are often reluctant to retreat because they can’t +stand to delete a line of code (even if it’s wrong). If it makes you +feel better, copy your program into another file before you start +stripping it down. Then you can copy the pieces back one at a time. + +Finding a hard bug requires reading, running, ruminating, and sometimes +retreating. If you get stuck on one of these activities, try the others. + +Glossary +-------- + +deterministic: + Pertaining to a program that does the same thing each time it runs, + given the same inputs. + +pseudorandom: + Pertaining to a sequence of numbers that appears to be random, but + is generated by a deterministic program. + +default value: + The value given to an optional parameter if no argument is provided. + +override: + To replace a default value with an argument. + +benchmarking: + The process of choosing between data structures by implementing + alternatives and testing them on a sample of the possible inputs. + +rubber duck debugging: + Debugging by explaining your problem to an inanimate object such as + a rubber duck. Articulating the problem can help you solve it, even + if the rubber duck doesn’t know Python. + +Exercises +--------- + +The “rank” of a word is its position in a list of words sorted by +frequency: the most common word has rank 1, the second most common has +rank 2, etc. + +Zipf’s law describes a relationship between the ranks and frequencies of +words in natural languages (http://en.wikipedia.org/wiki/Zipf's_law). +Specifically, it predicts that the frequency, :math:`f`, of the word +with rank :math:`r` is: + +.. math:: f = c r^{-s} + +where :math:`s` and :math:`c` are parameters that depend on the language +and the text. If you take the logarithm of both sides of this equation, +you get: + +.. math:: \log f = \log c - s \log r + +So if you plot log :math:`f` versus log :math:`r`, you should get a +straight line with slope :math:`-s` and intercept log :math:`c`. + +Write a program that reads a text from a file, counts word frequencies, +and prints one line for each word, in descending order of frequency, +with log :math:`f` and log :math:`r`. Use the graphing program of your +choice to plot the results and check whether they form a straight line. +Can you estimate the value of :math:`s`? + +Solution: http://thinkpython2.com/code/zipf.py. To run my solution, you +need the plotting module matplotlib. If you installed Anaconda, you +already have matplotlib; otherwise you might have to install it. diff --git a/book/14-file.rst b/book/14-file.rst new file mode 100644 index 0000000..871634c --- /dev/null +++ b/book/14-file.rst @@ -0,0 +1,666 @@ +Files +===== + +This chapter introduces the idea of “persistent” programs that keep data +in permanent storage, and shows how to use different kinds of permanent +storage, like files and databases. + +Persistence +----------- + +Most of the programs we have seen so far are transient in the sense that +they run for a short time and produce some output, but when they end, +their data disappears. If you run the program again, it starts with a +clean slate. + +Other programs are **persistent**: they run for a long time (or all the +time); they keep at least some of their data in permanent storage (a +hard drive, for example); and if they shut down and restart, they pick +up where they left off. + +Examples of persistent programs are operating systems, which run pretty +much whenever a computer is on, and web servers, which run all the time, +waiting for requests to come in on the network. + +One of the simplest ways for programs to maintain their data is by +reading and writing text files. We have already seen programs that read +text files; in this chapter we will see programs that write them. + +An alternative is to store the state of the program in a database. In +this chapter I will present a simple database and a module, pickle, that +makes it easy to store program data. + +Reading and writing +------------------- + +A text file is a sequence of characters stored on a permanent medium +like a hard drive, flash memory, or CD-ROM. We saw how to open and read +a file in Section [wordlist]. + +To write a file, you have to open it with mode ``'w'`` as a second +parameter: + +:: + + >>> fout = open('output.txt', 'w') + +If the file already exists, opening it in write mode clears out the old +data and starts fresh, so be careful! If the file doesn’t exist, a new +one is created. + +open returns a file object that provides methods for working with the +file. The write method puts data into the file. + +:: + + >>> line1 = "This here's the wattle,\n" + >>> fout.write(line1) + 24 + +The return value is the number of characters that were written. The file +object keeps track of where it is, so if you call write again, it adds +the new data to the end of the file. + +:: + + >>> line2 = "the emblem of our land.\n" + >>> fout.write(line2) + 24 + +When you are done writing, you should close the file. + +:: + + >>> fout.close() + +If you don’t close the file, it gets closed for you when the program +ends. + +Format operator +--------------- + +The argument of write has to be a string, so if we want to put other +values in a file, we have to convert them to strings. The easiest way to +do that is with str: + +:: + + >>> x = 52 + >>> fout.write(str(x)) + +An alternative is to use the **format operator**, %. When applied to +integers, % is the modulus operator. But when the first operand is a +string, % is the format operator. + +The first operand is the **format string**, which contains one or more +**format sequences**, which specify how the second operand is formatted. +The result is a string. + +For example, the format sequence ``'%d'`` means that the second operand +should be formatted as a decimal integer: + +:: + + >>> camels = 42 + >>> '%d' % camels + '42' + +The result is the string ``'42'``, which is not to be confused with the +integer value 42. + +A format sequence can appear anywhere in the string, so you can embed a +value in a sentence: + +:: + + >>> 'I have spotted %d camels.' % camels + 'I have spotted 42 camels.' + +If there is more than one format sequence in the string, the second +argument has to be a tuple. Each format sequence is matched with an +element of the tuple, in order. + +The following example uses ``'%d'`` to format an integer, ``'%g'`` to +format a floating-point number, and ``'%s'`` to format a string: + +:: + + >>> 'In %d years I have spotted %g %s.' % (3, 0.1, 'camels') + 'In 3 years I have spotted 0.1 camels.' + +The number of elements in the tuple has to match the number of format +sequences in the string. Also, the types of the elements have to match +the format sequences: + +:: + + >>> '%d %d %d' % (1, 2) + TypeError: not enough arguments for format string + >>> '%d' % 'dollars' + TypeError: %d format: a number is required, not str + +In the first example, there aren’t enough elements; in the second, the +element is the wrong type. + +For more information on the format operator, see +https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting. +A more powerful alternative is the string format method, which you can +read about at +https://docs.python.org/3/library/stdtypes.html#str.format. + +Filenames and paths +------------------- + +Files are organized into **directories** (also called “folders”). Every +running program has a “current directory”, which is the default +directory for most operations. For example, when you open a file for +reading, Python looks for it in the current directory. + +The os module provides functions for working with files and directories +(“os” stands for “operating system”). os.getcwd returns the name of the +current directory: + +:: + + >>> import os + >>> cwd = os.getcwd() + >>> cwd + '/home/dinsdale' + +cwd stands for “current working directory”. The result in this example +is /home/dinsdale, which is the home directory of a user named dinsdale. + +A string like ``'/home/dinsdale'`` that identifies a file or directory +is called a **path**. + +A simple filename, like memo.txt is also considered a path, but it is a +**relative path** because it relates to the current directory. If the +current directory is /home/dinsdale, the filename memo.txt would refer +to /home/dinsdale/memo.txt. + +A path that begins with / does not depend on the current directory; it +is called an **absolute path**. To find the absolute path to a file, you +can use os.path.abspath: + +:: + + >>> os.path.abspath('memo.txt') + '/home/dinsdale/memo.txt' + +os.path provides other functions for working with filenames and paths. +For example, os.path.exists checks whether a file or directory exists: + +:: + + >>> os.path.exists('memo.txt') + True + +If it exists, os.path.isdir checks whether it’s a directory: + +:: + + >>> os.path.isdir('memo.txt') + False + >>> os.path.isdir('/home/dinsdale') + True + +Similarly, os.path.isfile checks whether it’s a file. + +os.listdir returns a list of the files (and other directories) in the +given directory: + +:: + + >>> os.listdir(cwd) + ['music', 'photos', 'memo.txt'] + +To demonstrate these functions, the following example “walks” through a +directory, prints the names of all the files, and calls itself +recursively on all the directories. + +:: + + def walk(dirname): + for name in os.listdir(dirname): + path = os.path.join(dirname, name) + + if os.path.isfile(path): + print(path) + else: + walk(path) + +os.path.join takes a directory and a file name and joins them into a +complete path. + +The os module provides a function called walk that is similar to this +one but more versatile. As an exercise, read the documentation and use +it to print the names of the files in a given directory and its +subdirectories. You can download my solution from +http://thinkpython2.com/code/walk.py. + +Catching exceptions +------------------- + +A lot of things can go wrong when you try to read and write files. If +you try to open a file that doesn’t exist, you get an IOError: + +:: + + >>> fin = open('bad_file') + IOError: [Errno 2] No such file or directory: 'bad_file' + +If you don’t have permission to access a file: + +:: + + >>> fout = open('/etc/passwd', 'w') + PermissionError: [Errno 13] Permission denied: '/etc/passwd' + +And if you try to open a directory for reading, you get + +:: + + >>> fin = open('/home') + IsADirectoryError: [Errno 21] Is a directory: '/home' + +To avoid these errors, you could use functions like os.path.exists and +os.path.isfile, but it would take a lot of time and code to check all +the possibilities (if “Errno 21” is any indication, there are at least +21 things that can go wrong). + +It is better to go ahead and try—and deal with problems if they +happen—which is exactly what the try statement does. The syntax is +similar to an if...else statement: + +:: + + try: + fin = open('bad_file') + except: + print('Something went wrong.') + +Python starts by executing the try clause. If all goes well, it skips +the except clause and proceeds. If an exception occurs, it jumps out of +the try clause and runs the except clause. + +Handling an exception with a try statement is called **catching** an +exception. In this example, the except clause prints an error message +that is not very helpful. In general, catching an exception gives you a +chance to fix the problem, or try again, or at least end the program +gracefully. + +Databases +--------- + +A **database** is a file that is organized for storing data. Many +databases are organized like a dictionary in the sense that they map +from keys to values. The biggest difference between a database and a +dictionary is that the database is on disk (or other permanent storage), +so it persists after the program ends. + +The module dbm provides an interface for creating and updating database +files. As an example, I’ll create a database that contains captions for +image files. + +Opening a database is similar to opening other files: + +:: + + >>> import dbm + >>> db = dbm.open('captions', 'c') + +The mode ``'c'`` means that the database should be created if it doesn’t +already exist. The result is a database object that can be used (for +most operations) like a dictionary. + +When you create a new item, dbm updates the database file. + +:: + + >>> db['cleese.png'] = 'Photo of John Cleese.' + +When you access one of the items, dbm reads the file: + +:: + + >>> db['cleese.png'] + b'Photo of John Cleese.' + +The result is a **bytes object**, which is why it begins with b. A bytes +object is similar to a string in many ways. When you get farther into +Python, the difference becomes important, but for now we can ignore it. + +If you make another assignment to an existing key, dbm replaces the old +value: + +:: + + >>> db['cleese.png'] = 'Photo of John Cleese doing a silly walk.' + >>> db['cleese.png'] + b'Photo of John Cleese doing a silly walk.' + +Some dictionary methods, like keys and items, don’t work with database +objects. But iteration with a for loop works: + +:: + + for key in db: + print(key, db[key]) + +As with other files, you should close the database when you are done: + +:: + + >>> db.close() + +Pickling +-------- + +A limitation of dbm is that the keys and values have to be strings or +bytes. If you try to use any other type, you get an error. + +The pickle module can help. It translates almost any type of object into +a string suitable for storage in a database, and then translates strings +back into objects. + +pickle.dumps takes an object as a parameter and returns a string +representation (dumps is short for “dump string”): + +:: + + >>> import pickle + >>> t = [1, 2, 3] + >>> pickle.dumps(t) + b'\x80\x03]q\x00(K\x01K\x02K\x03e.' + +The format isn’t obvious to human readers; it is meant to be easy for +pickle to interpret. pickle.loads (“load string”) reconstitutes the +object: + +:: + + >>> t1 = [1, 2, 3] + >>> s = pickle.dumps(t1) + >>> t2 = pickle.loads(s) + >>> t2 + [1, 2, 3] + +Although the new object has the same value as the old, it is not (in +general) the same object: + +:: + + >>> t1 == t2 + True + >>> t1 is t2 + False + +In other words, pickling and then unpickling has the same effect as +copying the object. + +You can use pickle to store non-strings in a database. In fact, this +combination is so common that it has been encapsulated in a module +called shelve. + +Pipes +----- + +Most operating systems provide a command-line interface, also known as a +**shell**. Shells usually provide commands to navigate the file system +and launch applications. For example, in Unix you can change directories +with cd, display the contents of a directory with ls, and launch a web +browser by typing (for example) firefox. + +Any program that you can launch from the shell can also be launched from +Python using a **pipe object**, which represents a running program. + +For example, the Unix command ls -l normally displays the contents of +the current directory in long format. You can launch ls with +os.popen [1]_: + +:: + + >>> cmd = 'ls -l' + >>> fp = os.popen(cmd) + +The argument is a string that contains a shell command. The return value +is an object that behaves like an open file. You can read the output +from the ls process one line at a time with readline or get the whole +thing at once with read: + +:: + + >>> res = fp.read() + +When you are done, you close the pipe like a file: + +:: + + >>> stat = fp.close() + >>> print(stat) + None + +The return value is the final status of the ls process; None means that +it ended normally (with no errors). + +For example, most Unix systems provide a command called md5sum that +reads the contents of a file and computes a “checksum”. You can read +about MD5 at http://en.wikipedia.org/wiki/Md5. This command provides an +efficient way to check whether two files have the same contents. The +probability that different contents yield the same checksum is very +small (that is, unlikely to happen before the universe collapses). + +You can use a pipe to run md5sum from Python and get the result: + +:: + + >>> filename = 'book.tex' + >>> cmd = 'md5sum ' + filename + >>> fp = os.popen(cmd) + >>> res = fp.read() + >>> stat = fp.close() + >>> print(res) + 1e0033f0ed0656636de0d75144ba32e0 book.tex + >>> print(stat) + None + +Writing modules +--------------- + +Any file that contains Python code can be imported as a module. For +example, suppose you have a file named wc.py with the following code: + +:: + + def linecount(filename): + count = 0 + for line in open(filename): + count += 1 + return count + + print(linecount('wc.py')) + +If you run this program, it reads itself and prints the number of lines +in the file, which is 7. You can also import it like this: + +:: + + >>> import wc + 7 + +Now you have a module object wc: + +:: + + >>> wc + + +The module object provides ``linecount``: + +:: + + >>> wc.linecount('wc.py') + 7 + +So that’s how you write modules in Python. + +The only problem with this example is that when you import the module it +runs the test code at the bottom. Normally when you import a module, it +defines new functions but it doesn’t run them. + +Programs that will be imported as modules often use the following idiom: + +:: + + if __name__ == '__main__': + print(linecount('wc.py')) + +``__name__`` is a built-in variable that is set when the program starts. +If the program is running as a script, ``__name__`` has the value +``'__main__'``; in that case, the test code runs. Otherwise, if the +module is being imported, the test code is skipped. + +As an exercise, type this example into a file named wc.py and run it as +a script. Then run the Python interpreter and import wc. What is the +value of ``__name__`` when the module is being imported? + +Warning: If you import a module that has already been imported, Python +does nothing. It does not re-read the file, even if it has changed. + +If you want to reload a module, you can use the built-in function +reload, but it can be tricky, so the safest thing to do is restart the +interpreter and then import the module again. + +Debugging +--------- + +When you are reading and writing files, you might run into problems with +whitespace. These errors can be hard to debug because spaces, tabs and +newlines are normally invisible: + +:: + + >>> s = '1 2\t 3\n 4' + >>> print(s) + 1 2 3 + 4 + +The built-in function repr can help. It takes any object as an argument +and returns a string representation of the object. For strings, it +represents whitespace characters with backslash sequences: + +:: + + >>> print(repr(s)) + '1 2\t 3\n 4' + +This can be helpful for debugging. + +One other problem you might run into is that different systems use +different characters to indicate the end of a line. Some systems use a +newline, represented ``\n``. Others use a return character, represented +``\r``. Some use both. If you move files between different systems, +these inconsistencies can cause problems. + +For most systems, there are applications to convert from one format to +another. You can find them (and read more about this issue) at +http://en.wikipedia.org/wiki/Newline. Or, of course, you could write one +yourself. + +Glossary +-------- + +persistent: + Pertaining to a program that runs indefinitely and keeps at least + some of its data in permanent storage. + +format operator: + An operator, %, that takes a format string and a tuple and generates + a string that includes the elements of the tuple formatted as + specified by the format string. + +format string: + A string, used with the format operator, that contains format + sequences. + +format sequence: + A sequence of characters in a format string, like %d, that specifies + how a value should be formatted. + +text file: + A sequence of characters stored in permanent storage like a hard + drive. + +directory: + A named collection of files, also called a folder. + +path: + A string that identifies a file. + +relative path: + A path that starts from the current directory. + +absolute path: + A path that starts from the topmost directory in the file system. + +catch: + To prevent an exception from terminating a program using the try and + except statements. + +database: + A file whose contents are organized like a dictionary with keys that + correspond to values. + +bytes object: + An object similar to a string. + +shell: + A program that allows users to type commands and then executes them + by starting other programs. + +pipe object: + An object that represents a running program, allowing a Python + program to run commands and read the results. + +Exercises +--------- + +Write a function called sed that takes as arguments a pattern string, a +replacement string, and two filenames; it should read the first file and +write the contents into the second file (creating it if necessary). If +the pattern string appears anywhere in the file, it should be replaced +with the replacement string. + +If an error occurs while opening, reading, writing or closing files, +your program should catch the exception, print an error message, and +exit. Solution: http://thinkpython2.com/code/sed.py. + +If you download my solution to Exercise [anagrams] from +http://thinkpython2.com/code/anagram_sets.py, you’ll see that it creates +a dictionary that maps from a sorted string of letters to the list of +words that can be spelled with those letters. For example, ``'opst'`` +maps to the list ``['opts', 'post', 'pots', 'spot', 'stop', 'tops']``. + +Write a module that imports ``anagram_sets`` and provides two new +functions: ``store_anagrams`` should store the anagram dictionary in a +“shelf”; ``read_anagrams`` should look up a word and return a list of +its anagrams. Solution: http://thinkpython2.com/code/anagram_db.py. + +[checksum] + +In a large collection of MP3 files, there may be more than one copy of +the same song, stored in different directories or with different file +names. The goal of this exercise is to search for duplicates. + +#. Write a program that searches a directory and all of its + subdirectories, recursively, and returns a list of complete paths for + all files with a given suffix (like .mp3). Hint: os.path provides + several useful functions for manipulating file and path names. + +#. To recognize duplicates, you can use md5sum to compute a “checksum” + for each files. If two files have the same checksum, they probably + have the same contents. + +#. To double-check, you can use the Unix command diff. + +Solution: http://thinkpython2.com/code/find_duplicates.py. diff --git a/book/15-cls-object.rst b/book/15-cls-object.rst new file mode 100644 index 0000000..2494868 --- /dev/null +++ b/book/15-cls-object.rst @@ -0,0 +1,488 @@ +Classes and objects +=================== + +At this point you know how to use functions to organize code and +built-in types to organize data. The next step is to learn +“object-oriented programming”, which uses programmer-defined types to +organize both code and data. Object-oriented programming is a big topic; +it will take a few chapters to get there. + +Code examples from this chapter are available from +http://thinkpython2.com/code/Point1.py; solutions to the exercises are +available from http://thinkpython2.com/code/Point1_soln.py. + +Programmer-defined types +------------------------ + +We have used many of Python’s built-in types; now we are going to define +a new type. As an example, we will create a type called Point that +represents a point in two-dimensional space. + +In mathematical notation, points are often written in parentheses with a +comma separating the coordinates. For example, :math:`(0,0)` represents +the origin, and :math:`(x,y)` represents the point :math:`x` units to +the right and :math:`y` units up from the origin. + +There are several ways we might represent points in Python: + +- We could store the coordinates separately in two variables, x and y. + +- We could store the coordinates as elements in a list or tuple. + +- We could create a new type to represent points as objects. + +Creating a new type is more complicated than the other options, but it +has advantages that will be apparent soon. + +A programmer-defined type is also called a **class**. A class definition +looks like this: + +:: + + class Point: + """Represents a point in 2-D space.""" + +The header indicates that the new class is called Point. The body is a +docstring that explains what the class is for. You can define variables +and methods inside a class definition, but we will get back to that +later. + +Defining a class named Point creates a **class object**. + +:: + + >>> Point + + +Because Point is defined at the top level, its “full name” is +``__main__.Point``. + +The class object is like a factory for creating objects. To create a +Point, you call Point as if it were a function. + +:: + + >>> blank = Point() + >>> blank + <__main__.Point object at 0xb7e9d3ac> + +The return value is a reference to a Point object, which we assign to +blank. + +Creating a new object is called **instantiation**, and the object is an +**instance** of the class. + +When you print an instance, Python tells you what class it belongs to +and where it is stored in memory (the prefix 0x means that the following +number is in hexadecimal). + +Every object is an instance of some class, so “object” and “instance” +are interchangeable. But in this chapter I use “instance” to indicate +that I am talking about a programmer-defined type. + +Attributes +---------- + +You can assign values to an instance using dot notation: + +:: + + >>> blank.x = 3.0 + >>> blank.y = 4.0 + +This syntax is similar to the syntax for selecting a variable from a +module, such as math.pi or string.whitespace. In this case, though, we +are assigning values to named elements of an object. These elements are +called **attributes**. + +As a noun, “AT-trib-ute” is pronounced with emphasis on the first +syllable, as opposed to “a-TRIB-ute”, which is a verb. + +The following diagram shows the result of these assignments. A state +diagram that shows an object and its attributes is called an **object +diagram**; see Figure [fig.point]. + +.. figure:: figs/point.pdf + :alt: Object diagram. + + Object diagram. + +The variable blank refers to a Point object, which contains two +attributes. Each attribute refers to a floating-point number. + +You can read the value of an attribute using the same syntax: + +:: + + >>> blank.y + 4.0 + >>> x = blank.x + >>> x + 3.0 + +The expression blank.x means, “Go to the object blank refers to and get +the value of x.” In the example, we assign that value to a variable +named x. There is no conflict between the variable x and the attribute +x. + +You can use dot notation as part of any expression. For example: + +:: + + >>> '(%g, %g)' % (blank.x, blank.y) + '(3.0, 4.0)' + >>> distance = math.sqrt(blank.x**2 + blank.y**2) + >>> distance + 5.0 + +You can pass an instance as an argument in the usual way. For example: + +:: + + def print_point(p): + print('(%g, %g)' % (p.x, p.y)) + +``print_point`` takes a point as an argument and displays it in +mathematical notation. To invoke it, you can pass blank as an argument: + +:: + + >>> print_point(blank) + (3.0, 4.0) + +Inside the function, p is an alias for blank, so if the function +modifies p, blank changes. + +As an exercise, write a function called ``distance_between_points`` that +takes two Points as arguments and returns the distance between them. + +Rectangles +---------- + +Sometimes it is obvious what the attributes of an object should be, but +other times you have to make decisions. For example, imagine you are +designing a class to represent rectangles. What attributes would you use +to specify the location and size of a rectangle? You can ignore angle; +to keep things simple, assume that the rectangle is either vertical or +horizontal. + +There are at least two possibilities: + +- You could specify one corner of the rectangle (or the center), the + width, and the height. + +- You could specify two opposing corners. + +At this point it is hard to say whether either is better than the other, +so we’ll implement the first one, just as an example. + +Here is the class definition: + +:: + + class Rectangle: + """Represents a rectangle. + + attributes: width, height, corner. + """ + +The docstring lists the attributes: width and height are numbers; corner +is a Point object that specifies the lower-left corner. + +To represent a rectangle, you have to instantiate a Rectangle object and +assign values to the attributes: + +:: + + box = Rectangle() + box.width = 100.0 + box.height = 200.0 + box.corner = Point() + box.corner.x = 0.0 + box.corner.y = 0.0 + +The expression box.corner.x means, “Go to the object box refers to and +select the attribute named corner; then go to that object and select the +attribute named x.” + +.. figure:: figs/rectangle.pdf + :alt: Object diagram. + + Object diagram. + +Figure [fig.rectangle] shows the state of this object. An object that is +an attribute of another object is **embedded**. + +Instances as return values +-------------------------- + +Functions can return instances. For example, ``find_center`` takes a +Rectangle as an argument and returns a Point that contains the +coordinates of the center of the Rectangle: + +:: + + def find_center(rect): + p = Point() + p.x = rect.corner.x + rect.width/2 + p.y = rect.corner.y + rect.height/2 + return p + +Here is an example that passes box as an argument and assigns the +resulting Point to center: + +:: + + >>> center = find_center(box) + >>> print_point(center) + (50, 100) + +Objects are mutable +------------------- + +You can change the state of an object by making an assignment to one of +its attributes. For example, to change the size of a rectangle without +changing its position, you can modify the values of width and height: + +:: + + box.width = box.width + 50 + box.height = box.height + 100 + +You can also write functions that modify objects. For example, +``grow_rectangle`` takes a Rectangle object and two numbers, dwidth and +dheight, and adds the numbers to the width and height of the rectangle: + +:: + + def grow_rectangle(rect, dwidth, dheight): + rect.width += dwidth + rect.height += dheight + +Here is an example that demonstrates the effect: + +:: + + >>> box.width, box.height + (150.0, 300.0) + >>> grow_rectangle(box, 50, 100) + >>> box.width, box.height + (200.0, 400.0) + +Inside the function, rect is an alias for box, so when the function +modifies rect, box changes. + +As an exercise, write a function named ``move_rectangle`` that takes a +Rectangle and two numbers named dx and dy. It should change the location +of the rectangle by adding dx to the x coordinate of corner and adding +dy to the y coordinate of corner. + +Copying +------- + +Aliasing can make a program difficult to read because changes in one +place might have unexpected effects in another place. It is hard to keep +track of all the variables that might refer to a given object. + +Copying an object is often an alternative to aliasing. The copy module +contains a function called copy that can duplicate any object: + +:: + + >>> p1 = Point() + >>> p1.x = 3.0 + >>> p1.y = 4.0 + + >>> import copy + >>> p2 = copy.copy(p1) + +p1 and p2 contain the same data, but they are not the same Point. + +:: + + >>> print_point(p1) + (3, 4) + >>> print_point(p2) + (3, 4) + >>> p1 is p2 + False + >>> p1 == p2 + False + +The is operator indicates that p1 and p2 are not the same object, which +is what we expected. But you might have expected == to yield True +because these points contain the same data. In that case, you will be +disappointed to learn that for instances, the default behavior of the == +operator is the same as the is operator; it checks object identity, not +object equivalence. That’s because for programmer-defined types, Python +doesn’t know what should be considered equivalent. At least, not yet. + +If you use copy.copy to duplicate a Rectangle, you will find that it +copies the Rectangle object but not the embedded Point. + +:: + + >>> box2 = copy.copy(box) + >>> box2 is box + False + >>> box2.corner is box.corner + True + +.. figure:: figs/rectangle2.pdf + :alt: Object diagram. + + Object diagram. + +Figure [fig.rectangle2] shows what the object diagram looks like. This +operation is called a **shallow copy** because it copies the object and +any references it contains, but not the embedded objects. + +For most applications, this is not what you want. In this example, +invoking ``grow_rectangle`` on one of the Rectangles would not affect +the other, but invoking ``move_rectangle`` on either would affect both! +This behavior is confusing and error-prone. + +Fortunately, the copy module provides a method named deepcopy that +copies not only the object but also the objects it refers to, and the +objects *they* refer to, and so on. You will not be surprised to learn +that this operation is called a **deep copy**. + +:: + + >>> box3 = copy.deepcopy(box) + >>> box3 is box + False + >>> box3.corner is box.corner + False + +box3 and box are completely separate objects. + +As an exercise, write a version of ``move_rectangle`` that creates and +returns a new Rectangle instead of modifying the old one. + +Debugging +--------- + +When you start working with objects, you are likely to encounter some +new exceptions. If you try to access an attribute that doesn’t exist, +you get an AttributeError: + +:: + + >>> p = Point() + >>> p.x = 3 + >>> p.y = 4 + >>> p.z + AttributeError: Point instance has no attribute 'z' + +If you are not sure what type an object is, you can ask: + +:: + + >>> type(p) + + +You can also use isinstance to check whether an object is an instance of +a class: + +:: + + >>> isinstance(p, Point) + True + +If you are not sure whether an object has a particular attribute, you +can use the built-in function hasattr: + +:: + + >>> hasattr(p, 'x') + True + >>> hasattr(p, 'z') + False + +The first argument can be any object; the second argument is a *string* +that contains the name of the attribute. + +You can also use a try statement to see if the object has the attributes +you need: + +:: + + try: + x = p.x + except AttributeError: + x = 0 + +This approach can make it easier to write functions that work with +different types; more on that topic is coming up in +Section [polymorphism]. + +Glossary +-------- + +class: + A programmer-defined type. A class definition creates a new class + object. + +class object: + An object that contains information about a programmer-defined type. + The class object can be used to create instances of the type. + +instance: + An object that belongs to a class. + +instantiate: + To create a new object. + +attribute: + One of the named values associated with an object. + +embedded object: + An object that is stored as an attribute of another object. + +shallow copy: + To copy the contents of an object, including any references to + embedded objects; implemented by the copy function in the copy + module. + +deep copy: + To copy the contents of an object as well as any embedded objects, + and any objects embedded in them, and so on; implemented by the + deepcopy function in the copy module. + +object diagram: + A diagram that shows objects, their attributes, and the values of + the attributes. + +Exercises +--------- + +Write a definition for a class named Circle with attributes center and +radius, where center is a Point object and radius is a number. + +Instantiate a Circle object that represents a circle with its center at +:math:`(150, 100)` and radius 75. + +Write a function named ``point_in_circle`` that takes a Circle and a +Point and returns True if the Point lies in or on the boundary of the +circle. + +Write a function named ``rect_in_circle`` that takes a Circle and a +Rectangle and returns True if the Rectangle lies entirely in or on the +boundary of the circle. + +Write a function named ``rect_circle_overlap`` that takes a Circle and a +Rectangle and returns True if any of the corners of the Rectangle fall +inside the circle. Or as a more challenging version, return True if any +part of the Rectangle falls inside the circle. + +Solution: http://thinkpython2.com/code/Circle.py. + +Write a function called ``draw_rect`` that takes a Turtle object and a +Rectangle and uses the Turtle to draw the Rectangle. See +Chapter [turtlechap] for examples using Turtle objects. + +Write a function called ``draw_circle`` that takes a Turtle and a Circle +and draws the Circle. + +Solution: http://thinkpython2.com/code/draw.py. diff --git a/book/16-cls-fn.rst b/book/16-cls-fn.rst new file mode 100644 index 0000000..45524f1 --- /dev/null +++ b/book/16-cls-fn.rst @@ -0,0 +1,384 @@ +Classes and functions +===================== + +Now that we know how to create new types, the next step is to write +functions that take programmer-defined objects as parameters and return +them as results. In this chapter I also present “functional programming +style” and two new program development plans. + +Code examples from this chapter are available from +http://thinkpython2.com/code/Time1.py. Solutions to the exercises are at +http://thinkpython2.com/code/Time1_soln.py. + +Time +---- + +As another example of a programmer-defined type, we’ll define a class +called Time that records the time of day. The class definition looks +like this: + +:: + + class Time: + """Represents the time of day. + + attributes: hour, minute, second + """ + +We can create a new Time object and assign attributes for hours, +minutes, and seconds: + +:: + + time = Time() + time.hour = 11 + time.minute = 59 + time.second = 30 + +The state diagram for the Time object looks like Figure [fig.time]. + +As an exercise, write a function called ``print_time`` that takes a Time +object and prints it in the form hour:minute:second. Hint: the format +sequence ``'%.2d'`` prints an integer using at least two digits, +including a leading zero if necessary. + +Write a boolean function called ``is_after`` that takes two Time +objects, t1 and t2, and returns True if t1 follows t2 chronologically +and False otherwise. Challenge: don’t use an if statement. + +.. figure:: figs/time.pdf + :alt: Object diagram. + + Object diagram. + +Pure functions +-------------- + +In the next few sections, we’ll write two functions that add time +values. They demonstrate two kinds of functions: pure functions and +modifiers. They also demonstrate a development plan I’ll call +**prototype and patch**, which is a way of tackling a complex problem by +starting with a simple prototype and incrementally dealing with the +complications. + +Here is a simple prototype of ``add_time``: + +:: + + def add_time(t1, t2): + sum = Time() + sum.hour = t1.hour + t2.hour + sum.minute = t1.minute + t2.minute + sum.second = t1.second + t2.second + return sum + +The function creates a new Time object, initializes its attributes, and +returns a reference to the new object. This is called a **pure +function** because it does not modify any of the objects passed to it as +arguments and it has no effect, like displaying a value or getting user +input, other than returning a value. + +To test this function, I’ll create two Time objects: start contains the +start time of a movie, like *Monty Python and the Holy Grail*, and +duration contains the run time of the movie, which is one hour 35 +minutes. + +``add_time`` figures out when the movie will be done. + +:: + + >>> start = Time() + >>> start.hour = 9 + >>> start.minute = 45 + >>> start.second = 0 + + >>> duration = Time() + >>> duration.hour = 1 + >>> duration.minute = 35 + >>> duration.second = 0 + + >>> done = add_time(start, duration) + >>> print_time(done) + 10:80:00 + +The result, 10:80:00 might not be what you were hoping for. The problem +is that this function does not deal with cases where the number of +seconds or minutes adds up to more than sixty. When that happens, we +have to “carry” the extra seconds into the minute column or the extra +minutes into the hour column. + +Here’s an improved version: + +:: + + def add_time(t1, t2): + sum = Time() + sum.hour = t1.hour + t2.hour + sum.minute = t1.minute + t2.minute + sum.second = t1.second + t2.second + + if sum.second >= 60: + sum.second -= 60 + sum.minute += 1 + + if sum.minute >= 60: + sum.minute -= 60 + sum.hour += 1 + + return sum + +Although this function is correct, it is starting to get big. We will +see a shorter alternative later. + +Modifiers +--------- + +Sometimes it is useful for a function to modify the objects it gets as +parameters. In that case, the changes are visible to the caller. +Functions that work this way are called **modifiers**. + +increment, which adds a given number of seconds to a Time object, can be +written naturally as a modifier. Here is a rough draft: + +:: + + def increment(time, seconds): + time.second += seconds + + if time.second >= 60: + time.second -= 60 + time.minute += 1 + + if time.minute >= 60: + time.minute -= 60 + time.hour += 1 + +The first line performs the basic operation; the remainder deals with +the special cases we saw before. + +Is this function correct? What happens if seconds is much greater than +sixty? + +In that case, it is not enough to carry once; we have to keep doing it +until time.second is less than sixty. One solution is to replace the if +statements with while statements. That would make the function correct, +but not very efficient. As an exercise, write a correct version of +increment that doesn’t contain any loops. + +Anything that can be done with modifiers can also be done with pure +functions. In fact, some programming languages only allow pure +functions. There is some evidence that programs that use pure functions +are faster to develop and less error-prone than programs that use +modifiers. But modifiers are convenient at times, and functional +programs tend to be less efficient. + +In general, I recommend that you write pure functions whenever it is +reasonable and resort to modifiers only if there is a compelling +advantage. This approach might be called a **functional programming +style**. + +As an exercise, write a “pure” version of increment that creates and +returns a new Time object rather than modifying the parameter. + +Prototyping versus planning +--------------------------- + +The development plan I am demonstrating is called “prototype and patch”. +For each function, I wrote a prototype that performed the basic +calculation and then tested it, patching errors along the way. + +This approach can be effective, especially if you don’t yet have a deep +understanding of the problem. But incremental corrections can generate +code that is unnecessarily complicated—since it deals with many special +cases—and unreliable—since it is hard to know if you have found all the +errors. + +An alternative is **designed development**, in which high-level insight +into the problem can make the programming much easier. In this case, the +insight is that a Time object is really a three-digit number in base 60 +(see http://en.wikipedia.org/wiki/Sexagesimal.)! The second attribute is +the “ones column”, the minute attribute is the “sixties column”, and the +hour attribute is the “thirty-six hundreds column”. + +When we wrote ``add_time`` and increment, we were effectively doing +addition in base 60, which is why we had to carry from one column to the +next. + +This observation suggests another approach to the whole problem—we can +convert Time objects to integers and take advantage of the fact that the +computer knows how to do integer arithmetic. + +Here is a function that converts Times to integers: + +:: + + def time_to_int(time): + minutes = time.hour * 60 + time.minute + seconds = minutes * 60 + time.second + return seconds + +And here is a function that converts an integer to a Time (recall that +divmod divides the first argument by the second and returns the quotient +and remainder as a tuple). + +:: + + def int_to_time(seconds): + time = Time() + minutes, time.second = divmod(seconds, 60) + time.hour, time.minute = divmod(minutes, 60) + return time + +You might have to think a bit, and run some tests, to convince yourself +that these functions are correct. One way to test them is to check that +``time_to_int(int_to_time(x)) == x`` for many values of x. This is an +example of a consistency check. + +Once you are convinced they are correct, you can use them to rewrite +``add_time``: + +:: + + def add_time(t1, t2): + seconds = time_to_int(t1) + time_to_int(t2) + return int_to_time(seconds) + +This version is shorter than the original, and easier to verify. As an +exercise, rewrite increment using ``time_to_int`` and ``int_to_time``. + +In some ways, converting from base 60 to base 10 and back is harder than +just dealing with times. Base conversion is more abstract; our intuition +for dealing with time values is better. + +But if we have the insight to treat times as base 60 numbers and make +the investment of writing the conversion functions (``time_to_int`` and +``int_to_time``), we get a program that is shorter, easier to read and +debug, and more reliable. + +It is also easier to add features later. For example, imagine +subtracting two Times to find the duration between them. The naive +approach would be to implement subtraction with borrowing. Using the +conversion functions would be easier and more likely to be correct. + +Ironically, sometimes making a problem harder (or more general) makes it +easier (because there are fewer special cases and fewer opportunities +for error). + +Debugging +--------- + +A Time object is well-formed if the values of minute and second are +between 0 and 60 (including 0 but not 60) and if hour is positive. hour +and minute should be integral values, but we might allow second to have +a fraction part. + +Requirements like these are called **invariants** because they should +always be true. To put it a different way, if they are not true, +something has gone wrong. + +Writing code to check invariants can help detect errors and find their +causes. For example, you might have a function like ``valid_time`` that +takes a Time object and returns False if it violates an invariant: + +:: + + def valid_time(time): + if time.hour < 0 or time.minute < 0 or time.second < 0: + return False + if time.minute >= 60 or time.second >= 60: + return False + return True + +At the beginning of each function you could check the arguments to make +sure they are valid: + +:: + + def add_time(t1, t2): + if not valid_time(t1) or not valid_time(t2): + raise ValueError('invalid Time object in add_time') + seconds = time_to_int(t1) + time_to_int(t2) + return int_to_time(seconds) + +Or you could use an **assert statement**, which checks a given invariant +and raises an exception if it fails: + +:: + + def add_time(t1, t2): + assert valid_time(t1) and valid_time(t2) + seconds = time_to_int(t1) + time_to_int(t2) + return int_to_time(seconds) + +assert statements are useful because they distinguish code that deals +with normal conditions from code that checks for errors. + +Glossary +-------- + +prototype and patch: + A development plan that involves writing a rough draft of a program, + testing, and correcting errors as they are found. + +designed development: + A development plan that involves high-level insight into the problem + and more planning than incremental development or prototype + development. + +pure function: + A function that does not modify any of the objects it receives as + arguments. Most pure functions are fruitful. + +modifier: + A function that changes one or more of the objects it receives as + arguments. Most modifiers are void; that is, they return None. + +functional programming style: + A style of program design in which the majority of functions are + pure. + +invariant: + A condition that should always be true during the execution of a + program. + +assert statement: + A statement that check a condition and raises an exception if it + fails. + +Exercises +--------- + +Code examples from this chapter are available from +http://thinkpython2.com/code/Time1.py; solutions to the exercises are +available from http://thinkpython2.com/code/Time1_soln.py. + +Write a function called ``mul_time`` that takes a Time object and a +number and returns a new Time object that contains the product of the +original Time and the number. + +Then use ``mul_time`` to write a function that takes a Time object that +represents the finishing time in a race, and a number that represents +the distance, and returns a Time object that represents the average pace +(time per mile). + +The datetime module provides time objects that are similar to the Time +objects in this chapter, but they provide a rich set of methods and +operators. Read the documentation at +http://docs.python.org/3/library/datetime.html. + +#. Use the datetime module to write a program that gets the current date + and prints the day of the week. + +#. Write a program that takes a birthday as input and prints the user’s + age and the number of days, hours, minutes and seconds until their + next birthday. + +#. For two people born on different days, there is a day when one is + twice as old as the other. That’s their Double Day. Write a program + that takes two birthdays and computes their Double Day. + +#. For a little more challenge, write the more general version that + computes the day when one person is :math:`n` times older than the + other. + +Solution: http://thinkpython2.com/code/double.py diff --git a/book/17-cls-meth.rst b/book/17-cls-meth.rst new file mode 100644 index 0000000..e639bde --- /dev/null +++ b/book/17-cls-meth.rst @@ -0,0 +1,653 @@ +Classes and methods +=================== + +Although we are using some of Python’s object-oriented features, the +programs from the last two chapters are not really object-oriented +because they don’t represent the relationships between +programmer-defined types and the functions that operate on them. The +next step is to transform those functions into methods that make the +relationships explicit. + +Code examples from this chapter are available from +http://thinkpython2.com/code/Time2.py, and solutions to the exercises +are in http://thinkpython2.com/code/Point2_soln.py. + +Object-oriented features +------------------------ + +Python is an **object-oriented programming language**, which means that +it provides features that support object-oriented programming, which has +these defining characteristics: + +- Programs include class and method definitions. + +- Most of the computation is expressed in terms of operations on + objects. + +- Objects often represent things in the real world, and methods often + correspond to the ways things in the real world interact. + +For example, the Time class defined in Chapter [time] corresponds to the +way people record the time of day, and the functions we defined +correspond to the kinds of things people do with times. Similarly, the +Point and Rectangle classes in Chapter [clobjects] correspond to the +mathematical concepts of a point and a rectangle. + +So far, we have not taken advantage of the features Python provides to +support object-oriented programming. These features are not strictly +necessary; most of them provide alternative syntax for things we have +already done. But in many cases, the alternative is more concise and +more accurately conveys the structure of the program. + +For example, in Time1.py there is no obvious connection between the +class definition and the function definitions that follow. With some +examination, it is apparent that every function takes at least one Time +object as an argument. + +This observation is the motivation for **methods**; a method is a +function that is associated with a particular class. We have seen +methods for strings, lists, dictionaries and tuples. In this chapter, we +will define methods for programmer-defined types. + +Methods are semantically the same as functions, but there are two +syntactic differences: + +- Methods are defined inside a class definition in order to make the + relationship between the class and the method explicit. + +- The syntax for invoking a method is different from the syntax for + calling a function. + +In the next few sections, we will take the functions from the previous +two chapters and transform them into methods. This transformation is +purely mechanical; you can do it by following a sequence of steps. If +you are comfortable converting from one form to another, you will be +able to choose the best form for whatever you are doing. + +Printing objects +---------------- + +In Chapter [time], we defined a class named Time and in +Section [isafter], you wrote a function named ``print_time``: + +:: + + class Time: + """Represents the time of day.""" + + def print_time(time): + print('%.2d:%.2d:%.2d' % (time.hour, time.minute, time.second)) + +To call this function, you have to pass a Time object as an argument: + +:: + + >>> start = Time() + >>> start.hour = 9 + >>> start.minute = 45 + >>> start.second = 00 + >>> print_time(start) + 09:45:00 + +To make ``print_time`` a method, all we have to do is move the function +definition inside the class definition. Notice the change in +indentation. + +:: + + class Time: + def print_time(time): + print('%.2d:%.2d:%.2d' % (time.hour, time.minute, time.second)) + +Now there are two ways to call ``print_time``. The first (and less +common) way is to use function syntax: + +:: + + >>> Time.print_time(start) + 09:45:00 + +In this use of dot notation, Time is the name of the class, and +``print_time`` is the name of the method. start is passed as a +parameter. + +The second (and more concise) way is to use method syntax: + +:: + + >>> start.print_time() + 09:45:00 + +In this use of dot notation, ``print_time`` is the name of the method +(again), and start is the object the method is invoked on, which is +called the **subject**. Just as the subject of a sentence is what the +sentence is about, the subject of a method invocation is what the method +is about. + +Inside the method, the subject is assigned to the first parameter, so in +this case start is assigned to time. + +By convention, the first parameter of a method is called self, so it +would be more common to write ``print_time`` like this: + +:: + + class Time: + def print_time(self): + print('%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second)) + +The reason for this convention is an implicit metaphor: + +- The syntax for a function call, ``print_time(start)``, suggests that + the function is the active agent. It says something like, “Hey + ``print_time``! Here’s an object for you to print.” + +- In object-oriented programming, the objects are the active agents. A + method invocation like ``start.print_time()`` says “Hey start! Please + print yourself.” + +This change in perspective might be more polite, but it is not obvious +that it is useful. In the examples we have seen so far, it may not be. +But sometimes shifting responsibility from the functions onto the +objects makes it possible to write more versatile functions (or +methods), and makes it easier to maintain and reuse code. + +As an exercise, rewrite ``time_to_int`` (from Section [prototype]) as a +method. You might be tempted to rewrite ``int_to_time`` as a method, +too, but that doesn’t really make sense because there would be no object +to invoke it on. + +Another example +--------------- + +Here’s a version of increment (from Section [increment]) rewritten as a +method: + +:: + + # inside class Time: + + def increment(self, seconds): + seconds += self.time_to_int() + return int_to_time(seconds) + +This version assumes that ``time_to_int`` is written as a method. Also, +note that it is a pure function, not a modifier. + +Here’s how you would invoke increment: + +:: + + >>> start.print_time() + 09:45:00 + >>> end = start.increment(1337) + >>> end.print_time() + 10:07:17 + +The subject, start, gets assigned to the first parameter, self. The +argument, 1337, gets assigned to the second parameter, seconds. + +This mechanism can be confusing, especially if you make an error. For +example, if you invoke increment with two arguments, you get: + +:: + + >>> end = start.increment(1337, 460) + TypeError: increment() takes 2 positional arguments but 3 were given + +The error message is initially confusing, because there are only two +arguments in parentheses. But the subject is also considered an +argument, so all together that’s three. + +By the way, a **positional argument** is an argument that doesn’t have a +parameter name; that is, it is not a keyword argument. In this function +call: + +:: + + sketch(parrot, cage, dead=True) + +parrot and cage are positional, and dead is a keyword argument. + +A more complicated example +-------------------------- + +Rewriting ``is_after`` (from Section [isafter]) is slightly more +complicated because it takes two Time objects as parameters. In this +case it is conventional to name the first parameter self and the second +parameter other: + +:: + + # inside class Time: + + def is_after(self, other): + return self.time_to_int() > other.time_to_int() + +To use this method, you have to invoke it on one object and pass the +other as an argument: + +:: + + >>> end.is_after(start) + True + +One nice thing about this syntax is that it almost reads like English: +“end is after start?” + +The init method +--------------- + +The init method (short for “initialization”) is a special method that +gets invoked when an object is instantiated. Its full name is +``__init__`` (two underscore characters, followed by init, and then two +more underscores). An init method for the Time class might look like +this: + +:: + + # inside class Time: + + def __init__(self, hour=0, minute=0, second=0): + self.hour = hour + self.minute = minute + self.second = second + +It is common for the parameters of ``__init__`` to have the same names +as the attributes. The statement + +:: + + self.hour = hour + +stores the value of the parameter hour as an attribute of self. + +The parameters are optional, so if you call Time with no arguments, you +get the default values. + +:: + + >>> time = Time() + >>> time.print_time() + 00:00:00 + +If you provide one argument, it overrides hour: + +:: + + >>> time = Time (9) + >>> time.print_time() + 09:00:00 + +If you provide two arguments, they override hour and minute. + +:: + + >>> time = Time(9, 45) + >>> time.print_time() + 09:45:00 + +And if you provide three arguments, they override all three default +values. + +As an exercise, write an init method for the Point class that takes x +and y as optional parameters and assigns them to the corresponding +attributes. + +The \_\_str\_\_ method +---------------------- + +``__str__`` is a special method, like ``__init__``, that is supposed to +return a string representation of an object. + +For example, here is a str method for Time objects: + +:: + + # inside class Time: + + def __str__(self): + return '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) + +When you print an object, Python invokes the str method: + +:: + + >>> time = Time(9, 45) + >>> print(time) + 09:45:00 + +When I write a new class, I almost always start by writing ``__init__``, +which makes it easier to instantiate objects, and ``__str__``, which is +useful for debugging. + +As an exercise, write a str method for the Point class. Create a Point +object and print it. + +Operator overloading +-------------------- + +By defining other special methods, you can specify the behavior of +operators on programmer-defined types. For example, if you define a +method named ``__add__`` for the Time class, you can use the + operator +on Time objects. + +Here is what the definition might look like: + +:: + + # inside class Time: + + def __add__(self, other): + seconds = self.time_to_int() + other.time_to_int() + return int_to_time(seconds) + +And here is how you could use it: + +:: + + >>> start = Time(9, 45) + >>> duration = Time(1, 35) + >>> print(start + duration) + 11:20:00 + +When you apply the + operator to Time objects, Python invokes +``__add__``. When you print the result, Python invokes ``__str__``. So +there is a lot happening behind the scenes! + +Changing the behavior of an operator so that it works with +programmer-defined types is called **operator overloading**. For every +operator in Python there is a corresponding special method, like +``__add__``. For more details, see +http://docs.python.org/3/reference/datamodel.html#specialnames. + +As an exercise, write an add method for the Point class. + +Type-based dispatch +------------------- + +In the previous section we added two Time objects, but you also might +want to add an integer to a Time object. The following is a version of +``__add__`` that checks the type of other and invokes either +``add_time`` or increment: + +:: + + # inside class Time: + + def __add__(self, other): + if isinstance(other, Time): + return self.add_time(other) + else: + return self.increment(other) + + def add_time(self, other): + seconds = self.time_to_int() + other.time_to_int() + return int_to_time(seconds) + + def increment(self, seconds): + seconds += self.time_to_int() + return int_to_time(seconds) + +The built-in function isinstance takes a value and a class object, and +returns True if the value is an instance of the class. + +If other is a Time object, ``__add__`` invokes ``add_time``. Otherwise +it assumes that the parameter is a number and invokes increment. This +operation is called a **type-based dispatch** because it dispatches the +computation to different methods based on the type of the arguments. + +Here are examples that use the + operator with different types: + +:: + + >>> start = Time(9, 45) + >>> duration = Time(1, 35) + >>> print(start + duration) + 11:20:00 + >>> print(start + 1337) + 10:07:17 + +Unfortunately, this implementation of addition is not commutative. If +the integer is the first operand, you get + +:: + + >>> print(1337 + start) + TypeError: unsupported operand type(s) for +: 'int' and 'instance' + +The problem is, instead of asking the Time object to add an integer, +Python is asking an integer to add a Time object, and it doesn’t know +how. But there is a clever solution for this problem: the special method +``__radd__``, which stands for “right-side add”. This method is invoked +when a Time object appears on the right side of the + operator. Here’s +the definition: + +:: + + # inside class Time: + + def __radd__(self, other): + return self.__add__(other) + +And here’s how it’s used: + +:: + + >>> print(1337 + start) + 10:07:17 + +As an exercise, write an add method for Points that works with either a +Point object or a tuple: + +- If the second operand is a Point, the method should return a new + Point whose :math:`x` coordinate is the sum of the :math:`x` + coordinates of the operands, and likewise for the :math:`y` + coordinates. + +- If the second operand is a tuple, the method should add the first + element of the tuple to the :math:`x` coordinate and the second + element to the :math:`y` coordinate, and return a new Point with the + result. + +Polymorphism +------------ + +Type-based dispatch is useful when it is necessary, but (fortunately) it +is not always necessary. Often you can avoid it by writing functions +that work correctly for arguments with different types. + +Many of the functions we wrote for strings also work for other sequence +types. For example, in Section [histogram] we used histogram to count +the number of times each letter appears in a word. + +:: + + def histogram(s): + d = dict() + for c in s: + if c not in d: + d[c] = 1 + else: + d[c] = d[c]+1 + return d + +This function also works for lists, tuples, and even dictionaries, as +long as the elements of s are hashable, so they can be used as keys in +d. + +:: + + >>> t = ['spam', 'egg', 'spam', 'spam', 'bacon', 'spam'] + >>> histogram(t) + {'bacon': 1, 'egg': 1, 'spam': 4} + +Functions that work with several types are called **polymorphic**. +Polymorphism can facilitate code reuse. For example, the built-in +function sum, which adds the elements of a sequence, works as long as +the elements of the sequence support addition. + +Since Time objects provide an add method, they work with sum: + +:: + + >>> t1 = Time(7, 43) + >>> t2 = Time(7, 41) + >>> t3 = Time(7, 37) + >>> total = sum([t1, t2, t3]) + >>> print(total) + 23:01:00 + +In general, if all of the operations inside a function work with a given +type, the function works with that type. + +The best kind of polymorphism is the unintentional kind, where you +discover that a function you already wrote can be applied to a type you +never planned for. + +Debugging +--------- + +It is legal to add attributes to objects at any point in the execution +of a program, but if you have objects with the same type that don’t have +the same attributes, it is easy to make mistakes. It is considered a +good idea to initialize all of an object’s attributes in the init +method. + +If you are not sure whether an object has a particular attribute, you +can use the built-in function hasattr (see Section [hasattr]). + +Another way to access attributes is the built-in function vars, which +takes an object and returns a dictionary that maps from attribute names +(as strings) to their values: + +:: + + >>> p = Point(3, 4) + >>> vars(p) + {'y': 4, 'x': 3} + +For purposes of debugging, you might find it useful to keep this +function handy: + +:: + + def print_attributes(obj): + for attr in vars(obj): + print(attr, getattr(obj, attr)) + +``print_attributes`` traverses the dictionary and prints each attribute +name and its corresponding value. + +The built-in function getattr takes an object and an attribute name (as +a string) and returns the attribute’s value. + +Interface and implementation +---------------------------- + +One of the goals of object-oriented design is to make software more +maintainable, which means that you can keep the program working when +other parts of the system change, and modify the program to meet new +requirements. + +A design principle that helps achieve that goal is to keep interfaces +separate from implementations. For objects, that means that the methods +a class provides should not depend on how the attributes are +represented. + +For example, in this chapter we developed a class that represents a time +of day. Methods provided by this class include ``time_to_int``, +``is_after``, and ``add_time``. + +We could implement those methods in several ways. The details of the +implementation depend on how we represent time. In this chapter, the +attributes of a Time object are hour, minute, and second. + +As an alternative, we could replace these attributes with a single +integer representing the number of seconds since midnight. This +implementation would make some methods, like ``is_after``, easier to +write, but it makes other methods harder. + +After you deploy a new class, you might discover a better +implementation. If other parts of the program are using your class, it +might be time-consuming and error-prone to change the interface. + +But if you designed the interface carefully, you can change the +implementation without changing the interface, which means that other +parts of the program don’t have to change. + +Glossary +-------- + +object-oriented language: + A language that provides features, such as programmer-defined types + and methods, that facilitate object-oriented programming. + +object-oriented programming: + A style of programming in which data and the operations that + manipulate it are organized into classes and methods. + +method: + A function that is defined inside a class definition and is invoked + on instances of that class. + +subject: + The object a method is invoked on. + +positional argument: + An argument that does not include a parameter name, so it is not a + keyword argument. + +operator overloading: + Changing the behavior of an operator like + so it works with a + programmer-defined type. + +type-based dispatch: + A programming pattern that checks the type of an operand and invokes + different functions for different types. + +polymorphic: + Pertaining to a function that can work with more than one type. + +information hiding: + The principle that the interface provided by an object should not + depend on its implementation, in particular the representation of + its attributes. + +Exercises +--------- + +Download the code from this chapter from +http://thinkpython2.com/code/Time2.py. Change the attributes of Time to +be a single integer representing seconds since midnight. Then modify the +methods (and the function ``int_to_time``) to work with the new +implementation. You should not have to modify the test code in main. +When you are done, the output should be the same as before. Solution: +http://thinkpython2.com/code/Time2_soln.py. + +[kangaroo] + +This exercise is a cautionary tale about one of the most common, and +difficult to find, errors in Python. Write a definition for a class +named Kangaroo with the following methods: + +#. An ``__init__`` method that initializes an attribute named + ``pouch_contents`` to an empty list. + +#. A method named ``put_in_pouch`` that takes an object of any type and + adds it to ``pouch_contents``. + +#. A ``__str__`` method that returns a string representation of the + Kangaroo object and the contents of the pouch. + +Test your code by creating two Kangaroo objects, assigning them to +variables named kanga and roo, and then adding roo to the contents of +kanga’s pouch. + +Download http://thinkpython2.com/code/BadKangaroo.py. It contains a +solution to the previous problem with one big, nasty bug. Find and fix +the bug. + +If you get stuck, you can download +http://thinkpython2.com/code/GoodKangaroo.py, which explains the problem +and demonstrates a solution. diff --git a/book/18-inherit.rst b/book/18-inherit.rst new file mode 100644 index 0000000..4b277b5 --- /dev/null +++ b/book/18-inherit.rst @@ -0,0 +1,772 @@ +Inheritance +=========== + +The language feature most often associated with object-oriented +programming is **inheritance**. Inheritance is the ability to define a +new class that is a modified version of an existing class. In this +chapter I demonstrate inheritance using classes that represent playing +cards, decks of cards, and poker hands. + +If you don’t play poker, you can read about it at +http://en.wikipedia.org/wiki/Poker, but you don’t have to; I’ll tell you +what you need to know for the exercises. + +Code examples from this chapter are available from +http://thinkpython2.com/code/Card.py. + +Card objects +------------ + +There are fifty-two cards in a deck, each of which belongs to one of +four suits and one of thirteen ranks. The suits are Spades, Hearts, +Diamonds, and Clubs (in descending order in bridge). The ranks are Ace, +2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, and King. Depending on the game +that you are playing, an Ace may be higher than King or lower than 2. + +If we want to define a new object to represent a playing card, it is +obvious what the attributes should be: rank and suit. It is not as +obvious what type the attributes should be. One possibility is to use +strings containing words like ``'Spade'`` for suits and ``'Queen'`` for +ranks. One problem with this implementation is that it would not be easy +to compare cards to see which had a higher rank or suit. + +An alternative is to use integers to **encode** the ranks and suits. In +this context, “encode” means that we are going to define a mapping +between numbers and suits, or between numbers and ranks. This kind of +encoding is not meant to be a secret (that would be “encryption”). + +For example, this table shows the suits and the corresponding integer +codes: + ++------------+-------------------+-----+ +| Spades | :math:`\mapsto` | 3 | ++------------+-------------------+-----+ +| Hearts | :math:`\mapsto` | 2 | ++------------+-------------------+-----+ +| Diamonds | :math:`\mapsto` | 1 | ++------------+-------------------+-----+ +| Clubs | :math:`\mapsto` | 0 | ++------------+-------------------+-----+ + +This code makes it easy to compare cards; because higher suits map to +higher numbers, we can compare suits by comparing their codes. + +The mapping for ranks is fairly obvious; each of the numerical ranks +maps to the corresponding integer, and for face cards: + ++---------+-------------------+------+ +| Jack | :math:`\mapsto` | 11 | ++---------+-------------------+------+ +| Queen | :math:`\mapsto` | 12 | ++---------+-------------------+------+ +| King | :math:`\mapsto` | 13 | ++---------+-------------------+------+ + +I am using the :math:`\mapsto` symbol to make it clear that these +mappings are not part of the Python program. They are part of the +program design, but they don’t appear explicitly in the code. + +The class definition for Card looks like this: + +:: + + class Card: + """Represents a standard playing card.""" + + def __init__(self, suit=0, rank=2): + self.suit = suit + self.rank = rank + +As usual, the init method takes an optional parameter for each +attribute. The default card is the 2 of Clubs. + +To create a Card, you call Card with the suit and rank of the card you +want. + +:: + + queen_of_diamonds = Card(1, 12) + +Class attributes +---------------- + +In order to print Card objects in a way that people can easily read, we +need a mapping from the integer codes to the corresponding ranks and +suits. A natural way to do that is with lists of strings. We assign +these lists to **class attributes**: + +:: + + # inside class Card: + + suit_names = ['Clubs', 'Diamonds', 'Hearts', 'Spades'] + rank_names = [None, 'Ace', '2', '3', '4', '5', '6', '7', + '8', '9', '10', 'Jack', 'Queen', 'King'] + + def __str__(self): + return '%s of %s' % (Card.rank_names[self.rank], + Card.suit_names[self.suit]) + +Variables like ``suit_names`` and ``rank_names``, which are defined +inside a class but outside of any method, are called class attributes +because they are associated with the class object Card. + +This term distinguishes them from variables like suit and rank, which +are called **instance attributes** because they are associated with a +particular instance. + +Both kinds of attribute are accessed using dot notation. For example, in +``__str__``, self is a Card object, and self.rank is its rank. +Similarly, Card is a class object, and ``Card.rank_names`` is a list of +strings associated with the class. + +Every card has its own suit and rank, but there is only one copy of +``suit_names`` and ``rank_names``. + +Putting it all together, the expression ``Card.rank_names[self.rank]`` +means “use the attribute rank from the object self as an index into the +list ``rank_names`` from the class Card, and select the appropriate +string.” + +The first element of ``rank_names`` is None because there is no card +with rank zero. By including None as a place-keeper, we get a mapping +with the nice property that the index 2 maps to the string ``'2'``, and +so on. To avoid this tweak, we could have used a dictionary instead of a +list. + +With the methods we have so far, we can create and print cards: + +:: + + >>> card1 = Card(2, 11) + >>> print(card1) + Jack of Hearts + +.. figure:: figs/card1.pdf + :alt: Object diagram. + + Object diagram. + +Figure [fig.card1] is a diagram of the Card class object and one Card +instance. Card is a class object; its type is type. card1 is an instance +of Card, so its type is Card. To save space, I didn’t draw the contents +of ``suit_names`` and ``rank_names``. + +Comparing cards +--------------- + +For built-in types, there are relational operators (<, >, ==, etc.) that +compare values and determine when one is greater than, less than, or +equal to another. For programmer-defined types, we can override the +behavior of the built-in operators by providing a method named +``__lt__``, which stands for “less than”. + +``__lt__`` takes two parameters, self and other, and True if self is +strictly less than other. + +The correct ordering for cards is not obvious. For example, which is +better, the 3 of Clubs or the 2 of Diamonds? One has a higher rank, but +the other has a higher suit. In order to compare cards, you have to +decide whether rank or suit is more important. + +The answer might depend on what game you are playing, but to keep things +simple, we’ll make the arbitrary choice that suit is more important, so +all of the Spades outrank all of the Diamonds, and so on. + +With that decided, we can write ``__lt__``: + +:: + + # inside class Card: + + def __lt__(self, other): + # check the suits + if self.suit < other.suit: return True + if self.suit > other.suit: return False + + # suits are the same... check ranks + return self.rank < other.rank + +You can write this more concisely using tuple comparison: + +:: + + # inside class Card: + + def __lt__(self, other): + t1 = self.suit, self.rank + t2 = other.suit, other.rank + return t1 < t2 + +As an exercise, write an ``__lt__`` method for Time objects. You can use +tuple comparison, but you also might consider comparing integers. + +Decks +----- + +Now that we have Cards, the next step is to define Decks. Since a deck +is made up of cards, it is natural for each Deck to contain a list of +cards as an attribute. + +The following is a class definition for Deck. The init method creates +the attribute cards and generates the standard set of fifty-two cards: + +:: + + class Deck: + + def __init__(self): + self.cards = [] + for suit in range(4): + for rank in range(1, 14): + card = Card(suit, rank) + self.cards.append(card) + +The easiest way to populate the deck is with a nested loop. The outer +loop enumerates the suits from 0 to 3. The inner loop enumerates the +ranks from 1 to 13. Each iteration creates a new Card with the current +suit and rank, and appends it to self.cards. + +Printing the deck +----------------- + +Here is a ``__str__`` method for Deck: + +:: + + #inside class Deck: + + def __str__(self): + res = [] + for card in self.cards: + res.append(str(card)) + return '\n'.join(res) + +This method demonstrates an efficient way to accumulate a large string: +building a list of strings and then using the string method join. The +built-in function str invokes the ``__str__`` method on each card and +returns the string representation. + +Since we invoke join on a newline character, the cards are separated by +newlines. Here’s what the result looks like: + +:: + + >>> deck = Deck() + >>> print(deck) + Ace of Clubs + 2 of Clubs + 3 of Clubs + ... + 10 of Spades + Jack of Spades + Queen of Spades + King of Spades + +Even though the result appears on 52 lines, it is one long string that +contains newlines. + +Add, remove, shuffle and sort +----------------------------- + +To deal cards, we would like a method that removes a card from the deck +and returns it. The list method pop provides a convenient way to do +that: + +:: + + #inside class Deck: + + def pop_card(self): + return self.cards.pop() + +Since pop removes the *last* card in the list, we are dealing from the +bottom of the deck. + +To add a card, we can use the list method append: + +:: + + #inside class Deck: + + def add_card(self, card): + self.cards.append(card) + +A method like this that uses another method without doing much work is +sometimes called a **veneer**. The metaphor comes from woodworking, +where a veneer is a thin layer of good quality wood glued to the surface +of a cheaper piece of wood to improve the appearance. + +In this case ``add_card`` is a “thin” method that expresses a list +operation in terms appropriate for decks. It improves the appearance, or +interface, of the implementation. + +As another example, we can write a Deck method named shuffle using the +function shuffle from the random module: + +:: + + # inside class Deck: + + def shuffle(self): + random.shuffle(self.cards) + +Don’t forget to import random. + +As an exercise, write a Deck method named sort that uses the list method +sort to sort the cards in a Deck. sort uses the ``__lt__`` method we +defined to determine the order. + +Inheritance +----------- + +Inheritance is the ability to define a new class that is a modified +version of an existing class. As an example, let’s say we want a class +to represent a “hand”, that is, the cards held by one player. A hand is +similar to a deck: both are made up of a collection of cards, and both +require operations like adding and removing cards. + +A hand is also different from a deck; there are operations we want for +hands that don’t make sense for a deck. For example, in poker we might +compare two hands to see which one wins. In bridge, we might compute a +score for a hand in order to make a bid. + +This relationship between classes—similar, but different—lends itself to +inheritance. To define a new class that inherits from an existing class, +you put the name of the existing class in parentheses: + +:: + + class Hand(Deck): + """Represents a hand of playing cards.""" + +This definition indicates that Hand inherits from Deck; that means we +can use methods like ``pop_card`` and ``add_card`` for Hands as well as +Decks. + +When a new class inherits from an existing one, the existing one is +called the **parent** and the new class is called the **child**. + +In this example, Hand inherits ``__init__`` from Deck, but it doesn’t +really do what we want: instead of populating the hand with 52 new +cards, the init method for Hands should initialize cards with an empty +list. + +If we provide an init method in the Hand class, it overrides the one in +the Deck class: + +:: + + # inside class Hand: + + def __init__(self, label=''): + self.cards = [] + self.label = label + +When you create a Hand, Python invokes this init method, not the one in +Deck. + +:: + + >>> hand = Hand('new hand') + >>> hand.cards + [] + >>> hand.label + 'new hand' + +The other methods are inherited from Deck, so we can use ``pop_card`` +and ``add_card`` to deal a card: + +:: + + >>> deck = Deck() + >>> card = deck.pop_card() + >>> hand.add_card(card) + >>> print(hand) + King of Spades + +A natural next step is to encapsulate this code in a method called +``move_cards``: + +:: + + #inside class Deck: + + def move_cards(self, hand, num): + for i in range(num): + hand.add_card(self.pop_card()) + +``move_cards`` takes two arguments, a Hand object and the number of +cards to deal. It modifies both self and hand, and returns None. + +In some games, cards are moved from one hand to another, or from a hand +back to the deck. You can use ``move_cards`` for any of these +operations: self can be either a Deck or a Hand, and hand, despite the +name, can also be a Deck. + +Inheritance is a useful feature. Some programs that would be repetitive +without inheritance can be written more elegantly with it. Inheritance +can facilitate code reuse, since you can customize the behavior of +parent classes without having to modify them. In some cases, the +inheritance structure reflects the natural structure of the problem, +which makes the design easier to understand. + +On the other hand, inheritance can make programs difficult to read. When +a method is invoked, it is sometimes not clear where to find its +definition. The relevant code may be spread across several modules. +Also, many of the things that can be done using inheritance can be done +as well or better without it. + +Class diagrams +-------------- + +So far we have seen stack diagrams, which show the state of a program, +and object diagrams, which show the attributes of an object and their +values. These diagrams represent a snapshot in the execution of a +program, so they change as the program runs. + +They are also highly detailed; for some purposes, too detailed. A class +diagram is a more abstract representation of the structure of a program. +Instead of showing individual objects, it shows classes and the +relationships between them. + +There are several kinds of relationship between classes: + +- Objects in one class might contain references to objects in another + class. For example, each Rectangle contains a reference to a Point, + and each Deck contains references to many Cards. This kind of + relationship is called **HAS-A**, as in, “a Rectangle has a Point.” + +- One class might inherit from another. This relationship is called + **IS-A**, as in, “a Hand is a kind of a Deck.” + +- One class might depend on another in the sense that objects in one + class take objects in the second class as parameters, or use objects + in the second class as part of a computation. This kind of + relationship is called a **dependency**. + +A **class diagram** is a graphical representation of these +relationships. For example, Figure [fig.class1] shows the relationships +between Card, Deck and Hand. + +.. figure:: figs/class1.pdf + :alt: Class diagram. + + Class diagram. + +The arrow with a hollow triangle head represents an IS-A relationship; +in this case it indicates that Hand inherits from Deck. + +The standard arrow head represents a HAS-A relationship; in this case a +Deck has references to Card objects. + +The star () near the arrow head is a **multiplicity**; it indicates how +many Cards a Deck has. A multiplicity can be a simple number, like 52, a +range, like 5..7 or a star, which indicates that a Deck can have any +number of Cards. + +There are no dependencies in this diagram. They would normally be shown +with a dashed arrow. Or if there are a lot of dependencies, they are +sometimes omitted. + +A more detailed diagram might show that a Deck actually contains a +*list* of Cards, but built-in types like list and dict are usually not +included in class diagrams. + +Debugging +--------- + +Inheritance can make debugging difficult because when you invoke a +method on an object, it might be hard to figure out which method will be +invoked. + +Suppose you are writing a function that works with Hand objects. You +would like it to work with all kinds of Hands, like PokerHands, +BridgeHands, etc. If you invoke a method like shuffle, you might get the +one defined in Deck, but if any of the subclasses override this method, +you’ll get that version instead. This behavior is usually a good thing, +but it can be confusing. + +Any time you are unsure about the flow of execution through your +program, the simplest solution is to add print statements at the +beginning of the relevant methods. If Deck.shuffle prints a message that +says something like Running Deck.shuffle, then as the program runs it +traces the flow of execution. + +As an alternative, you could use this function, which takes an object +and a method name (as a string) and returns the class that provides the +definition of the method: + +:: + + def find_defining_class(obj, meth_name): + for ty in type(obj).mro(): + if meth_name in ty.__dict__: + return ty + +Here’s an example: + +:: + + >>> hand = Hand() + >>> find_defining_class(hand, 'shuffle') + + +So the shuffle method for this Hand is the one in Deck. + +``find_defining_class`` uses the mro method to get the list of class +objects (types) that will be searched for methods. “MRO” stands for +“method resolution order”, which is the sequence of classes Python +searches to “resolve” a method name. + +Here’s a design suggestion: when you override a method, the interface of +the new method should be the same as the old. It should take the same +parameters, return the same type, and obey the same preconditions and +postconditions. If you follow this rule, you will find that any function +designed to work with an instance of a parent class, like a Deck, will +also work with instances of child classes like a Hand and PokerHand. + +If you violate this rule, which is called the “Liskov substitution +principle”, your code will collapse like (sorry) a house of cards. + +Data encapsulation +------------------ + +The previous chapters demonstrate a development plan we might call +“object-oriented design”. We identified objects we needed—like Point, +Rectangle and Time—and defined classes to represent them. In each case +there is an obvious correspondence between the object and some entity in +the real world (or at least a mathematical world). + +But sometimes it is less obvious what objects you need and how they +should interact. In that case you need a different development plan. In +the same way that we discovered function interfaces by encapsulation and +generalization, we can discover class interfaces by **data +encapsulation**. + +Markov analysis, from Section [markov], provides a good example. If you +download my code from http://thinkpython2.com/code/markov.py, you’ll see +that it uses two global variables—\ ``suffix_map`` and ``prefix``—that +are read and written from several functions. + +:: + + suffix_map = {} + prefix = () + +Because these variables are global, we can only run one analysis at a +time. If we read two texts, their prefixes and suffixes would be added +to the same data structures (which makes for some interesting generated +text). + +To run multiple analyses, and keep them separate, we can encapsulate the +state of each analysis in an object. Here’s what that looks like: + +:: + + class Markov: + + def __init__(self): + self.suffix_map = {} + self.prefix = () + +Next, we transform the functions into methods. For example, here’s +``process_word``: + +:: + + def process_word(self, word, order=2): + if len(self.prefix) < order: + self.prefix += (word,) + return + + try: + self.suffix_map[self.prefix].append(word) + except KeyError: + # if there is no entry for this prefix, make one + self.suffix_map[self.prefix] = [word] + + self.prefix = shift(self.prefix, word) + +Transforming a program like this—changing the design without changing +the behavior—is another example of refactoring (see +Section [refactoring]). + +This example suggests a development plan for designing objects and +methods: + +#. Start by writing functions that read and write global variables (when + necessary). + +#. Once you get the program working, look for associations between + global variables and the functions that use them. + +#. Encapsulate related variables as attributes of an object. + +#. Transform the associated functions into methods of the new class. + +As an exercise, download my Markov code from +http://thinkpython2.com/code/markov.py, and follow the steps described +above to encapsulate the global variables as attributes of a new class +called Markov. Solution: http://thinkpython2.com/code/Markov.py (note +the capital M). + +Glossary +-------- + +encode: + To represent one set of values using another set of values by + constructing a mapping between them. + +class attribute: + An attribute associated with a class object. Class attributes are + defined inside a class definition but outside any method. + +instance attribute: + An attribute associated with an instance of a class. + +veneer: + A method or function that provides a different interface to another + function without doing much computation. + +inheritance: + The ability to define a new class that is a modified version of a + previously defined class. + +parent class: + The class from which a child class inherits. + +child class: + A new class created by inheriting from an existing class; also + called a “subclass”. + +IS-A relationship: + A relationship between a child class and its parent class. + +HAS-A relationship: + A relationship between two classes where instances of one class + contain references to instances of the other. + +dependency: + A relationship between two classes where instances of one class use + instances of the other class, but do not store them as attributes. + +class diagram: + A diagram that shows the classes in a program and the relationships + between them. + +multiplicity: + A notation in a class diagram that shows, for a HAS-A relationship, + how many references there are to instances of another class. + +data encapsulation: + A program development plan that involves a prototype using global + variables and a final version that makes the global variables into + instance attributes. + +Exercises +--------- + +For the following program, draw a UML class diagram that shows these +classes and the relationships among them. + +:: + + class PingPongParent: + pass + + class Ping(PingPongParent): + def __init__(self, pong): + self.pong = pong + + + class Pong(PingPongParent): + def __init__(self, pings=None): + if pings is None: + self.pings = [] + else: + self.pings = pings + + def add_ping(self, ping): + self.pings.append(ping) + + pong = Pong() + ping = Ping(pong) + pong.add_ping(ping) + +Write a Deck method called ``deal_hands`` that takes two parameters, the +number of hands and the number of cards per hand. It should create the +appropriate number of Hand objects, deal the appropriate number of cards +per hand, and return a list of Hands. + +[poker] + +The following are the possible hands in poker, in increasing order of +value and decreasing order of probability: + +pair: + two cards with the same rank + +two pair: + two pairs of cards with the same rank + +three of a kind: + three cards with the same rank + +straight: + five cards with ranks in sequence (aces can be high or low, so + Ace-2-3-4-5 is a straight and so is 10-Jack-Queen-King-Ace, but + Queen-King-Ace-2-3 is not.) + +flush: + five cards with the same suit + +full house: + three cards with one rank, two cards with another + +four of a kind: + four cards with the same rank + +straight flush: + five cards in sequence (as defined above) and with the same suit + +The goal of these exercises is to estimate the probability of drawing +these various hands. + +#. Download the following files from http://thinkpython2.com/code: + + Card.py + : A complete version of the Card, Deck and Hand classes in this + chapter. + + PokerHand.py + : An incomplete implementation of a class that represents a poker + hand, and some code that tests it. + +#. If you run PokerHand.py, it deals seven 7-card poker hands and checks + to see if any of them contains a flush. Read this code carefully + before you go on. + +#. Add methods to PokerHand.py named ``has_pair``, ``has_twopair``, etc. + that return True or False according to whether or not the hand meets + the relevant criteria. Your code should work correctly for “hands” + that contain any number of cards (although 5 and 7 are the most + common sizes). + +#. Write a method named classify that figures out the highest-value + classification for a hand and sets the label attribute accordingly. + For example, a 7-card hand might contain a flush and a pair; it + should be labeled “flush”. + +#. When you are convinced that your classification methods are working, + the next step is to estimate the probabilities of the various hands. + Write a function in PokerHand.py that shuffles a deck of cards, + divides it into hands, classifies the hands, and counts the number of + times various classifications appear. + +#. Print a table of the classifications and their probabilities. Run + your program with larger and larger numbers of hands until the output + values converge to a reasonable degree of accuracy. Compare your + results to the values at http://en.wikipedia.org/wiki/Hand_rankings. + +Solution: http://thinkpython2.com/code/PokerHandSoln.py. diff --git a/book/19-goodies.rst b/book/19-goodies.rst new file mode 100644 index 0000000..b044902 --- /dev/null +++ b/book/19-goodies.rst @@ -0,0 +1,675 @@ +The Goodies +=========== + +One of my goals for this book has been to teach you as little Python as +possible. When there were two ways to do something, I picked one and +avoided mentioning the other. Or sometimes I put the second one into an +exercise. + +Now I want to go back for some of the good bits that got left behind. +Python provides a number of features that are not really necessary—you +can write good code without them—but with them you can sometimes write +code that’s more concise, readable or efficient, and sometimes all +three. + +Conditional expressions +----------------------- + +We saw conditional statements in Section [conditional.execution]. +Conditional statements are often used to choose one of two values; for +example: + +:: + + if x > 0: + y = math.log(x) + else: + y = float('nan') + +This statement checks whether x is positive. If so, it computes +math.log. If not, math.log would raise a ValueError. To avoid stopping +the program, we generate a “NaN”, which is a special floating-point +value that represents “Not a Number”. + +We can write this statement more concisely using a **conditional +expression**: + +:: + + y = math.log(x) if x > 0 else float('nan') + +You can almost read this line like English: “y gets log-x if x is +greater than 0; otherwise it gets NaN”. + +Recursive functions can sometimes be rewritten using conditional +expressions. For example, here is a recursive version of factorial: + +:: + + def factorial(n): + if n == 0: + return 1 + else: + return n * factorial(n-1) + +We can rewrite it like this: + +:: + + def factorial(n): + return 1 if n == 0 else n * factorial(n-1) + +Another use of conditional expressions is handling optional arguments. +For example, here is the init method from GoodKangaroo (see +Exercise [kangaroo]): + +:: + + def __init__(self, name, contents=None): + self.name = name + if contents == None: + contents = [] + self.pouch_contents = contents + +We can rewrite this one like this: + +:: + + def __init__(self, name, contents=None): + self.name = name + self.pouch_contents = [] if contents == None else contents + +In general, you can replace a conditional statement with a conditional +expression if both branches contain simple expressions that are either +returned or assigned to the same variable. + +List comprehensions +------------------- + +In Section [filter] we saw the map and filter patterns. For example, +this function takes a list of strings, maps the string method capitalize +to the elements, and returns a new list of strings: + +:: + + def capitalize_all(t): + res = [] + for s in t: + res.append(s.capitalize()) + return res + +We can write this more concisely using a **list comprehension**: + +:: + + def capitalize_all(t): + return [s.capitalize() for s in t] + +The bracket operators indicate that we are constructing a new list. The +expression inside the brackets specifies the elements of the list, and +the for clause indicates what sequence we are traversing. + +The syntax of a list comprehension is a little awkward because the loop +variable, s in this example, appears in the expression before we get to +the definition. + +List comprehensions can also be used for filtering. For example, this +function selects only the elements of t that are upper case, and returns +a new list: + +:: + + def only_upper(t): + res = [] + for s in t: + if s.isupper(): + res.append(s) + return res + +We can rewrite it using a list comprehension + +:: + + def only_upper(t): + return [s for s in t if s.isupper()] + +List comprehensions are concise and easy to read, at least for simple +expressions. And they are usually faster than the equivalent for loops, +sometimes much faster. So if you are mad at me for not mentioning them +earlier, I understand. + +But, in my defense, list comprehensions are harder to debug because you +can’t put a print statement inside the loop. I suggest that you use them +only if the computation is simple enough that you are likely to get it +right the first time. And for beginners that means never. + +Generator expressions +--------------------- + +**Generator expressions** are similar to list comprehensions, but with +parentheses instead of square brackets: + +:: + + >>> g = (x**2 for x in range(5)) + >>> g + at 0x7f4c45a786c0> + +The result is a generator object that knows how to iterate through a +sequence of values. But unlike a list comprehension, it does not compute +the values all at once; it waits to be asked. The built-in function next +gets the next value from the generator: + +:: + + >>> next(g) + 0 + >>> next(g) + 1 + +When you get to the end of the sequence, next raises a StopIteration +exception. You can also use a for loop to iterate through the values: + +:: + + >>> for val in g: + ... print(val) + 4 + 9 + 16 + +The generator object keeps track of where it is in the sequence, so the +for loop picks up where next left off. Once the generator is exhausted, +it continues to raise StopException: + +:: + + >>> next(g) + StopIteration + +Generator expressions are often used with functions like sum, max, and +min: + +:: + + >>> sum(x**2 for x in range(5)) + 30 + +any and all +----------- + +Python provides a built-in function, any, that takes a sequence of +boolean values and returns True if any of the values are True. It works +on lists: + +:: + + >>> any([False, False, True]) + True + +But it is often used with generator expressions: + +:: + + >>> any(letter == 't' for letter in 'monty') + True + +That example isn’t very useful because it does the same thing as the in +operator. But we could use any to rewrite some of the search functions +we wrote in Section [search]. For example, we could write avoids like +this: + +:: + + def avoids(word, forbidden): + return not any(letter in forbidden for letter in word) + +The function almost reads like English, “word avoids forbidden if there +are not any forbidden letters in word.” + +Using any with a generator expression is efficient because it stops +immediately if it finds a True value, so it doesn’t have to evaluate the +whole sequence. + +Python provides another built-in function, all, that returns True if +every element of the sequence is True. As an exercise, use all to +re-write ``uses_all`` from Section [search]. + +Sets +---- + +In Section [dictsub] I use dictionaries to find the words that appear in +a document but not in a word list. The function I wrote takes d1, which +contains the words from the document as keys, and d2, which contains the +list of words. It returns a dictionary that contains the keys from d1 +that are not in d2. + +:: + + def subtract(d1, d2): + res = dict() + for key in d1: + if key not in d2: + res[key] = None + return res + +In all of these dictionaries, the values are None because we never use +them. As a result, we waste some storage space. + +Python provides another built-in type, called a set, that behaves like a +collection of dictionary keys with no values. Adding elements to a set +is fast; so is checking membership. And sets provide methods and +operators to compute common set operations. + +For example, set subtraction is available as a method called difference +or as an operator, -. So we can rewrite subtract like this: + +:: + + def subtract(d1, d2): + return set(d1) - set(d2) + +The result is a set instead of a dictionary, but for operations like +iteration, the behavior is the same. + +Some of the exercises in this book can be done concisely and efficiently +with sets. For example, here is a solution to ``has_duplicates``, from +Exercise [duplicate], that uses a dictionary: + +:: + + def has_duplicates(t): + d = {} + for x in t: + if x in d: + return True + d[x] = True + return False + +When an element appears for the first time, it is added to the +dictionary. If the same element appears again, the function returns +True. + +Using sets, we can write the same function like this: + +:: + + def has_duplicates(t): + return len(set(t)) < len(t) + +An element can only appear in a set once, so if an element in t appears +more than once, the set will be smaller than t. If there are no +duplicates, the set will be the same size as t. + +We can also use sets to do some of the exercises in Chapter [wordplay]. +For example, here’s a version of ``uses_only`` with a loop: + +:: + + def uses_only(word, available): + for letter in word: + if letter not in available: + return False + return True + +``uses_only`` checks whether all letters in word are in available. We +can rewrite it like this: + +:: + + def uses_only(word, available): + return set(word) <= set(available) + +The ``<=`` operator checks whether one set is a subset or another, +including the possibility that they are equal, which is true if all the +letters in word appear in available. + +As an exercise, rewrite ``avoids`` using sets. + +Counters +-------- + +A Counter is like a set, except that if an element appears more than +once, the Counter keeps track of how many times it appears. If you are +familiar with the mathematical idea of a **multiset**, a Counter is a +natural way to represent a multiset. + +Counter is defined in a standard module called collections, so you have +to import it. You can initialize a Counter with a string, list, or +anything else that supports iteration: + +:: + + >>> from collections import Counter + >>> count = Counter('parrot') + >>> count + Counter({'r': 2, 't': 1, 'o': 1, 'p': 1, 'a': 1}) + +Counters behave like dictionaries in many ways; they map from each key +to the number of times it appears. As in dictionaries, the keys have to +be hashable. + +Unlike dictionaries, Counters don’t raise an exception if you access an +element that doesn’t appear. Instead, they return 0: + +:: + + >>> count['d'] + 0 + +We can use Counters to rewrite ``is_anagram`` from Exercise [anagram]: + +:: + + def is_anagram(word1, word2): + return Counter(word1) == Counter(word2) + +If two words are anagrams, they contain the same letters with the same +counts, so their Counters are equivalent. + +Counters provide methods and operators to perform set-like operations, +including addition, subtraction, union and intersection. And they +provide an often-useful method, ``most_common``, which returns a list of +value-frequency pairs, sorted from most common to least: + +:: + + >>> count = Counter('parrot') + >>> for val, freq in count.most_common(3): + ... print(val, freq) + r 2 + p 1 + a 1 + +defaultdict +----------- + +The collections module also provides defaultdict, which is like a +dictionary except that if you access a key that doesn’t exist, it can +generate a new value on the fly. + +When you create a defaultdict, you provide a function that’s used to +create new values. A function used to create objects is sometimes called +a **factory**. The built-in functions that create lists, sets, and other +types can be used as factories: + +:: + + >>> from collections import defaultdict + >>> d = defaultdict(list) + +Notice that the argument is list, which is a class object, not list(), +which is a new list. The function you provide doesn’t get called unless +you access a key that doesn’t exist. + +:: + + >>> t = d['new key'] + >>> t + [] + +The new list, which we’re calling t, is also added to the dictionary. So +if we modify t, the change appears in d: + +:: + + >>> t.append('new value') + >>> d + defaultdict(, {'new key': ['new value']}) + +If you are making a dictionary of lists, you can often write simpler +code using defaultdict. In my solution to Exercise [anagrams], which you +can get from http://thinkpython2.com/code/anagram_sets.py, I make a +dictionary that maps from a sorted string of letters to the list of +words that can be spelled with those letters. For example, ’opst’ maps +to the list . + +Here’s the original code: + +:: + + def all_anagrams(filename): + d = {} + for line in open(filename): + word = line.strip().lower() + t = signature(word) + if t not in d: + d[t] = [word] + else: + d[t].append(word) + return d + +This can be simplified using setdefault, which you might have used in +Exercise [setdefault]: + +:: + + def all_anagrams(filename): + d = {} + for line in open(filename): + word = line.strip().lower() + t = signature(word) + d.setdefault(t, []).append(word) + return d + +This solution has the drawback that it makes a new list every time, +regardless of whether it is needed. For lists, that’s no big deal, but +if the factory function is complicated, it might be. + +We can avoid this problem and simplify the code using a defaultdict: + +:: + + def all_anagrams(filename): + d = defaultdict(list) + for line in open(filename): + word = line.strip().lower() + t = signature(word) + d[t].append(word) + return d + +My solution to Exercise [poker], which you can download from +http://thinkpython2.com/code/PokerHandSoln.py, uses setdefault in the +function ``has_straightflush``. This solution has the drawback of +creating a Hand object every time through the loop, whether it is needed +or not. As an exercise, rewrite it using a defaultdict. + +Named tuples +------------ + +Many simple objects are basically collections of related values. For +example, the Point object defined in Chapter [clobjects] contains two +numbers, x and y. When you define a class like this, you usually start +with an init method and a str method: + +:: + + class Point: + + def __init__(self, x=0, y=0): + self.x = x + self.y = y + + def __str__(self): + return '(%g, %g)' % (self.x, self.y) + +This is a lot of code to convey a small amount of information. Python +provides a more concise way to say the same thing: + +:: + + from collections import namedtuple + Point = namedtuple('Point', ['x', 'y']) + +The first argument is the name of the class you want to create. The +second is a list of the attributes Point objects should have, as +strings. The return value from namedtuple is a class object: + +:: + + >>> Point + + +Point automatically provides methods like ``__init__`` and ``__str__`` +so you don’t have to write them. + +To create a Point object, you use the Point class as a function: + +:: + + >>> p = Point(1, 2) + >>> p + Point(x=1, y=2) + +The init method assigns the arguments to attributes using the names you +provided. The str method prints a representation of the Point object and +its attributes. + +You can access the elements of the named tuple by name: + +:: + + >>> p.x, p.y + (1, 2) + +But you can also treat a named tuple as a tuple: + +:: + + >>> p[0], p[1] + (1, 2) + + >>> x, y = p + >>> x, y + (1, 2) + +Named tuples provide a quick way to define simple classes. The drawback +is that simple classes don’t always stay simple. You might decide later +that you want to add methods to a named tuple. In that case, you could +define a new class that inherits from the named tuple: + +:: + + class Pointier(Point): + # add more methods here + +Or you could switch to a conventional class definition. + +Gathering keyword args +---------------------- + +In Section [gather], we saw how to write a function that gathers its +arguments into a tuple: + +:: + + def printall(*args): + print(args) + +You can call this function with any number of positional arguments (that +is, arguments that don’t have keywords): + +:: + + >>> printall(1, 2.0, '3') + (1, 2.0, '3') + +But the operator doesn’t gather keyword arguments: + +:: + + >>> printall(1, 2.0, third='3') + TypeError: printall() got an unexpected keyword argument 'third' + +To gather keyword arguments, you can use the \* operator: + +:: + + def printall(*args, **kwargs): + print(args, kwargs) + +You can call the keyword gathering parameter anything you want, but +kwargs is a common choice. The result is a dictionary that maps keywords +to values: + +:: + + >>> printall(1, 2.0, third='3') + (1, 2.0) {'third': '3'} + +If you have a dictionary of keywords and values, you can use the scatter +operator, \* to call a function: + +:: + + >>> d = dict(x=1, y=2) + >>> Point(**d) + Point(x=1, y=2) + +Without the scatter operator, the function would treat d as a single +positional argument, so it would assign d to x and complain because +there’s nothing to assign to y: + +:: + + >>> d = dict(x=1, y=2) + >>> Point(d) + Traceback (most recent call last): + File "", line 1, in + TypeError: __new__() missing 1 required positional argument: 'y' + +When you are working with functions that have a large number of +parameters, it is often useful to create and pass around dictionaries +that specify frequently used options. + +Glossary +-------- + +conditional expression: + An expression that has one of two values, depending on a condition. + +list comprehension: + An expression with a for loop in square brackets that yields a new + list. + +generator expression: + An expression with a for loop in parentheses that yields a generator + object. + +multiset: + A mathematical entity that represents a mapping between the elements + of a set and the number of times they appear. + +factory: + A function, usually passed as a parameter, used to create objects. + +Exercises +--------- + +The following is a function computes the binomial coefficient +recursively. + +:: + + def binomial_coeff(n, k): + """Compute the binomial coefficient "n choose k". + + n: number of trials + k: number of successes + + returns: int + """ + if k == 0: + return 1 + if n == 0: + return 0 + + res = binomial_coeff(n-1, k) + binomial_coeff(n-1, k-1) + return res + +Rewrite the body of the function using nested conditional expressions. + +One note: this function is not very efficient because it ends up +computing the same values over and over. You could make it more +efficient by memoizing (see Section [memoize]). But you will find that +it’s harder to memoize if you write it using conditional expressions. diff --git a/book/A-debug.rst b/book/A-debug.rst new file mode 100644 index 0000000..e31616f --- /dev/null +++ b/book/A-debug.rst @@ -0,0 +1,500 @@ + +Debugging +========= + +When you are debugging, you should distinguish among different kinds of +errors in order to track them down more quickly: + +- Syntax errors are discovered by the interpreter when it is + translating the source code into byte code. They indicate that there + is something wrong with the structure of the program. Example: + Omitting the colon at the end of a def statement generates the + somewhat redundant message SyntaxError: invalid syntax. + +- Runtime errors are produced by the interpreter if something goes + wrong while the program is running. Most runtime error messages + include information about where the error occurred and what functions + were executing. Example: An infinite recursion eventually causes the + runtime error “maximum recursion depth exceeded”. + +- Semantic errors are problems with a program that runs without + producing error messages but doesn’t do the right thing. Example: An + expression may not be evaluated in the order you expect, yielding an + incorrect result. + +The first step in debugging is to figure out which kind of error you are +dealing with. Although the following sections are organized by error +type, some techniques are applicable in more than one situation. + +Syntax errors +------------- + +Syntax errors are usually easy to fix once you figure out what they are. +Unfortunately, the error messages are often not helpful. The most common +messages are SyntaxError: invalid syntax and SyntaxError: invalid token, +neither of which is very informative. + +On the other hand, the message does tell you where in the program the +problem occurred. Actually, it tells you where Python noticed a problem, +which is not necessarily where the error is. Sometimes the error is +prior to the location of the error message, often on the preceding line. + +If you are building the program incrementally, you should have a good +idea about where the error is. It will be in the last line you added. + +If you are copying code from a book, start by comparing your code to the +book’s code very carefully. Check every character. At the same time, +remember that the book might be wrong, so if you see something that +looks like a syntax error, it might be. + +Here are some ways to avoid the most common syntax errors: + +#. Make sure you are not using a Python keyword for a variable name. + +#. Check that you have a colon at the end of the header of every + compound statement, including for, while, if, and def statements. + +#. Make sure that any strings in the code have matching quotation marks. + Make sure that all quotation marks are “straight quotes”, not “curly + quotes”. + +#. If you have multiline strings with triple quotes (single or double), + make sure you have terminated the string properly. An unterminated + string may cause an invalid token error at the end of your program, + or it may treat the following part of the program as a string until + it comes to the next string. In the second case, it might not produce + an error message at all! + +#. An unclosed opening operator—\ ``(``, ``{``, or ``[``—makes Python + continue with the next line as part of the current statement. + Generally, an error occurs almost immediately in the next line. + +#. Check for the classic = instead of == inside a conditional. + +#. Check the indentation to make sure it lines up the way it is supposed + to. Python can handle space and tabs, but if you mix them it can + cause problems. The best way to avoid this problem is to use a text + editor that knows about Python and generates consistent indentation. + +#. If you have non-ASCII characters in the code (including strings and + comments), that might cause a problem, although Python 3 usually + handles non-ASCII characters. Be careful if you paste in text from a + web page or other source. + +If nothing works, move on to the next section... + +I keep making changes and it makes no difference. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If the interpreter says there is an error and you don’t see it, that +might be because you and the interpreter are not looking at the same +code. Check your programming environment to make sure that the program +you are editing is the one Python is trying to run. + +If you are not sure, try putting an obvious and deliberate syntax error +at the beginning of the program. Now run it again. If the interpreter +doesn’t find the new error, you are not running the new code. + +There are a few likely culprits: + +- You edited the file and forgot to save the changes before running it + again. Some programming environments do this for you, but some don’t. + +- You changed the name of the file, but you are still running the old + name. + +- Something in your development environment is configured incorrectly. + +- If you are writing a module and using import, make sure you don’t + give your module the same name as one of the standard Python modules. + +- If you are using import to read a module, remember that you have to + restart the interpreter or use reload to read a modified file. If you + import the module again, it doesn’t do anything. + +If you get stuck and you can’t figure out what is going on, one approach +is to start again with a new program like “Hello, World!”, and make sure +you can get a known program to run. Then gradually add the pieces of the +original program to the new one. + +Runtime errors +-------------- + +Once your program is syntactically correct, Python can read it and at +least start running it. What could possibly go wrong? + +My program does absolutely nothing. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This problem is most common when your file consists of functions and +classes but does not actually invoke a function to start execution. This +may be intentional if you only plan to import this module to supply +classes and functions. + +If it is not intentional, make sure there is a function call in the +program, and make sure the flow of execution reaches it (see “Flow of +Execution” below). + +My program hangs. +~~~~~~~~~~~~~~~~~ + +If a program stops and seems to be doing nothing, it is “hanging”. Often +that means that it is caught in an infinite loop or infinite recursion. + +- If there is a particular loop that you suspect is the problem, add a + print statement immediately before the loop that says “entering the + loop” and another immediately after that says “exiting the loop”. + + Run the program. If you get the first message and not the second, + you’ve got an infinite loop. Go to the “Infinite Loop” section below. + +- Most of the time, an infinite recursion will cause the program to run + for a while and then produce a “RuntimeError: Maximum recursion depth + exceeded” error. If that happens, go to the “Infinite Recursion” + section below. + + If you are not getting this error but you suspect there is a problem + with a recursive method or function, you can still use the techniques + in the “Infinite Recursion” section. + +- If neither of those steps works, start testing other loops and other + recursive functions and methods. + +- If that doesn’t work, then it is possible that you don’t understand + the flow of execution in your program. Go to the “Flow of Execution” + section below. + +Infinite Loop +^^^^^^^^^^^^^ + +If you think you have an infinite loop and you think you know what loop +is causing the problem, add a print statement at the end of the loop +that prints the values of the variables in the condition and the value +of the condition. + +For example: + +:: + + while x > 0 and y < 0 : + # do something to x + # do something to y + + print('x: ', x) + print('y: ', y) + print("condition: ", (x > 0 and y < 0)) + +Now when you run the program, you will see three lines of output for +each time through the loop. The last time through the loop, the +condition should be False. If the loop keeps going, you will be able to +see the values of x and y, and you might figure out why they are not +being updated correctly. + +Infinite Recursion +^^^^^^^^^^^^^^^^^^ + +Most of the time, infinite recursion causes the program to run for a +while and then produce a Maximum recursion depth exceeded error. + +If you suspect that a function is causing an infinite recursion, make +sure that there is a base case. There should be some condition that +causes the function to return without making a recursive invocation. If +not, you need to rethink the algorithm and identify a base case. + +If there is a base case but the program doesn’t seem to be reaching it, +add a print statement at the beginning of the function that prints the +parameters. Now when you run the program, you will see a few lines of +output every time the function is invoked, and you will see the +parameter values. If the parameters are not moving toward the base case, +you will get some ideas about why not. + +Flow of Execution +^^^^^^^^^^^^^^^^^ + +If you are not sure how the flow of execution is moving through your +program, add print statements to the beginning of each function with a +message like “entering function foo”, where foo is the name of the +function. + +Now when you run the program, it will print a trace of each function as +it is invoked. + +When I run the program I get an exception. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If something goes wrong during runtime, Python prints a message that +includes the name of the exception, the line of the program where the +problem occurred, and a traceback. + +The traceback identifies the function that is currently running, and +then the function that called it, and then the function that called +*that*, and so on. In other words, it traces the sequence of function +calls that got you to where you are, including the line number in your +file where each call occurred. + +The first step is to examine the place in the program where the error +occurred and see if you can figure out what happened. These are some of +the most common runtime errors: + +NameError: + You are trying to use a variable that doesn’t exist in the current + environment. Check if the name is spelled right, or at least + consistently. And remember that local variables are local; you + cannot refer to them from outside the function where they are + defined. + +TypeError: + There are several possible causes: + + - You are trying to use a value improperly. Example: indexing a + string, list, or tuple with something other than an integer. + + - There is a mismatch between the items in a format string and the + items passed for conversion. This can happen if either the number + of items does not match or an invalid conversion is called for. + + - You are passing the wrong number of arguments to a function. For + methods, look at the method definition and check that the first + parameter is self. Then look at the method invocation; make sure + you are invoking the method on an object with the right type and + providing the other arguments correctly. + +KeyError: + You are trying to access an element of a dictionary using a key that + the dictionary does not contain. If the keys are strings, remember + that capitalization matters. + +AttributeError: + You are trying to access an attribute or method that does not exist. + Check the spelling! You can use the built-in function vars to list + the attributes that do exist. + + If an AttributeError indicates that an object has NoneType, that + means that it is None. So the problem is not the attribute name, but + the object. + + The reason the object is none might be that you forgot to return a + value from a function; if you get to the end of a function without + hitting a return statement, it returns None. Another common cause is + using the result from a list method, like sort, that returns None. + +IndexError: + The index you are using to access a list, string, or tuple is + greater than its length minus one. Immediately before the site of + the error, add a print statement to display the value of the index + and the length of the array. Is the array the right size? Is the + index the right value? + +The Python debugger (pdb) is useful for tracking down exceptions because +it allows you to examine the state of the program immediately before the +error. You can read about pdb at +https://docs.python.org/3/library/pdb.html. + +I added so many print statements I get inundated with output. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +One of the problems with using print statements for debugging is that +you can end up buried in output. There are two ways to proceed: simplify +the output or simplify the program. + +To simplify the output, you can remove or comment out print statements +that aren’t helping, or combine them, or format the output so it is +easier to understand. + +To simplify the program, there are several things you can do. First, +scale down the problem the program is working on. For example, if you +are searching a list, search a *small* list. If the program takes input +from the user, give it the simplest input that causes the problem. + +Second, clean up the program. Remove dead code and reorganize the +program to make it as easy to read as possible. For example, if you +suspect that the problem is in a deeply nested part of the program, try +rewriting that part with simpler structure. If you suspect a large +function, try splitting it into smaller functions and testing them +separately. + +Often the process of finding the minimal test case leads you to the bug. +If you find that a program works in one situation but not in another, +that gives you a clue about what is going on. + +Similarly, rewriting a piece of code can help you find subtle bugs. If +you make a change that you think shouldn’t affect the program, and it +does, that can tip you off. + +Semantic errors +--------------- + +In some ways, semantic errors are the hardest to debug, because the +interpreter provides no information about what is wrong. Only you know +what the program is supposed to do. + +The first step is to make a connection between the program text and the +behavior you are seeing. You need a hypothesis about what the program is +actually doing. One of the things that makes that hard is that computers +run so fast. + +You will often wish that you could slow the program down to human speed, +and with some debuggers you can. But the time it takes to insert a few +well-placed print statements is often short compared to setting up the +debugger, inserting and removing breakpoints, and “stepping” the program +to where the error is occurring. + +My program doesn’t work. +~~~~~~~~~~~~~~~~~~~~~~~~ + +You should ask yourself these questions: + +- Is there something the program was supposed to do but which doesn’t + seem to be happening? Find the section of the code that performs that + function and make sure it is executing when you think it should. + +- Is something happening that shouldn’t? Find code in your program that + performs that function and see if it is executing when it shouldn’t. + +- Is a section of code producing an effect that is not what you + expected? Make sure that you understand the code in question, + especially if it involves functions or methods in other Python + modules. Read the documentation for the functions you call. Try them + out by writing simple test cases and checking the results. + +In order to program, you need a mental model of how programs work. If +you write a program that doesn’t do what you expect, often the problem +is not in the program; it’s in your mental model. + +The best way to correct your mental model is to break the program into +its components (usually the functions and methods) and test each +component independently. Once you find the discrepancy between your +model and reality, you can solve the problem. + +Of course, you should be building and testing components as you develop +the program. If you encounter a problem, there should be only a small +amount of new code that is not known to be correct. + +I’ve got a big hairy expression and it doesn’t do what I expect. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Writing complex expressions is fine as long as they are readable, but +they can be hard to debug. It is often a good idea to break a complex +expression into a series of assignments to temporary variables. + +For example: + +:: + + self.hands[i].addCard(self.hands[self.findNeighbor(i)].popCard()) + +This can be rewritten as: + +:: + + neighbor = self.findNeighbor(i) + pickedCard = self.hands[neighbor].popCard() + self.hands[i].addCard(pickedCard) + +The explicit version is easier to read because the variable names +provide additional documentation, and it is easier to debug because you +can check the types of the intermediate variables and display their +values. + +Another problem that can occur with big expressions is that the order of +evaluation may not be what you expect. For example, if you are +translating the expression :math:`\frac{x}{2 \pi}` into Python, you +might write: + +:: + + y = x / 2 * math.pi + +That is not correct because multiplication and division have the same +precedence and are evaluated from left to right. So this expression +computes :math:`x \pi / 2`. + +A good way to debug expressions is to add parentheses to make the order +of evaluation explicit: + +:: + + y = x / (2 * math.pi) + +Whenever you are not sure of the order of evaluation, use parentheses. +Not only will the program be correct (in the sense of doing what you +intended), it will also be more readable for other people who haven’t +memorized the order of operations. + +I’ve got a function that doesn’t return what I expect. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you have a return statement with a complex expression, you don’t have +a chance to print the result before returning. Again, you can use a +temporary variable. For example, instead of: + +:: + + return self.hands[i].removeMatches() + +you could write: + +:: + + count = self.hands[i].removeMatches() + return count + +Now you have the opportunity to display the value of count before +returning. + +I’m really, really stuck and I need help. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +First, try getting away from the computer for a few minutes. Computers +emit waves that affect the brain, causing these symptoms: + +- Frustration and rage. + +- Superstitious beliefs (“the computer hates me”) and magical thinking + (“the program only works when I wear my hat backward”). + +- Random walk programming (the attempt to program by writing every + possible program and choosing the one that does the right thing). + +If you find yourself suffering from any of these symptoms, get up and go +for a walk. When you are calm, think about the program. What is it +doing? What are some possible causes of that behavior? When was the last +time you had a working program, and what did you do next? + +Sometimes it just takes time to find a bug. I often find bugs when I am +away from the computer and let my mind wander. Some of the best places +to find bugs are trains, showers, and in bed, just before you fall +asleep. + +No, I really need help. +~~~~~~~~~~~~~~~~~~~~~~~ + +It happens. Even the best programmers occasionally get stuck. Sometimes +you work on a program so long that you can’t see the error. You need a +fresh pair of eyes. + +Before you bring someone else in, make sure you are prepared. Your +program should be as simple as possible, and you should be working on +the smallest input that causes the error. You should have print +statements in the appropriate places (and the output they produce should +be comprehensible). You should understand the problem well enough to +describe it concisely. + +When you bring someone in to help, be sure to give them the information +they need: + +- If there is an error message, what is it and what part of the program + does it indicate? + +- What was the last thing you did before this error occurred? What were + the last lines of code that you wrote, or what is the new test case + that fails? + +- What have you tried so far, and what have you learned? + +When you find the bug, take a second to think about what you could have +done to find it faster. Next time you see something similar, you will be +able to find the bug more quickly. + +Remember, the goal is not just to make the program work. The goal is to +learn how to make the program work. diff --git a/book/B-analysis-alg.rst b/book/B-analysis-alg.rst new file mode 100644 index 0000000..5cc4ebc --- /dev/null +++ b/book/B-analysis-alg.rst @@ -0,0 +1,602 @@ +Analysis of Algorithms +====================== + + This appendix is an edited excerpt from *Think Complexity*, by Allen + B. Downey, also published by O’Reilly Media (2012). When you are + done with this book, you might want to move on to that one. + +**Analysis of algorithms** is a branch of computer science that studies +the performance of algorithms, especially their run time and space +requirements. See http://en.wikipedia.org/wiki/Analysis_of_algorithms. + +The practical goal of algorithm analysis is to predict the performance +of different algorithms in order to guide design decisions. + +During the 2008 United States Presidential Campaign, candidate Barack +Obama was asked to perform an impromptu analysis when he visited Google. +Chief executive Eric Schmidt jokingly asked him for “the most efficient +way to sort a million 32-bit integers.” Obama had apparently been tipped +off, because he quickly replied, “I think the bubble sort would be the +wrong way to go.” See http://www.youtube.com/watch?v=k4RRi_ntQc8. + +This is true: bubble sort is conceptually simple but slow for large +datasets. The answer Schmidt was probably looking for is “radix sort” +(http://en.wikipedia.org/wiki/Radix_sort) [2]_. + +The goal of algorithm analysis is to make meaningful comparisons between +algorithms, but there are some problems: + +- The relative performance of the algorithms might depend on + characteristics of the hardware, so one algorithm might be faster on + Machine A, another on Machine B. The general solution to this problem + is to specify a **machine model** and analyze the number of steps, or + operations, an algorithm requires under a given model. + +- Relative performance might depend on the details of the dataset. For + example, some sorting algorithms run faster if the data are already + partially sorted; other algorithms run slower in this case. A common + way to avoid this problem is to analyze the **worst case** scenario. + It is sometimes useful to analyze average case performance, but + that’s usually harder, and it might not be obvious what set of cases + to average over. + +- Relative performance also depends on the size of the problem. A + sorting algorithm that is fast for small lists might be slow for long + lists. The usual solution to this problem is to express run time (or + number of operations) as a function of problem size, and group + functions into categories depending on how quickly they grow as + problem size increases. + +The good thing about this kind of comparison is that it lends itself to +simple classification of algorithms. For example, if I know that the run +time of Algorithm A tends to be proportional to the size of the input, +:math:`n`, and Algorithm B tends to be proportional to :math:`n^2`, then +I expect A to be faster than B, at least for large values of :math:`n`. + +This kind of analysis comes with some caveats, but we’ll get to that +later. + +Order of growth +--------------- + +Suppose you have analyzed two algorithms and expressed their run times +in terms of the size of the input: Algorithm A takes :math:`100n+1` +steps to solve a problem with size :math:`n`; Algorithm B takes +:math:`n^2 + n + 1` steps. + +The following table shows the run time of these algorithms for different +problem sizes: + ++----------+---------------+---------------------+ +| Input | Run time of | Run time of | ++----------+---------------+---------------------+ +| size | Algorithm A | Algorithm B | ++----------+---------------+---------------------+ +| 10 | 1 001 | 111 | ++----------+---------------+---------------------+ +| 100 | 10 001 | 10 101 | ++----------+---------------+---------------------+ +| 1 000 | 100 001 | 1 001 001 | ++----------+---------------+---------------------+ +| 10 000 | 1 000 001 | :math:`> 10^{10}` | ++----------+---------------+---------------------+ + +At :math:`n=10`, Algorithm A looks pretty bad; it takes almost 10 times +longer than Algorithm B. But for :math:`n=100` they are about the same, +and for larger values A is much better. + +The fundamental reason is that for large values of :math:`n`, any +function that contains an :math:`n^2` term will grow faster than a +function whose leading term is :math:`n`. The **leading term** is the +term with the highest exponent. + +For Algorithm A, the leading term has a large coefficient, 100, which is +why B does better than A for small :math:`n`. But regardless of the +coefficients, there will always be some value of :math:`n` where +:math:`a n^2 > b n`, for any values of :math:`a` and :math:`b`. + +The same argument applies to the non-leading terms. Even if the run time +of Algorithm A were :math:`n+1000000`, it would still be better than +Algorithm B for sufficiently large :math:`n`. + +In general, we expect an algorithm with a smaller leading term to be a +better algorithm for large problems, but for smaller problems, there may +be a **crossover point** where another algorithm is better. The location +of the crossover point depends on the details of the algorithms, the +inputs, and the hardware, so it is usually ignored for purposes of +algorithmic analysis. But that doesn’t mean you can forget about it. + +If two algorithms have the same leading order term, it is hard to say +which is better; again, the answer depends on the details. So for +algorithmic analysis, functions with the same leading term are +considered equivalent, even if they have different coefficients. + +An **order of growth** is a set of functions whose growth behavior is +considered equivalent. For example, :math:`2n`, :math:`100n` and +:math:`n+1` belong to the same order of growth, which is written +:math:`O(n)` in **Big-Oh notation** and often called **linear** because +every function in the set grows linearly with :math:`n`. + +All functions with the leading term :math:`n^2` belong to +:math:`O(n^2)`; they are called **quadratic**. + +The following table shows some of the orders of growth that appear most +commonly in algorithmic analysis, in increasing order of badness. + ++-------------------------+-----------------------------------+----+ +| Order of | Name | | ++-------------------------+-----------------------------------+----+ +| growth | | | ++-------------------------+-----------------------------------+----+ +| :math:`O(1)` | constant | | ++-------------------------+-----------------------------------+----+ +| :math:`O(\log_b n)` | logarithmic (for any :math:`b`) | | ++-------------------------+-----------------------------------+----+ +| :math:`O(n)` | linear | | ++-------------------------+-----------------------------------+----+ +| :math:`O(n \log_b n)` | linearithmic | | ++-------------------------+-----------------------------------+----+ +| :math:`O(n^2)` | quadratic | | ++-------------------------+-----------------------------------+----+ +| :math:`O(n^3)` | cubic | | ++-------------------------+-----------------------------------+----+ +| :math:`O(c^n)` | exponential (for any :math:`c`) | | ++-------------------------+-----------------------------------+----+ + +For the logarithmic terms, the base of the logarithm doesn’t matter; +changing bases is the equivalent of multiplying by a constant, which +doesn’t change the order of growth. Similarly, all exponential functions +belong to the same order of growth regardless of the base of the +exponent. Exponential functions grow very quickly, so exponential +algorithms are only useful for small problems. + +Read the Wikipedia page on Big-Oh notation at +http://en.wikipedia.org/wiki/Big_O_notation and answer the following +questions: + +#. What is the order of growth of :math:`n^3 + n^2`? What about + :math:`1000000 n^3 + n^2`? What about :math:`n^3 + 1000000 n^2`? + +#. What is the order of growth of :math:`(n^2 + n) \cdot (n + 1)`? + Before you start multiplying, remember that you only need the leading + term. + +#. If :math:`f` is in :math:`O(g)`, for some unspecified function + :math:`g`, what can we say about :math:`af+b`? + +#. If :math:`f_1` and :math:`f_2` are in :math:`O(g)`, what can we say + about :math:`f_1 + f_2`? + +#. If :math:`f_1` is in :math:`O(g)` and :math:`f_2` is in :math:`O(h)`, + what can we say about :math:`f_1 + f_2`? + +#. If :math:`f_1` is in :math:`O(g)` and :math:`f_2` is :math:`O(h)`, + what can we say about :math:`f_1 \cdot f_2`? + +Programmers who care about performance often find this kind of analysis +hard to swallow. They have a point: sometimes the coefficients and the +non-leading terms make a real difference. Sometimes the details of the +hardware, the programming language, and the characteristics of the input +make a big difference. And for small problems asymptotic behavior is +irrelevant. + +But if you keep those caveats in mind, algorithmic analysis is a useful +tool. At least for large problems, the “better” algorithms is usually +better, and sometimes it is *much* better. The difference between two +algorithms with the same order of growth is usually a constant factor, +but the difference between a good algorithm and a bad algorithm is +unbounded! + +Analysis of basic Python operations +----------------------------------- + +In Python, most arithmetic operations are constant time; multiplication +usually takes longer than addition and subtraction, and division takes +even longer, but these run times don’t depend on the magnitude of the +operands. Very large integers are an exception; in that case the run +time increases with the number of digits. + +Indexing operations—reading or writing elements in a sequence or +dictionary—are also constant time, regardless of the size of the data +structure. + +A for loop that traverses a sequence or dictionary is usually linear, as +long as all of the operations in the body of the loop are constant time. +For example, adding up the elements of a list is linear: + +:: + + total = 0 + for x in t: + total += x + +The built-in function sum is also linear because it does the same thing, +but it tends to be faster because it is a more efficient implementation; +in the language of algorithmic analysis, it has a smaller leading +coefficient. + +As a rule of thumb, if the body of a loop is in :math:`O(n^a)` then the +whole loop is in :math:`O(n^{a+1})`. The exception is if you can show +that the loop exits after a constant number of iterations. If a loop +runs :math:`k` times regardless of :math:`n`, then the loop is in +:math:`O(n^a)`, even for large :math:`k`. + +Multiplying by :math:`k` doesn’t change the order of growth, but neither +does dividing. So if the body of a loop is in :math:`O(n^a)` and it runs +:math:`n/k` times, the loop is in :math:`O(n^{a+1})`, even for large +:math:`k`. + +Most string and tuple operations are linear, except indexing and len, +which are constant time. The built-in functions min and max are linear. +The run-time of a slice operation is proportional to the length of the +output, but independent of the size of the input. + +String concatenation is linear; the run time depends on the sum of the +lengths of the operands. + +All string methods are linear, but if the lengths of the strings are +bounded by a constant—for example, operations on single characters—they +are considered constant time. The string method join is linear; the run +time depends on the total length of the strings. + +Most list methods are linear, but there are some exceptions: + +- Adding an element to the end of a list is constant time on average; + when it runs out of room it occasionally gets copied to a bigger + location, but the total time for :math:`n` operations is + :math:`O(n)`, so the average time for each operation is :math:`O(1)`. + +- Removing an element from the end of a list is constant time. + +- Sorting is :math:`O(n \log n)`. + +Most dictionary operations and methods are constant time, but there are +some exceptions: + +- The run time of update is proportional to the size of the dictionary + passed as a parameter, not the dictionary being updated. + +- keys, values and items are constant time because they return + iterators. But if you loop through the iterators, the loop will be + linear. + +The performance of dictionaries is one of the minor miracles of computer +science. We will see how they work in Section [hashtable]. + +Read the Wikipedia page on sorting algorithms at +http://en.wikipedia.org/wiki/Sorting_algorithm and answer the following +questions: + +#. What is a “comparison sort?” What is the best worst-case order of + growth for a comparison sort? What is the best worst-case order of + growth for any sort algorithm? + +#. What is the order of growth of bubble sort, and why does Barack Obama + think it is “the wrong way to go?” + +#. What is the order of growth of radix sort? What preconditions do we + need to use it? + +#. What is a stable sort and why might it matter in practice? + +#. What is the worst sorting algorithm (that has a name)? + +#. What sort algorithm does the C library use? What sort algorithm does + Python use? Are these algorithms stable? You might have to Google + around to find these answers. + +#. Many of the non-comparison sorts are linear, so why does does Python + use an :math:`O(n \log n)` comparison sort? + +Analysis of search algorithms +----------------------------- + +A **search** is an algorithm that takes a collection and a target item +and determines whether the target is in the collection, often returning +the index of the target. + +The simplest search algorithm is a “linear search”, which traverses the +items of the collection in order, stopping if it finds the target. In +the worst case it has to traverse the entire collection, so the run time +is linear. + +The in operator for sequences uses a linear search; so do string methods +like find and count. + +If the elements of the sequence are in order, you can use a **bisection +search**, which is :math:`O(\log n)`. Bisection search is similar to the +algorithm you might use to look a word up in a dictionary (a paper +dictionary, not the data structure). Instead of starting at the +beginning and checking each item in order, you start with the item in +the middle and check whether the word you are looking for comes before +or after. If it comes before, then you search the first half of the +sequence. Otherwise you search the second half. Either way, you cut the +number of remaining items in half. + +If the sequence has 1,000,000 items, it will take about 20 steps to find +the word or conclude that it’s not there. So that’s about 50,000 times +faster than a linear search. + +Bisection search can be much faster than linear search, but it requires +the sequence to be in order, which might require extra work. + +There is another data structure, called a **hashtable** that is even +faster—it can do a search in constant time—and it doesn’t require the +items to be sorted. Python dictionaries are implemented using +hashtables, which is why most dictionary operations, including the in +operator, are constant time. + +Hashtables +---------- + +To explain how hashtables work and why their performance is so good, I +start with a simple implementation of a map and gradually improve it +until it’s a hashtable. + +I use Python to demonstrate these implementations, but in real life you +wouldn’t write code like this in Python; you would just use a +dictionary! So for the rest of this chapter, you have to imagine that +dictionaries don’t exist and you want to implement a data structure that +maps from keys to values. The operations you have to implement are: + +add(k, v): + Add a new item that maps from key k to value v. With a Python + dictionary, d, this operation is written d[k] = v. + +get(k): + Look up and return the value that corresponds to key k. With a + Python dictionary, d, this operation is written d[k] or d.get(k). + +For now, I assume that each key only appears once. The simplest +implementation of this interface uses a list of tuples, where each tuple +is a key-value pair. + +:: + + class LinearMap: + + def __init__(self): + self.items = [] + + def add(self, k, v): + self.items.append((k, v)) + + def get(self, k): + for key, val in self.items: + if key == k: + return val + raise KeyError + +add appends a key-value tuple to the list of items, which takes constant +time. + +get uses a for loop to search the list: if it finds the target key it +returns the corresponding value; otherwise it raises a KeyError. So get +is linear. + +An alternative is to keep the list sorted by key. Then get could use a +bisection search, which is :math:`O(\log n)`. But inserting a new item +in the middle of a list is linear, so this might not be the best option. +There are other data structures that can implement add and get in log +time, but that’s still not as good as constant time, so let’s move on. + +One way to improve LinearMap is to break the list of key-value pairs +into smaller lists. Here’s an implementation called BetterMap, which is +a list of 100 LinearMaps. As we’ll see in a second, the order of growth +for get is still linear, but BetterMap is a step on the path toward +hashtables: + +:: + + class BetterMap: + + def __init__(self, n=100): + self.maps = [] + for i in range(n): + self.maps.append(LinearMap()) + + def find_map(self, k): + index = hash(k) % len(self.maps) + return self.maps[index] + + def add(self, k, v): + m = self.find_map(k) + m.add(k, v) + + def get(self, k): + m = self.find_map(k) + return m.get(k) + +``__init__`` makes a list of n LinearMaps. + +``find_map`` is used by add and get to figure out which map to put the +new item in, or which map to search. + +``find_map`` uses the built-in function hash, which takes almost any +Python object and returns an integer. A limitation of this +implementation is that it only works with hashable keys. Mutable types +like lists and dictionaries are unhashable. + +Hashable objects that are considered equivalent return the same hash +value, but the converse is not necessarily true: two objects with +different values can return the same hash value. + +``find_map`` uses the modulus operator to wrap the hash values into the +range from 0 to len(self.maps), so the result is a legal index into the +list. Of course, this means that many different hash values will wrap +onto the same index. But if the hash function spreads things out pretty +evenly (which is what hash functions are designed to do), then we expect +:math:`n/100` items per LinearMap. + +Since the run time of LinearMap.get is proportional to the number of +items, we expect BetterMap to be about 100 times faster than LinearMap. +The order of growth is still linear, but the leading coefficient is +smaller. That’s nice, but still not as good as a hashtable. + +Here (finally) is the crucial idea that makes hashtables fast: if you +can keep the maximum length of the LinearMaps bounded, LinearMap.get is +constant time. All you have to do is keep track of the number of items +and when the number of items per LinearMap exceeds a threshold, resize +the hashtable by adding more LinearMaps. + +Here is an implementation of a hashtable: + +:: + + class HashMap: + + def __init__(self): + self.maps = BetterMap(2) + self.num = 0 + + def get(self, k): + return self.maps.get(k) + + def add(self, k, v): + if self.num == len(self.maps.maps): + self.resize() + + self.maps.add(k, v) + self.num += 1 + + def resize(self): + new_maps = BetterMap(self.num * 2) + + for m in self.maps.maps: + for k, v in m.items: + new_maps.add(k, v) + + self.maps = new_maps + +Each HashMap contains a BetterMap; ``__init__`` starts with just 2 +LinearMaps and initializes num, which keeps track of the number of +items. + +get just dispatches to BetterMap. The real work happens in add, which +checks the number of items and the size of the BetterMap: if they are +equal, the average number of items per LinearMap is 1, so it calls +resize. + +resize make a new BetterMap, twice as big as the previous one, and then +“rehashes” the items from the old map to the new. + +Rehashing is necessary because changing the number of LinearMaps changes +the denominator of the modulus operator in ``find_map``. That means that +some objects that used to hash into the same LinearMap will get split up +(which is what we wanted, right?). + +Rehashing is linear, so resize is linear, which might seem bad, since I +promised that add would be constant time. But remember that we don’t +have to resize every time, so add is usually constant time and only +occasionally linear. The total amount of work to run add :math:`n` times +is proportional to :math:`n`, so the average time of each add is +constant time! + +To see how this works, think about starting with an empty HashTable and +adding a sequence of items. We start with 2 LinearMaps, so the first 2 +adds are fast (no resizing required). Let’s say that they take one unit +of work each. The next add requires a resize, so we have to rehash the +first two items (let’s call that 2 more units of work) and then add the +third item (one more unit). Adding the next item costs 1 unit, so the +total so far is 6 units of work for 4 items. + +The next add costs 5 units, but the next three are only one unit each, +so the total is 14 units for the first 8 adds. + +The next add costs 9 units, but then we can add 7 more before the next +resize, so the total is 30 units for the first 16 adds. + +After 32 adds, the total cost is 62 units, and I hope you are starting +to see a pattern. After :math:`n` adds, where :math:`n` is a power of +two, the total cost is :math:`2n-2` units, so the average work per add +is a little less than 2 units. When :math:`n` is a power of two, that’s +the best case; for other values of :math:`n` the average work is a +little higher, but that’s not important. The important thing is that it +is :math:`O(1)`. + +Figure [fig.hash] shows how this works graphically. Each block +represents a unit of work. The columns show the total work for each add +in order from left to right: the first two adds cost 1 units, the third +costs 3 units, etc. + +.. figure:: figs/towers.pdf + :alt: The cost of a hashtable add.[fig.hash] + + The cost of a hashtable add.[fig.hash] + +The extra work of rehashing appears as a sequence of increasingly tall +towers with increasing space between them. Now if you knock over the +towers, spreading the cost of resizing over all adds, you can see +graphically that the total cost after :math:`n` adds is :math:`2n - 2`. + +An important feature of this algorithm is that when we resize the +HashTable it grows geometrically; that is, we multiply the size by a +constant. If you increase the size arithmetically—adding a fixed number +each time—the average time per add is linear. + +You can download my implementation of HashMap from +http://thinkpython2.com/code/Map.py, but remember that there is no +reason to use it; if you want a map, just use a Python dictionary. + +Glossary +-------- + +analysis of algorithms: + A way to compare algorithms in terms of their run time and/or space + requirements. + +machine model: + A simplified representation of a computer used to describe + algorithms. + +worst case: + The input that makes a given algorithm run slowest (or require the + most space. + +leading term: + In a polynomial, the term with the highest exponent. + +crossover point: + The problem size where two algorithms require the same run time or + space. + +order of growth: + A set of functions that all grow in a way considered equivalent for + purposes of analysis of algorithms. For example, all functions that + grow linearly belong to the same order of growth. + +Big-Oh notation: + Notation for representing an order of growth; for example, + :math:`O(n)` represents the set of functions that grow linearly. + +linear: + An algorithm whose run time is proportional to problem size, at + least for large problem sizes. + +quadratic: + An algorithm whose run time is proportional to :math:`n^2`, where + :math:`n` is a measure of problem size. + +search: + The problem of locating an element of a collection (like a list or + dictionary) or determining that it is not present. + +hashtable: + A data structure that represents a collection of key-value pairs and + performs search in constant time. + +.. [1] + popen is deprecated now, which means we are supposed to stop using it + and start using the subprocess module. But for simple cases, I find + subprocess more complicated than necessary. So I am going to keep + using popen until they take it away. + +.. [2] + But if you get a question like this in an interview, I think a better + answer is, “The fastest way to sort a million integers is to use + whatever sort function is provided by the language I’m using. Its + performance is good enough for the vast majority of applications, but + if it turned out that my application was too slow, I would use a + profiler to see where the time was being spent. If it looked like a + faster sort algorithm would have a significant effect on performance, + then I would look around for a good implementation of radix sort.” diff --git a/book/index.rst b/book/index.rst index daff9bb..ca38d60 100644 --- a/book/index.rst +++ b/book/index.rst @@ -11,12 +11,33 @@ Contents: .. toctree:: :maxdepth: 2 - book.rst + 00-front-matter.rst + 01-the-way.rst + 02-statement.rst + 03-function.rst + 04-case-ui.rst + 05-cond-recur.rst + 06-fruitful-fn.rst + 07-iteration.rst + 08-string.rst + 09-case-word.rst + 10-list.rst + 11-dict.rst + 12-tuple.rst + 13-case-struct.rst + 14-file.rst + 15-cls-object.rst + 16-cls-fn.rst + 17-cls-meth.rst + 18-inherit.rst + 19-goodies.rst + A-debug.rst + B-analysis-alg.rst + Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` - diff --git a/book/book.rst b/book/latex/book.rst similarity index 100% rename from book/book.rst rename to book/latex/book.rst diff --git a/tools/chapter-plan.ods b/tools/chapter-plan.ods new file mode 100644 index 0000000000000000000000000000000000000000..5a12a38417b2e3c66e59a215bc1761e589af69b5 GIT binary patch literal 59696 zcmZsC1B`A>(B{~-jXUqywr$(Cb;oyX+qP}nw(YrN?EU`DZnDXCQhiQ3ol2k1sjjZ) zsZx*z1w#V@f&v1%kZ=|cvEhuM0|Em2PyP)7*;?9~x_CO68ag=GSQ;C;SlZjsyV;r0 z*&8}rI@8%ZnA(}x8@t+?+PTm$0gfXlgfR+CQLa>&5U+!R1zyHPUrf7@0`mQbE$+Il$tV-NVIE2v#e#_f(@M;3K0 z`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szjU3xi{Jy14>|I=g5SKn)SkL<@H-9c!qZmN3yZQb4ztDNE$%@6GjP)+9&P630`2A$z+xx&m0te#m z)s0Vy6~rt=z0j1Gj^{}O6nxrE1^fgn18lC_&9YP3m*Rp84LH(RmsdpU8^o!rrlr4i zs6O?|)Hsud+h9?q(rKsE({=Yj88tO3|HqFNm{F8 z#*gd!*PurKMI<9~6f;x^oc(_M0DuIehJj`8XGw{3z zt5jFLPH>418}|6(o}{vEIS6Mu&hXQVlS9Pj|5;>rf!Y5li;SQW9{E{^9y1Bkn-o?yVJ~{FnNcuzew^oQvL(t{_kc>{f*GS;_ZL#;vM4t zqOsq|arqnm{%1*d2>grC*Z*Bv|AxnZ*V$iz Date: Sun, 29 Nov 2015 18:18:59 -0200 Subject: [PATCH 05/28] consolidated glossary: translated terms --- book/01-the-way.rst | 1 + tools/build_glossary.py | 86 ++++++++++++++++++++++++++++++++++++++++ tools/chapter-plan.ods | Bin 59696 -> 60721 bytes tools/glossary.ods | Bin 0 -> 68015 bytes 4 files changed, 87 insertions(+) create mode 100644 tools/build_glossary.py create mode 100644 tools/glossary.ods diff --git a/book/01-the-way.rst b/book/01-the-way.rst index a70bbd0..8e5bf6e 100644 --- a/book/01-the-way.rst +++ b/book/01-the-way.rst @@ -372,6 +372,7 @@ useful for many activities beyond programming. At the end of each chapter there is a section, like this one, with my suggestions for debugging. I hope they help! + Glossary -------- diff --git a/tools/build_glossary.py b/tools/build_glossary.py new file mode 100644 index 0000000..d927b32 --- /dev/null +++ b/tools/build_glossary.py @@ -0,0 +1,86 @@ +import glob +import re +import os +import collections + +GLOSSARY = r'Gloss[^-]{3,7}-{8,15}\n(.*)' + +GLOSSARY_RE = re.compile(GLOSSARY, re.DOTALL) + +GLOSSARY_SECTION_RE = re.compile(GLOSSARY + r'-{8,15}', re.DOTALL) + +expected_entries = [ # glossary entries per chapter + ('01', 21), + ('02', 19), + ('03', 22), + ('04', 11), + ('05', 15), + ('06', 5), + ('07', 8), + ('08', 12), + ('09', 3), + ('10', 14), + ('11', 20), + ('12', 8), + ('13', 6), + ('14', 14), + ('15', 9), + ('16', 7), + ('17', 9), + ('18', 13), + ('19', 5), + ( 'B', 11), +] + +expected_entries_dic = dict(expected_entries) + +# \n(.*?)\n\n +ENTRY_RE = re.compile(r'([^\n]+):\n[ ]+(.*?)\n\n', re.DOTALL) + +GlossaryEntry = collections.namedtuple('GlossaryEntry', 'term definition') +Definition = collections.namedtuple('Definition', 'chapter_id position text') + + +def parse_entries(text, chapter_id): + matches = ENTRY_RE.findall(text) + entries = [] + for position, match in enumerate(matches, 1): + term = match[0] + definition_text = ' '.join(match[1].split()) + #print(term, '::', definition_text) + entries.append(GlossaryEntry(term, + Definition(chapter_id, position, definition_text))) + return entries + + +def scan_files(*paths): + entries = collections.defaultdict(list) + for path in paths: + for name in glob.glob(os.path.join(path, '*.rst')): + chapter_id = os.path.basename(name).split('-')[0] + + with open(name, encoding='utf-8') as infile: + rst = infile.read() + gloss_match = (GLOSSARY_SECTION_RE.search(rst) or + GLOSSARY_RE.search(rst)) + if gloss_match: + #print('*' * 40, name) + new_entries = parse_entries(gloss_match.group(1), chapter_id) + for term, definition in new_entries: + #if term in entries: + # print('duplicate term:', term) + entries[term].append(definition) + #print(len(new_entries)) + assert expected_entries_dic[chapter_id] == len(new_entries), ( + chapter_id, expected_entries_dic[chapter_id], len(new_entries)) + for term in sorted(entries, key=str.upper): + definitions = entries[term] + for i, (chapter_id, position, definition) in enumerate(sorted(definitions)): + if i: + term = '\t' + print(term, chapter_id, position, definition, sep='|') + + +if __name__ == '__main__': + import sys + scan_files(*sys.argv[1:]) diff --git a/tools/chapter-plan.ods b/tools/chapter-plan.ods index 5a12a38417b2e3c66e59a215bc1761e589af69b5..67b2db46952a76f63e9c4e2b2f76f3a5e3d80f99 100644 GIT binary patch delta 59019 zcmV)mK%T#_(gU&D0}W710|XQR00;m8bZ~u<4N(qsaD7KhuO7Z3%>V!)&5>+Df6VAf zL_t(|oa}uCKpV^R@Lk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#%%hZtdU6kL^^R-BL0PmhTA(=n#kMOa??wFbqz z^gS722xtr5$?tFtJ(@fQo%->|DBuyr+3`|)qep`2VIzlHx@qSJD53&k?!zdcOC3Rm*J{FmST>Z;{8=})>)0{O1Xw?**Ggdrh(z?@>d8! z_8U<-2jEXbts0L*h@^M})rkakr#PFqm0`~cM~r2-J9Xcl6`8_-_O-lDk1Wtv>M^yo z6`car$+}8np;p>5EL9JC3N0gZ)1}P?crZscBq7kgFn)12wttKEdsatI8!MNB0Dx7B zf6wZkb+_x{D1V}}G+TV=fcy3Pcf3Vng8`1VMf`_ewaEYv-hBYi*~I%#oBtm=>n0xh z-!Yo14gEiKi4E|dyY~kFKX~Gsf`9+6&S1;tFNTP1e!P2TN}Q!**S4_9 zZ_@P9C4NKIpF<`<_sivdMgid8k{&JJLtDEz zIoNx8aeLS~{0;xNj&*jaPE`K!5ep3 u{*feTj|vrQ9iF+z{tvM17rO-d`zKYnkI<3)3s`9#{@{QWt@PV(>i+?wH*WU; diff --git a/tools/glossary.ods b/tools/glossary.ods new file mode 100644 index 0000000000000000000000000000000000000000..c76ac850b2572ee9a6d6f6300d1798873242eae6 GIT binary patch literal 68015 zcmV)hK%>7E04@Lk00;m80Bvb)WpsIPWnpk|Y-wX* zbZKvHFLrKZE^lFTX>%@baAj^}Z)0_BWo~pXb8vEHVPtb?Wo2|wO9KQH000O80Mej+ zM+TBVu28rD08qF902lxO090soZDMX=X>4;ZbZB*LVs2q+Y%XwaXNgcwM-2)Z3IG5A z4M|8uQUCw|{{R30@CX6`002NdB}f1OxED!8K~#90>|F(58%eUAkw#3mY*}VzhL{~@ zW@ct)X3lPyX*bNw%!xxzY{$&ZEQa|5k}OM#@9zKox0}SZcg|?0r>FZ>b#--hcQpiH z1cCqz15Na|5CT4dfLmkZBY$y@D3$1a2;j>$nfF)Exu1mMy#fNl)1 z$#7gU7#RXwJ0~x!LVJlO!2c4$yVLGNXsgC4b{&ED9bv>p%hQSo%a;@5zsl}h2MDO5 z2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^Pi(uqq zi9qEh0^9hx=!Sd8|c^~1kl=xa)=SSM&up>s&}1!AbNS|x{!;0Q11Z&gnl9S zCD8RDmwBij%x7RksU~1LVbOxH0a)Q6a~Re!GGgW-q!JP}dXcrFn)3{cImjg@ZgWs0 zT#gCTJ%|#NSW`l Date: Sun, 29 Nov 2015 23:28:54 -0200 Subject: [PATCH 06/28] glossaries generated from master data file glossary.csv --- {book => attic}/latex/Makefile | 0 {book => attic}/latex/back.png | Bin {book => attic}/latex/book.rst | 0 {book => attic}/latex/book.tex | 0 {book => attic}/latex/figs/assign2.eps | 0 {book => attic}/latex/figs/assign2.fig | 0 {book => attic}/latex/figs/assign2.fig.bak | 0 {book => attic}/latex/figs/assign2.pdf | Bin {book => attic}/latex/figs/banana.eps | 0 {book => attic}/latex/figs/banana.fig | 0 {book => attic}/latex/figs/banana.pdf | Bin {book => attic}/latex/figs/card1.eps | 0 {book => attic}/latex/figs/card1.fig | 0 {book => attic}/latex/figs/card1.pdf | Bin {book => attic}/latex/figs/class1.eps | 0 {book => attic}/latex/figs/class1.fig | 0 {book => attic}/latex/figs/class1.pdf | Bin {book => attic}/latex/figs/compile.eps | 0 {book => attic}/latex/figs/compile.fig | 0 {book => attic}/latex/figs/compile.pdf | Bin {book => attic}/latex/figs/dict1.eps | 0 {book => attic}/latex/figs/dict1.fig | 0 {book => attic}/latex/figs/dict1.pdf | Bin {book => attic}/latex/figs/dict2.eps | 0 {book => attic}/latex/figs/dict2.fig | 0 {book => attic}/latex/figs/dict2.pdf | Bin {book => attic}/latex/figs/fibonacci.eps | 0 {book => attic}/latex/figs/fibonacci.fig | 0 {book => attic}/latex/figs/fibonacci.pdf | Bin {book => attic}/latex/figs/flower.test.pdf | Bin {book => attic}/latex/figs/flowers.eps | 0 {book => attic}/latex/figs/flowers.pdf | Bin {book => attic}/latex/figs/interpret.eps | 0 {book => attic}/latex/figs/interpret.fig | 0 {book => attic}/latex/figs/interpret.pdf | Bin {book => attic}/latex/figs/koch.eps | 0 {book => attic}/latex/figs/koch.pdf | Bin {book => attic}/latex/figs/list1.eps | 0 {book => attic}/latex/figs/list1.fig | 0 {book => attic}/latex/figs/list1.pdf | Bin {book => attic}/latex/figs/list2.eps | 0 {book => attic}/latex/figs/list2.fig | 0 {book => attic}/latex/figs/list2.pdf | Bin {book => attic}/latex/figs/list3.eps | 0 {book => attic}/latex/figs/list3.fig | 0 {book => attic}/latex/figs/list3.pdf | Bin {book => attic}/latex/figs/liststate.eps | 0 {book => attic}/latex/figs/liststate.fig | 0 {book => attic}/latex/figs/liststate.fig.bak | 0 {book => attic}/latex/figs/liststate.pdf | Bin {book => attic}/latex/figs/listsum1.eps | 0 {book => attic}/latex/figs/listsum1.pdf | Bin {book => attic}/latex/figs/listsum2.eps | 0 {book => attic}/latex/figs/listsum2.pdf | Bin {book => attic}/latex/figs/loop.py | 0 {book => attic}/latex/figs/loop.py~ | 0 {book => attic}/latex/figs/pies.eps | 0 {book => attic}/latex/figs/pies.pdf | Bin {book => attic}/latex/figs/point.eps | 0 {book => attic}/latex/figs/point.fig | 0 {book => attic}/latex/figs/point.pdf | Bin {book => attic}/latex/figs/rectangle.eps | 0 {book => attic}/latex/figs/rectangle.fig | 0 {book => attic}/latex/figs/rectangle.pdf | Bin {book => attic}/latex/figs/rectangle2.eps | 0 {book => attic}/latex/figs/rectangle2.fig | 0 {book => attic}/latex/figs/rectangle2.pdf | Bin {book => attic}/latex/figs/stack.eps | 0 {book => attic}/latex/figs/stack.fig | 0 {book => attic}/latex/figs/stack.pdf | Bin {book => attic}/latex/figs/stack2.eps | 0 {book => attic}/latex/figs/stack2.fig | 0 {book => attic}/latex/figs/stack2.pdf | Bin {book => attic}/latex/figs/stack3.eps | 0 {book => attic}/latex/figs/stack3.fig | 0 {book => attic}/latex/figs/stack3.pdf | Bin {book => attic}/latex/figs/stack4.eps | 0 {book => attic}/latex/figs/stack4.fig | 0 {book => attic}/latex/figs/stack4.pdf | Bin {book => attic}/latex/figs/stack5.eps | 0 {book => attic}/latex/figs/stack5.fig | 0 {book => attic}/latex/figs/stack5.pdf | Bin {book => attic}/latex/figs/state.eps | 0 {book => attic}/latex/figs/state.fig | 0 {book => attic}/latex/figs/state.pdf | Bin {book => attic}/latex/figs/state2.eps | 0 {book => attic}/latex/figs/state2.fig | 0 {book => attic}/latex/figs/state2.pdf | Bin {book => attic}/latex/figs/state3.eps | 0 {book => attic}/latex/figs/state3.fig | 0 {book => attic}/latex/figs/state3.pdf | Bin {book => attic}/latex/figs/state4.eps | 0 {book => attic}/latex/figs/state4.fig | 0 {book => attic}/latex/figs/state4.pdf | Bin {book => attic}/latex/figs/state5.eps | 0 {book => attic}/latex/figs/state5.fig | 0 {book => attic}/latex/figs/state5.pdf | Bin {book => attic}/latex/figs/time.eps | 0 {book => attic}/latex/figs/time.fig | 0 {book => attic}/latex/figs/time.pdf | Bin {book => attic}/latex/figs/towers.eps | 0 {book => attic}/latex/figs/towers.fig | 0 {book => attic}/latex/figs/towers.pdf | Bin {book => attic}/latex/figs/tuple1.eps | 0 {book => attic}/latex/figs/tuple1.fig | 0 {book => attic}/latex/figs/tuple1.pdf | Bin {book => attic}/latex/footer.html | 0 {book => attic}/latex/header.html | 0 {book => attic}/latex/htmlonly | 0 {book => attic}/latex/latexonly | 0 {book => attic}/latex/localdef.py | 0 {book => attic}/latex/next.png | Bin {book => attic}/latex/up.png | Bin book/01-the-way.rst | 77 +- book/02-statement.rst | 70 +- book/03-function.rst | 84 +-- book/04-case-ui.rst | 44 +- book/05-cond-recur.rst | 58 +- book/06-fruitful-fn.rst | 22 +- book/07-iteration.rst | 29 +- book/08-string.rst | 45 +- book/09-case-word.rst | 13 +- book/10-list.rst | 49 +- book/11-dict.rst | 72 +- book/12-tuple.rst | 31 +- book/13-case-struct.rst | 24 +- book/14-file.rst | 53 +- book/15-cls-object.rst | 36 +- book/16-cls-fn.rst | 30 +- book/17-cls-meth.rst | 36 +- book/18-inherit.rst | 51 +- book/19-goodies.rst | 19 +- book/B-analysis-alg.rst | 45 +- book/C-glossary.rst | 707 ++++++++++++++++++ book/glossary/01.txt | 63 ++ book/glossary/02.txt | 57 ++ book/glossary/03.txt | 66 ++ book/glossary/04.txt | 33 + book/glossary/05.txt | 45 ++ book/glossary/06.txt | 15 + book/glossary/07.txt | 24 + book/glossary/08.txt | 36 + book/glossary/09.txt | 9 + book/glossary/10.txt | 42 ++ book/glossary/11.txt | 60 ++ book/glossary/12.txt | 24 + book/glossary/13.txt | 18 + book/glossary/14.txt | 42 ++ book/glossary/15.txt | 27 + book/glossary/16.txt | 21 + book/glossary/17.txt | 27 + book/glossary/18.txt | 39 + book/glossary/19.txt | 15 + book/glossary/B.txt | 33 + book/index.rst | 3 +- tools/glossary.csv | 233 ++++++ tools/glossary.ods | Bin 68015 -> 53817 bytes tools/{build_glossary.py => join_glossary.py} | 0 tools/split_glossary.py | 102 +++ 159 files changed, 1809 insertions(+), 820 deletions(-) rename {book => attic}/latex/Makefile (100%) rename {book => attic}/latex/back.png (100%) rename {book => attic}/latex/book.rst (100%) rename {book => attic}/latex/book.tex (100%) rename {book => attic}/latex/figs/assign2.eps (100%) rename {book => attic}/latex/figs/assign2.fig (100%) rename {book => attic}/latex/figs/assign2.fig.bak (100%) rename {book => attic}/latex/figs/assign2.pdf (100%) rename {book => attic}/latex/figs/banana.eps (100%) rename {book => attic}/latex/figs/banana.fig (100%) rename {book => attic}/latex/figs/banana.pdf (100%) rename {book => attic}/latex/figs/card1.eps (100%) rename {book => attic}/latex/figs/card1.fig (100%) rename {book => attic}/latex/figs/card1.pdf (100%) rename {book => attic}/latex/figs/class1.eps (100%) rename {book => attic}/latex/figs/class1.fig (100%) rename {book => attic}/latex/figs/class1.pdf (100%) rename {book => attic}/latex/figs/compile.eps (100%) rename {book => attic}/latex/figs/compile.fig (100%) rename {book => attic}/latex/figs/compile.pdf (100%) rename {book => attic}/latex/figs/dict1.eps (100%) rename {book => attic}/latex/figs/dict1.fig (100%) rename {book => attic}/latex/figs/dict1.pdf (100%) rename {book => attic}/latex/figs/dict2.eps (100%) rename {book => attic}/latex/figs/dict2.fig (100%) rename {book => attic}/latex/figs/dict2.pdf (100%) rename {book => attic}/latex/figs/fibonacci.eps (100%) rename {book => attic}/latex/figs/fibonacci.fig (100%) rename {book => attic}/latex/figs/fibonacci.pdf (100%) rename {book => attic}/latex/figs/flower.test.pdf (100%) rename {book => attic}/latex/figs/flowers.eps (100%) rename {book => attic}/latex/figs/flowers.pdf (100%) rename {book => attic}/latex/figs/interpret.eps (100%) rename {book => attic}/latex/figs/interpret.fig (100%) rename {book => attic}/latex/figs/interpret.pdf (100%) rename {book => attic}/latex/figs/koch.eps (100%) rename {book => attic}/latex/figs/koch.pdf (100%) rename {book => attic}/latex/figs/list1.eps (100%) rename {book => attic}/latex/figs/list1.fig (100%) rename {book => attic}/latex/figs/list1.pdf (100%) rename {book => attic}/latex/figs/list2.eps (100%) rename {book => attic}/latex/figs/list2.fig (100%) rename {book => attic}/latex/figs/list2.pdf (100%) rename {book => attic}/latex/figs/list3.eps (100%) rename {book => attic}/latex/figs/list3.fig (100%) rename {book => attic}/latex/figs/list3.pdf (100%) rename {book => attic}/latex/figs/liststate.eps (100%) rename {book => attic}/latex/figs/liststate.fig (100%) rename {book => attic}/latex/figs/liststate.fig.bak (100%) rename {book => attic}/latex/figs/liststate.pdf (100%) rename {book => attic}/latex/figs/listsum1.eps (100%) rename {book => attic}/latex/figs/listsum1.pdf (100%) rename {book => attic}/latex/figs/listsum2.eps (100%) rename {book => attic}/latex/figs/listsum2.pdf (100%) rename {book => attic}/latex/figs/loop.py (100%) rename {book => attic}/latex/figs/loop.py~ (100%) rename {book => attic}/latex/figs/pies.eps (100%) rename {book => attic}/latex/figs/pies.pdf (100%) rename {book => attic}/latex/figs/point.eps (100%) rename {book => attic}/latex/figs/point.fig (100%) rename {book => attic}/latex/figs/point.pdf (100%) rename {book => attic}/latex/figs/rectangle.eps (100%) rename {book => attic}/latex/figs/rectangle.fig (100%) rename {book => attic}/latex/figs/rectangle.pdf (100%) rename {book => attic}/latex/figs/rectangle2.eps (100%) rename {book => attic}/latex/figs/rectangle2.fig (100%) rename {book => attic}/latex/figs/rectangle2.pdf (100%) rename {book => attic}/latex/figs/stack.eps (100%) rename {book => attic}/latex/figs/stack.fig (100%) rename {book => attic}/latex/figs/stack.pdf (100%) rename {book => attic}/latex/figs/stack2.eps (100%) rename {book => attic}/latex/figs/stack2.fig (100%) rename {book => attic}/latex/figs/stack2.pdf (100%) rename {book => attic}/latex/figs/stack3.eps (100%) rename {book => attic}/latex/figs/stack3.fig (100%) rename {book => attic}/latex/figs/stack3.pdf (100%) rename {book => attic}/latex/figs/stack4.eps (100%) rename {book => attic}/latex/figs/stack4.fig (100%) rename {book => attic}/latex/figs/stack4.pdf (100%) rename {book => attic}/latex/figs/stack5.eps (100%) rename {book => attic}/latex/figs/stack5.fig (100%) rename {book => attic}/latex/figs/stack5.pdf (100%) rename {book => attic}/latex/figs/state.eps (100%) rename {book => attic}/latex/figs/state.fig (100%) rename {book => attic}/latex/figs/state.pdf (100%) rename {book => attic}/latex/figs/state2.eps (100%) rename {book => attic}/latex/figs/state2.fig (100%) rename {book => attic}/latex/figs/state2.pdf (100%) rename {book => attic}/latex/figs/state3.eps (100%) rename {book => attic}/latex/figs/state3.fig (100%) rename {book => attic}/latex/figs/state3.pdf (100%) rename {book => attic}/latex/figs/state4.eps (100%) rename {book => attic}/latex/figs/state4.fig (100%) rename {book => attic}/latex/figs/state4.pdf (100%) rename {book => attic}/latex/figs/state5.eps (100%) rename {book => attic}/latex/figs/state5.fig (100%) rename {book => attic}/latex/figs/state5.pdf (100%) rename {book => attic}/latex/figs/time.eps (100%) rename {book => attic}/latex/figs/time.fig (100%) rename {book => attic}/latex/figs/time.pdf (100%) rename {book => attic}/latex/figs/towers.eps (100%) rename {book => attic}/latex/figs/towers.fig (100%) rename {book => attic}/latex/figs/towers.pdf (100%) rename {book => attic}/latex/figs/tuple1.eps (100%) rename {book => attic}/latex/figs/tuple1.fig (100%) rename {book => attic}/latex/figs/tuple1.pdf (100%) rename {book => attic}/latex/footer.html (100%) rename {book => attic}/latex/header.html (100%) rename {book => attic}/latex/htmlonly (100%) rename {book => attic}/latex/latexonly (100%) rename {book => attic}/latex/localdef.py (100%) rename {book => attic}/latex/next.png (100%) rename {book => attic}/latex/up.png (100%) create mode 100644 book/C-glossary.rst create mode 100644 book/glossary/01.txt create mode 100644 book/glossary/02.txt create mode 100644 book/glossary/03.txt create mode 100644 book/glossary/04.txt create mode 100644 book/glossary/05.txt create mode 100644 book/glossary/06.txt create mode 100644 book/glossary/07.txt create mode 100644 book/glossary/08.txt create mode 100644 book/glossary/09.txt create mode 100644 book/glossary/10.txt create mode 100644 book/glossary/11.txt create mode 100644 book/glossary/12.txt create mode 100644 book/glossary/13.txt create mode 100644 book/glossary/14.txt create mode 100644 book/glossary/15.txt create mode 100644 book/glossary/16.txt create mode 100644 book/glossary/17.txt create mode 100644 book/glossary/18.txt create mode 100644 book/glossary/19.txt create mode 100644 book/glossary/B.txt create mode 100644 tools/glossary.csv rename tools/{build_glossary.py => join_glossary.py} (100%) create mode 100755 tools/split_glossary.py diff --git a/book/latex/Makefile b/attic/latex/Makefile similarity index 100% rename from book/latex/Makefile rename to attic/latex/Makefile diff --git a/book/latex/back.png b/attic/latex/back.png similarity index 100% rename from book/latex/back.png rename to attic/latex/back.png diff --git a/book/latex/book.rst b/attic/latex/book.rst similarity index 100% rename from book/latex/book.rst rename to attic/latex/book.rst diff --git a/book/latex/book.tex b/attic/latex/book.tex similarity index 100% rename from book/latex/book.tex rename to attic/latex/book.tex diff --git a/book/latex/figs/assign2.eps b/attic/latex/figs/assign2.eps similarity index 100% rename from book/latex/figs/assign2.eps rename to attic/latex/figs/assign2.eps diff --git a/book/latex/figs/assign2.fig b/attic/latex/figs/assign2.fig similarity index 100% rename from book/latex/figs/assign2.fig rename to attic/latex/figs/assign2.fig diff --git a/book/latex/figs/assign2.fig.bak b/attic/latex/figs/assign2.fig.bak similarity index 100% rename from book/latex/figs/assign2.fig.bak rename to attic/latex/figs/assign2.fig.bak diff --git a/book/latex/figs/assign2.pdf b/attic/latex/figs/assign2.pdf similarity index 100% rename from book/latex/figs/assign2.pdf rename to attic/latex/figs/assign2.pdf diff --git a/book/latex/figs/banana.eps b/attic/latex/figs/banana.eps similarity index 100% rename from book/latex/figs/banana.eps rename to attic/latex/figs/banana.eps diff --git a/book/latex/figs/banana.fig b/attic/latex/figs/banana.fig similarity index 100% rename from book/latex/figs/banana.fig rename to attic/latex/figs/banana.fig diff --git a/book/latex/figs/banana.pdf b/attic/latex/figs/banana.pdf similarity index 100% rename from book/latex/figs/banana.pdf rename to attic/latex/figs/banana.pdf diff --git a/book/latex/figs/card1.eps b/attic/latex/figs/card1.eps similarity index 100% rename from book/latex/figs/card1.eps rename to attic/latex/figs/card1.eps diff --git a/book/latex/figs/card1.fig b/attic/latex/figs/card1.fig similarity index 100% rename from book/latex/figs/card1.fig rename to attic/latex/figs/card1.fig diff --git a/book/latex/figs/card1.pdf b/attic/latex/figs/card1.pdf similarity index 100% rename from book/latex/figs/card1.pdf rename to attic/latex/figs/card1.pdf diff --git a/book/latex/figs/class1.eps b/attic/latex/figs/class1.eps similarity index 100% rename from book/latex/figs/class1.eps rename to attic/latex/figs/class1.eps diff --git a/book/latex/figs/class1.fig b/attic/latex/figs/class1.fig similarity index 100% rename from book/latex/figs/class1.fig rename to attic/latex/figs/class1.fig diff --git a/book/latex/figs/class1.pdf b/attic/latex/figs/class1.pdf similarity index 100% rename from book/latex/figs/class1.pdf rename to attic/latex/figs/class1.pdf diff --git a/book/latex/figs/compile.eps b/attic/latex/figs/compile.eps similarity index 100% rename from book/latex/figs/compile.eps rename to attic/latex/figs/compile.eps diff --git a/book/latex/figs/compile.fig b/attic/latex/figs/compile.fig similarity index 100% rename from book/latex/figs/compile.fig rename to attic/latex/figs/compile.fig diff --git a/book/latex/figs/compile.pdf b/attic/latex/figs/compile.pdf similarity index 100% rename from book/latex/figs/compile.pdf rename to attic/latex/figs/compile.pdf diff --git a/book/latex/figs/dict1.eps b/attic/latex/figs/dict1.eps similarity index 100% rename from book/latex/figs/dict1.eps rename to attic/latex/figs/dict1.eps diff --git a/book/latex/figs/dict1.fig b/attic/latex/figs/dict1.fig similarity index 100% rename from book/latex/figs/dict1.fig rename to attic/latex/figs/dict1.fig diff --git a/book/latex/figs/dict1.pdf b/attic/latex/figs/dict1.pdf similarity index 100% rename from book/latex/figs/dict1.pdf rename to attic/latex/figs/dict1.pdf diff --git a/book/latex/figs/dict2.eps b/attic/latex/figs/dict2.eps similarity index 100% rename from book/latex/figs/dict2.eps rename to attic/latex/figs/dict2.eps diff --git a/book/latex/figs/dict2.fig b/attic/latex/figs/dict2.fig similarity index 100% rename from book/latex/figs/dict2.fig rename to attic/latex/figs/dict2.fig diff --git a/book/latex/figs/dict2.pdf b/attic/latex/figs/dict2.pdf similarity index 100% rename from book/latex/figs/dict2.pdf rename to attic/latex/figs/dict2.pdf diff --git a/book/latex/figs/fibonacci.eps b/attic/latex/figs/fibonacci.eps similarity index 100% rename from book/latex/figs/fibonacci.eps rename to attic/latex/figs/fibonacci.eps diff --git a/book/latex/figs/fibonacci.fig b/attic/latex/figs/fibonacci.fig similarity index 100% rename from book/latex/figs/fibonacci.fig rename to attic/latex/figs/fibonacci.fig diff --git a/book/latex/figs/fibonacci.pdf b/attic/latex/figs/fibonacci.pdf similarity index 100% rename from book/latex/figs/fibonacci.pdf rename to attic/latex/figs/fibonacci.pdf diff --git a/book/latex/figs/flower.test.pdf b/attic/latex/figs/flower.test.pdf similarity index 100% rename from book/latex/figs/flower.test.pdf rename to attic/latex/figs/flower.test.pdf diff --git a/book/latex/figs/flowers.eps b/attic/latex/figs/flowers.eps similarity index 100% rename from book/latex/figs/flowers.eps rename to attic/latex/figs/flowers.eps diff --git a/book/latex/figs/flowers.pdf b/attic/latex/figs/flowers.pdf similarity index 100% rename from book/latex/figs/flowers.pdf rename to attic/latex/figs/flowers.pdf diff --git a/book/latex/figs/interpret.eps b/attic/latex/figs/interpret.eps similarity index 100% rename from book/latex/figs/interpret.eps rename to attic/latex/figs/interpret.eps diff --git a/book/latex/figs/interpret.fig b/attic/latex/figs/interpret.fig similarity index 100% rename from book/latex/figs/interpret.fig rename to attic/latex/figs/interpret.fig diff --git a/book/latex/figs/interpret.pdf b/attic/latex/figs/interpret.pdf similarity index 100% rename from book/latex/figs/interpret.pdf rename to attic/latex/figs/interpret.pdf diff --git a/book/latex/figs/koch.eps b/attic/latex/figs/koch.eps similarity index 100% rename from book/latex/figs/koch.eps rename to attic/latex/figs/koch.eps diff --git a/book/latex/figs/koch.pdf b/attic/latex/figs/koch.pdf similarity index 100% rename from book/latex/figs/koch.pdf rename to attic/latex/figs/koch.pdf diff --git a/book/latex/figs/list1.eps b/attic/latex/figs/list1.eps similarity index 100% rename from book/latex/figs/list1.eps rename to attic/latex/figs/list1.eps diff --git a/book/latex/figs/list1.fig b/attic/latex/figs/list1.fig similarity index 100% rename from book/latex/figs/list1.fig rename to attic/latex/figs/list1.fig diff --git a/book/latex/figs/list1.pdf b/attic/latex/figs/list1.pdf similarity index 100% rename from book/latex/figs/list1.pdf rename to attic/latex/figs/list1.pdf diff --git a/book/latex/figs/list2.eps b/attic/latex/figs/list2.eps similarity index 100% rename from book/latex/figs/list2.eps rename to attic/latex/figs/list2.eps diff --git a/book/latex/figs/list2.fig b/attic/latex/figs/list2.fig similarity index 100% rename from book/latex/figs/list2.fig rename to attic/latex/figs/list2.fig diff --git a/book/latex/figs/list2.pdf b/attic/latex/figs/list2.pdf similarity index 100% rename from book/latex/figs/list2.pdf rename to attic/latex/figs/list2.pdf diff --git a/book/latex/figs/list3.eps b/attic/latex/figs/list3.eps similarity index 100% rename from book/latex/figs/list3.eps rename to attic/latex/figs/list3.eps diff --git a/book/latex/figs/list3.fig b/attic/latex/figs/list3.fig similarity index 100% rename from book/latex/figs/list3.fig rename to attic/latex/figs/list3.fig diff --git a/book/latex/figs/list3.pdf b/attic/latex/figs/list3.pdf similarity index 100% rename from book/latex/figs/list3.pdf rename to attic/latex/figs/list3.pdf diff --git a/book/latex/figs/liststate.eps b/attic/latex/figs/liststate.eps similarity index 100% rename from book/latex/figs/liststate.eps rename to attic/latex/figs/liststate.eps diff --git a/book/latex/figs/liststate.fig b/attic/latex/figs/liststate.fig similarity index 100% rename from book/latex/figs/liststate.fig rename to attic/latex/figs/liststate.fig diff --git a/book/latex/figs/liststate.fig.bak b/attic/latex/figs/liststate.fig.bak similarity index 100% rename from book/latex/figs/liststate.fig.bak rename to attic/latex/figs/liststate.fig.bak diff --git a/book/latex/figs/liststate.pdf b/attic/latex/figs/liststate.pdf similarity index 100% rename from book/latex/figs/liststate.pdf rename to attic/latex/figs/liststate.pdf diff --git a/book/latex/figs/listsum1.eps b/attic/latex/figs/listsum1.eps similarity index 100% rename from book/latex/figs/listsum1.eps rename to attic/latex/figs/listsum1.eps diff --git a/book/latex/figs/listsum1.pdf b/attic/latex/figs/listsum1.pdf similarity index 100% rename from book/latex/figs/listsum1.pdf rename to attic/latex/figs/listsum1.pdf diff --git a/book/latex/figs/listsum2.eps b/attic/latex/figs/listsum2.eps similarity index 100% rename from book/latex/figs/listsum2.eps rename to attic/latex/figs/listsum2.eps diff --git a/book/latex/figs/listsum2.pdf b/attic/latex/figs/listsum2.pdf similarity index 100% rename from book/latex/figs/listsum2.pdf rename to attic/latex/figs/listsum2.pdf diff --git a/book/latex/figs/loop.py b/attic/latex/figs/loop.py similarity index 100% rename from book/latex/figs/loop.py rename to attic/latex/figs/loop.py diff --git a/book/latex/figs/loop.py~ b/attic/latex/figs/loop.py~ similarity index 100% rename from book/latex/figs/loop.py~ rename to attic/latex/figs/loop.py~ diff --git a/book/latex/figs/pies.eps b/attic/latex/figs/pies.eps similarity index 100% rename from book/latex/figs/pies.eps rename to attic/latex/figs/pies.eps diff --git a/book/latex/figs/pies.pdf b/attic/latex/figs/pies.pdf similarity index 100% rename from book/latex/figs/pies.pdf rename to attic/latex/figs/pies.pdf diff --git a/book/latex/figs/point.eps b/attic/latex/figs/point.eps similarity index 100% rename from book/latex/figs/point.eps rename to attic/latex/figs/point.eps diff --git a/book/latex/figs/point.fig b/attic/latex/figs/point.fig similarity index 100% rename from book/latex/figs/point.fig rename to attic/latex/figs/point.fig diff --git a/book/latex/figs/point.pdf b/attic/latex/figs/point.pdf similarity index 100% rename from book/latex/figs/point.pdf rename to attic/latex/figs/point.pdf diff --git a/book/latex/figs/rectangle.eps b/attic/latex/figs/rectangle.eps similarity index 100% rename from book/latex/figs/rectangle.eps rename to attic/latex/figs/rectangle.eps diff --git a/book/latex/figs/rectangle.fig b/attic/latex/figs/rectangle.fig similarity index 100% rename from book/latex/figs/rectangle.fig rename to attic/latex/figs/rectangle.fig diff --git a/book/latex/figs/rectangle.pdf b/attic/latex/figs/rectangle.pdf similarity index 100% rename from book/latex/figs/rectangle.pdf rename to attic/latex/figs/rectangle.pdf diff --git a/book/latex/figs/rectangle2.eps b/attic/latex/figs/rectangle2.eps similarity index 100% rename from book/latex/figs/rectangle2.eps rename to attic/latex/figs/rectangle2.eps diff --git a/book/latex/figs/rectangle2.fig b/attic/latex/figs/rectangle2.fig similarity index 100% rename from book/latex/figs/rectangle2.fig rename to attic/latex/figs/rectangle2.fig diff --git a/book/latex/figs/rectangle2.pdf b/attic/latex/figs/rectangle2.pdf similarity index 100% rename from book/latex/figs/rectangle2.pdf rename to attic/latex/figs/rectangle2.pdf diff --git a/book/latex/figs/stack.eps b/attic/latex/figs/stack.eps similarity index 100% rename from book/latex/figs/stack.eps rename to attic/latex/figs/stack.eps diff --git a/book/latex/figs/stack.fig b/attic/latex/figs/stack.fig similarity index 100% rename from book/latex/figs/stack.fig rename to attic/latex/figs/stack.fig diff --git a/book/latex/figs/stack.pdf b/attic/latex/figs/stack.pdf similarity index 100% rename from book/latex/figs/stack.pdf rename to attic/latex/figs/stack.pdf diff --git a/book/latex/figs/stack2.eps b/attic/latex/figs/stack2.eps similarity index 100% rename from book/latex/figs/stack2.eps rename to attic/latex/figs/stack2.eps diff --git a/book/latex/figs/stack2.fig b/attic/latex/figs/stack2.fig similarity index 100% rename from book/latex/figs/stack2.fig rename to attic/latex/figs/stack2.fig diff --git a/book/latex/figs/stack2.pdf b/attic/latex/figs/stack2.pdf similarity index 100% rename from book/latex/figs/stack2.pdf rename to attic/latex/figs/stack2.pdf diff --git a/book/latex/figs/stack3.eps b/attic/latex/figs/stack3.eps similarity index 100% rename from book/latex/figs/stack3.eps rename to attic/latex/figs/stack3.eps diff --git a/book/latex/figs/stack3.fig b/attic/latex/figs/stack3.fig similarity index 100% rename from book/latex/figs/stack3.fig rename to attic/latex/figs/stack3.fig diff --git a/book/latex/figs/stack3.pdf b/attic/latex/figs/stack3.pdf similarity index 100% rename from book/latex/figs/stack3.pdf rename to attic/latex/figs/stack3.pdf diff --git a/book/latex/figs/stack4.eps b/attic/latex/figs/stack4.eps similarity index 100% rename from book/latex/figs/stack4.eps rename to attic/latex/figs/stack4.eps diff --git a/book/latex/figs/stack4.fig b/attic/latex/figs/stack4.fig similarity index 100% rename from book/latex/figs/stack4.fig rename to attic/latex/figs/stack4.fig diff --git a/book/latex/figs/stack4.pdf b/attic/latex/figs/stack4.pdf similarity index 100% rename from book/latex/figs/stack4.pdf rename to attic/latex/figs/stack4.pdf diff --git a/book/latex/figs/stack5.eps b/attic/latex/figs/stack5.eps similarity index 100% rename from book/latex/figs/stack5.eps rename to attic/latex/figs/stack5.eps diff --git a/book/latex/figs/stack5.fig b/attic/latex/figs/stack5.fig similarity index 100% rename from book/latex/figs/stack5.fig rename to attic/latex/figs/stack5.fig diff --git a/book/latex/figs/stack5.pdf b/attic/latex/figs/stack5.pdf similarity index 100% rename from book/latex/figs/stack5.pdf rename to attic/latex/figs/stack5.pdf diff --git a/book/latex/figs/state.eps b/attic/latex/figs/state.eps similarity index 100% rename from book/latex/figs/state.eps rename to attic/latex/figs/state.eps diff --git a/book/latex/figs/state.fig b/attic/latex/figs/state.fig similarity index 100% rename from book/latex/figs/state.fig rename to attic/latex/figs/state.fig diff --git a/book/latex/figs/state.pdf b/attic/latex/figs/state.pdf similarity index 100% rename from book/latex/figs/state.pdf rename to attic/latex/figs/state.pdf diff --git a/book/latex/figs/state2.eps b/attic/latex/figs/state2.eps similarity index 100% rename from book/latex/figs/state2.eps rename to attic/latex/figs/state2.eps diff --git a/book/latex/figs/state2.fig b/attic/latex/figs/state2.fig similarity index 100% rename from book/latex/figs/state2.fig rename to attic/latex/figs/state2.fig diff --git a/book/latex/figs/state2.pdf b/attic/latex/figs/state2.pdf similarity index 100% rename from book/latex/figs/state2.pdf rename to attic/latex/figs/state2.pdf diff --git a/book/latex/figs/state3.eps b/attic/latex/figs/state3.eps similarity index 100% rename from book/latex/figs/state3.eps rename to attic/latex/figs/state3.eps diff --git a/book/latex/figs/state3.fig b/attic/latex/figs/state3.fig similarity index 100% rename from book/latex/figs/state3.fig rename to attic/latex/figs/state3.fig diff --git a/book/latex/figs/state3.pdf b/attic/latex/figs/state3.pdf similarity index 100% rename from book/latex/figs/state3.pdf rename to attic/latex/figs/state3.pdf diff --git a/book/latex/figs/state4.eps b/attic/latex/figs/state4.eps similarity index 100% rename from book/latex/figs/state4.eps rename to attic/latex/figs/state4.eps diff --git a/book/latex/figs/state4.fig b/attic/latex/figs/state4.fig similarity index 100% rename from book/latex/figs/state4.fig rename to attic/latex/figs/state4.fig diff --git a/book/latex/figs/state4.pdf b/attic/latex/figs/state4.pdf similarity index 100% rename from book/latex/figs/state4.pdf rename to attic/latex/figs/state4.pdf diff --git a/book/latex/figs/state5.eps b/attic/latex/figs/state5.eps similarity index 100% rename from book/latex/figs/state5.eps rename to attic/latex/figs/state5.eps diff --git a/book/latex/figs/state5.fig b/attic/latex/figs/state5.fig similarity index 100% rename from book/latex/figs/state5.fig rename to attic/latex/figs/state5.fig diff --git a/book/latex/figs/state5.pdf b/attic/latex/figs/state5.pdf similarity index 100% rename from book/latex/figs/state5.pdf rename to attic/latex/figs/state5.pdf diff --git a/book/latex/figs/time.eps b/attic/latex/figs/time.eps similarity index 100% rename from book/latex/figs/time.eps rename to attic/latex/figs/time.eps diff --git a/book/latex/figs/time.fig b/attic/latex/figs/time.fig similarity index 100% rename from book/latex/figs/time.fig rename to attic/latex/figs/time.fig diff --git a/book/latex/figs/time.pdf b/attic/latex/figs/time.pdf similarity index 100% rename from book/latex/figs/time.pdf rename to attic/latex/figs/time.pdf diff --git a/book/latex/figs/towers.eps b/attic/latex/figs/towers.eps similarity index 100% rename from book/latex/figs/towers.eps rename to attic/latex/figs/towers.eps diff --git a/book/latex/figs/towers.fig b/attic/latex/figs/towers.fig similarity index 100% rename from book/latex/figs/towers.fig rename to attic/latex/figs/towers.fig diff --git a/book/latex/figs/towers.pdf b/attic/latex/figs/towers.pdf similarity index 100% rename from book/latex/figs/towers.pdf rename to attic/latex/figs/towers.pdf diff --git a/book/latex/figs/tuple1.eps b/attic/latex/figs/tuple1.eps similarity index 100% rename from book/latex/figs/tuple1.eps rename to attic/latex/figs/tuple1.eps diff --git a/book/latex/figs/tuple1.fig b/attic/latex/figs/tuple1.fig similarity index 100% rename from book/latex/figs/tuple1.fig rename to attic/latex/figs/tuple1.fig diff --git a/book/latex/figs/tuple1.pdf b/attic/latex/figs/tuple1.pdf similarity index 100% rename from book/latex/figs/tuple1.pdf rename to attic/latex/figs/tuple1.pdf diff --git a/book/latex/footer.html b/attic/latex/footer.html similarity index 100% rename from book/latex/footer.html rename to attic/latex/footer.html diff --git a/book/latex/header.html b/attic/latex/header.html similarity index 100% rename from book/latex/header.html rename to attic/latex/header.html diff --git a/book/latex/htmlonly b/attic/latex/htmlonly similarity index 100% rename from book/latex/htmlonly rename to attic/latex/htmlonly diff --git a/book/latex/latexonly b/attic/latex/latexonly similarity index 100% rename from book/latex/latexonly rename to attic/latex/latexonly diff --git a/book/latex/localdef.py b/attic/latex/localdef.py similarity index 100% rename from book/latex/localdef.py rename to attic/latex/localdef.py diff --git a/book/latex/next.png b/attic/latex/next.png similarity index 100% rename from book/latex/next.png rename to attic/latex/next.png diff --git a/book/latex/up.png b/attic/latex/up.png similarity index 100% rename from book/latex/up.png rename to attic/latex/up.png diff --git a/book/01-the-way.rst b/book/01-the-way.rst index 8e5bf6e..961a2d5 100644 --- a/book/01-the-way.rst +++ b/book/01-the-way.rst @@ -373,84 +373,13 @@ chapter there is a section, like this one, with my suggestions for debugging. I hope they help! +.. _glossary01: + Glossary -------- -problem solving: - The process of formulating a problem, finding a solution, and - expressing it. - -high-level language: - A programming language like Python that is designed to be easy for - humans to read and write. - -low-level language: - A programming language that is designed to be easy for a computer to - run; also called “machine language” or “assembly language”. - -portability: - A property of a program that can run on more than one kind of - computer. - -interpreter: - A program that reads another program and executes it - -prompt: - Characters displayed by the interpreter to indicate that it is ready - to take input from the user. - -program: - A set of instructions that specifies a computation. - -print statement: - An instruction that causes the Python interpreter to display a value - on the screen. - -operator: - A special symbol that represents a simple computation like addition, - multiplication, or string concatenation. - -value: - One of the basic units of data, like a number or string, that a - program manipulates. - -type: - A category of values. The types we have seen so far are integers - (type int), floating-point numbers (type float), and strings (type - str). - -integer: - A type that represents whole numbers. - -floating-point: - A type that represents numbers with fractional parts. - -string: - A type that represents sequences of characters. - -natural language: - Any one of the languages that people speak that evolved naturally. - -formal language: - Any one of the languages that people have designed for specific - purposes, such as representing mathematical ideas or computer - programs; all programming languages are formal languages. - -token: - One of the basic elements of the syntactic structure of a program, - analogous to a word in a natural language. - -syntax: - The rules that govern the structure of a program. - -parse: - To examine a program and analyze the syntactic structure. - -bug: - An error in a program. +.. include:: glossary/01.txt -debugging: - The process of finding and correcting bugs. Exercises --------- diff --git a/book/02-statement.rst b/book/02-statement.rst index 83b8603..ea8e93f 100644 --- a/book/02-statement.rst +++ b/book/02-statement.rst @@ -345,76 +345,14 @@ Semantic error: work backward by looking at the output of the program and trying to figure out what it is doing. -Glossary --------- - -variable: - A name that refers to a value. - -assignment: - A statement that assigns a value to a variable. - -state diagram: - A graphical representation of a set of variables and the values they - refer to. - -keyword: - A reserved word that is used to parse a program; you cannot use - keywords like if, def, and while as variable names. - -operand: - One of the values on which an operator operates. - -expression: - A combination of variables, operators, and values that represents a - single result. - -evaluate: - To simplify an expression by performing the operations in order to - yield a single value. - -statement: - A section of code that represents a command or action. So far, the - statements we have seen are assignments and print statements. -execute: - To run a statement and do what it says. +.. _glossary02: -interactive mode: - A way of using the Python interpreter by typing code at the prompt. - -script mode: - A way of using the Python interpreter to read code from a script and - run it. - -script: - A program stored in a file. - -order of operations: - Rules governing the order in which expressions involving multiple - operators and operands are evaluated. - -concatenate: - To join two operands end-to-end. - -comment: - Information in a program that is meant for other programmers (or - anyone reading the source code) and has no effect on the execution - of the program. - -syntax error: - An error in a program that makes it impossible to parse (and - therefore impossible to interpret). - -exception: - An error that is detected while the program is running. +Glossary +-------- -semantics: - The meaning of a program. +.. include:: glossary/02.txt -semantic error: - An error in a program that makes it do something other than what the - programmer intended. Exercises --------- diff --git a/book/03-function.rst b/book/03-function.rst index f2f6bd5..453baa1 100644 --- a/book/03-function.rst +++ b/book/03-function.rst @@ -584,90 +584,14 @@ used to explore the Intel 80386 chip. According to Larry Greenfield, printing AAAA and BBBB. This later evolved to Linux.” (*The Linux Users’ Guide* Beta Version 1). -Glossary --------- - -function: - A named sequence of statements that performs some useful operation. - Functions may or may not take arguments and may or may not produce a - result. - -function definition: - A statement that creates a new function, specifying its name, - parameters, and the statements it contains. - -function object: - A value created by a function definition. The name of the function - is a variable that refers to a function object. - -header: - The first line of a function definition. - -body: - The sequence of statements inside a function definition. - -parameter: - A name used inside a function to refer to the value passed as an - argument. - -function call: - A statement that runs a function. It consists of the function name - followed by an argument list in parentheses. - -argument: - A value provided to a function when the function is called. This - value is assigned to the corresponding parameter in the function. - -local variable: - A variable defined inside a function. A local variable can only be - used inside its function. -return value: - The result of a function. If a function call is used as an - expression, the return value is the value of the expression. +.. _glossary03: -fruitful function: - A function that returns a value. - -void function: - A function that always returns None. - -None: - A special value returned by void functions. - -module: - A file that contains a collection of related functions and other - definitions. - -import statement: - A statement that reads a module file and creates a module object. - -module object: - A value created by an import statement that provides access to the - values defined in a module. - -dot notation: - The syntax for calling a function in another module by specifying - the module name followed by a dot (period) and the function name. - -composition: - Using an expression as part of a larger expression, or a statement - as part of a larger statement. - -flow of execution: - The order statements run in. - -stack diagram: - A graphical representation of a stack of functions, their variables, - and the values they refer to. +Glossary +-------- -frame: - A box in a stack diagram that represents a function call. It - contains the local variables and parameters of the function. +.. include:: glossary/03.txt -traceback: - A list of the functions that are executing, printed when an - exception occurs. Exercises --------- diff --git a/book/04-case-ui.rst b/book/04-case-ui.rst index 8d6a5fd..e908d07 100644 --- a/book/04-case-ui.rst +++ b/book/04-case-ui.rst @@ -496,50 +496,14 @@ If the preconditions are satisfied and the postconditions are not, the bug is in the function. If your pre- and postconditions are clear, they can help with debugging. -Glossary --------- - -method: - A function that is associated with an object and called using dot - notation. - -loop: - A part of a program that can run repeatedly. - -encapsulation: - The process of transforming a sequence of statements into a function - definition. - -generalization: - The process of replacing something unnecessarily specific (like a - number) with something appropriately general (like a variable or - parameter). -keyword argument: - An argument that includes the name of the parameter as a “keyword”. +.. _glossary04: -interface: - A description of how to use a function, including the name and - descriptions of the arguments and return value. - -refactoring: - The process of modifying a working program to improve function - interfaces and other qualities of the code. - -development plan: - A process for writing programs. - -docstring: - A string that appears at the top of a function definition to - document the function’s interface. +Glossary +-------- -precondition: - A requirement that should be satisfied by the caller before a - function starts. +.. include:: glossary/04.txt -postcondition: - A requirement that should be satisfied by the function before it - ends. Exercises --------- diff --git a/book/05-cond-recur.rst b/book/05-cond-recur.rst index 89337ef..28ae614 100644 --- a/book/05-cond-recur.rst +++ b/book/05-cond-recur.rst @@ -533,65 +533,13 @@ floor division instead of floating-point division. You should take the time to read error messages carefully, but don’t assume that everything they say is correct. +.. _glossary05: + Glossary -------- -floor division: - An operator, denoted //, that divides two numbers and rounds down - (toward zero) to an integer. - -modulus operator: - An operator, denoted with a percent sign (%), that works on integers - and returns the remainder when one number is divided by another. - -boolean expression: - An expression whose value is either True or False. - -relational operator: - One of the operators that compares its operands: ==, !=, >, <, >=, - and <=. - -logical operator: - One of the operators that combines boolean expressions: and, or, and - not. - -conditional statement: - A statement that controls the flow of execution depending on some - condition. - -condition: - The boolean expression in a conditional statement that determines - which branch runs. - -compound statement: - A statement that consists of a header and a body. The header ends - with a colon (:). The body is indented relative to the header. - -branch: - One of the alternative sequences of statements in a conditional - statement. - -chained conditional: - A conditional statement with a series of alternative branches. - -nested conditional: - A conditional statement that appears in one of the branches of - another conditional statement. - -return statement: - A statement that causes a function to end immediately and return to - the caller. - -recursion: - The process of calling the function that is currently executing. - -base case: - A conditional branch in a recursive function that does not make a - recursive call. +.. include:: glossary/05.txt -infinite recursion: - A recursion that doesn’t have a base case, or never reaches it. - Eventually, an infinite recursion causes a runtime error. Exercises --------- diff --git a/book/06-fruitful-fn.rst b/book/06-fruitful-fn.rst index 4836314..48c51aa 100644 --- a/book/06-fruitful-fn.rst +++ b/book/06-fruitful-fn.rst @@ -625,28 +625,14 @@ If you are confused about the flow of execution, this kind of output can be helpful. It takes some time to develop effective scaffolding, but a little bit of scaffolding can save a lot of debugging. -Glossary --------- - -temporary variable: - A variable used to store an intermediate value in a complex - calculation. -dead code: - Part of a program that can never run, often because it appears after - a return statement. +.. _glossary06: -incremental development: - A program development plan intended to avoid debugging by adding and - testing only a small amount of code at a time. +Glossary +-------- -scaffolding: - Code that is used during program development but is not part of the - final version. +.. include:: glossary/06.txt -guardian: - A programming pattern that uses a conditional statement to check for - and handle circumstances that might cause an error. Exercises --------- diff --git a/book/07-iteration.rst b/book/07-iteration.rst index 005edae..11b8084 100644 --- a/book/07-iteration.rst +++ b/book/07-iteration.rst @@ -378,35 +378,14 @@ program where there might be errors and places where it is easy to put a check. Then choose a spot where you think the chances are about the same that the bug is before or after the check. -Glossary --------- - -reassignment: - Assigning a new value to a variable that already exists. - -update: - An assignment where the new value of the variable depends on the - old. -initialization: - An assignment that gives an initial value to a variable that will be - updated. +.. _glossary07: -increment: - An update that increases the value of a variable (often by one). - -decrement: - An update that decreases the value of a variable. - -iteration: - Repeated execution of a set of statements using either a recursive - function call or a loop. +Glossary +-------- -infinite loop: - A loop in which the terminating condition is never satisfied. +.. include:: glossary/07.txt -algorithm: - A general process for solving a category of problems. Exercises --------- diff --git a/book/08-string.rst b/book/08-string.rst index 552b491..6cf8ece 100644 --- a/book/08-string.rst +++ b/book/08-string.rst @@ -542,51 +542,14 @@ Starting with this diagram, run the program on paper, changing the values of i and j during each iteration. Find and fix the second error in this function. [isreverse] -Glossary --------- - -object: - Something a variable can refer to. For now, you can use “object” and - “value” interchangeably. - -sequence: - An ordered collection of values where each value is identified by an - integer index. - -item: - One of the values in a sequence. - -index: - An integer value used to select an item in a sequence, such as a - character in a string. In Python indices start from 0. -slice: - A part of a string specified by a range of indices. +.. _glossary08: -empty string: - A string with no characters and length 0, represented by two - quotation marks. - -immutable: - The property of a sequence whose items cannot be changed. - -traverse: - To iterate through the items in a sequence, performing a similar - operation on each. - -search: - A pattern of traversal that stops when it finds what it is looking - for. - -counter: - A variable used to count something, usually initialized to zero and - then incremented. +Glossary +-------- -invocation: - A statement that calls a method. +.. include:: glossary/08.txt -optional argument: - A function or method argument that is not required. Exercises --------- diff --git a/book/09-case-word.rst b/book/09-case-word.rst index 713f6b0..2fcd300 100644 --- a/book/09-case-word.rst +++ b/book/09-case-word.rst @@ -323,19 +323,14 @@ your program is correct. According to a legendary computer scientist: — Edsger W. Dijkstra + +.. _glossary09: + Glossary -------- -file object: - A value that represents an open file. - -reduction to a previously solved problem: - A way of solving a problem by expressing it as an instance of a - previously solved problem. +.. include:: glossary/09.txt -special case: - A test case that is atypical or non-obvious (and less likely to be - handled correctly). Exercises --------- diff --git a/book/10-list.rst b/book/10-list.rst index 50d3197..6702899 100644 --- a/book/10-list.rst +++ b/book/10-list.rst @@ -727,55 +727,14 @@ of debugging. Here are some common pitfalls and ways to avoid them: >>> t2 [1, 2, 3] -Glossary --------- - -list: - A sequence of values. - -element: - One of the values in a list (or other sequence), also called items. - -nested list: - A list that is an element of another list. - -accumulator: - A variable used in a loop to add up or accumulate a result. - -augmented assignment: - A statement that updates the value of a variable using an operator - like ``+=``. - -reduce: - A processing pattern that traverses a sequence and accumulates the - elements into a single result. -map: - A processing pattern that traverses a sequence and performs an - operation on each element. +.. _glossary10: -filter: - A processing pattern that traverses a list and selects the elements - that satisfy some criterion. - -object: - Something a variable can refer to. An object has a type and a value. - -equivalent: - Having the same value. - -identical: - Being the same object (which implies equivalence). - -reference: - The association between a variable and its value. +Glossary +-------- -aliasing: - A circumstance where two or more variables refer to the same object. +.. include:: glossary/10.txt -delimiter: - A character or string used to indicate where a string should be - split. Exercises --------- diff --git a/book/11-dict.rst b/book/11-dict.rst index 3836e59..3664e8f 100644 --- a/book/11-dict.rst +++ b/book/11-dict.rst @@ -596,79 +596,13 @@ Format the output: Again, time you spend building scaffolding can reduce the time you spend debugging. +.. _glossary11: + Glossary -------- -mapping: - A relationship in which each element of one set corresponds to an - element of another set. - -dictionary: - A mapping from keys to their corresponding values. - -key-value pair: - The representation of the mapping from a key to a value. - -item: - In a dictionary, another name for a key-value pair. - -key: - An object that appears in a dictionary as the first part of a - key-value pair. - -value: - An object that appears in a dictionary as the second part of a - key-value pair. This is more specific than our previous use of the - word “value”. - -implementation: - A way of performing a computation. - -hashtable: - The algorithm used to implement Python dictionaries. - -hash function: - A function used by a hashtable to compute the location for a key. - -hashable: - A type that has a hash function. Immutable types like integers, - floats and strings are hashable; mutable types like lists and - dictionaries are not. - -lookup: - A dictionary operation that takes a key and finds the corresponding - value. - -reverse lookup: - A dictionary operation that takes a value and finds one or more keys - that map to it. - -raise statement: - A statement that (deliberately) raises an exception. - -singleton: - A list (or other sequence) with a single element. - -call graph: - A diagram that shows every frame created during the execution of a - program, with an arrow from each caller to each callee. - -memo: - A computed value stored to avoid unnecessary future computation. - -global variable: - A variable defined outside a function. Global variables can be - accessed from any function. - -global statement: - A statement that declares a variable name global. - -flag: - A boolean variable used to indicate whether a condition is true. +.. include:: glossary/11.txt -declaration: - A statement like global that tells the interpreter something about a - variable. Exercises --------- diff --git a/book/12-tuple.rst b/book/12-tuple.rst index c506a57..7c6ed2b 100644 --- a/book/12-tuple.rst +++ b/book/12-tuple.rst @@ -561,38 +561,13 @@ And here’s a dictionary with 3 items that map integers to strings. If you are having trouble keeping track of your data structures, structshape can help. +.. _glossary12: + Glossary -------- -tuple: - An immutable sequence of elements. - -tuple assignment: - An assignment with a sequence on the right side and a tuple of - variables on the left. The right side is evaluated and then its - elements are assigned to the variables on the left. - -gather: - The operation of assembling a variable-length argument tuple. - -scatter: - The operation of treating a sequence as a list of arguments. - -zip object: - The result of calling a built-in function zip; an object that - iterates through a sequence of tuples. - -iterator: - An object that can iterate through a sequence, but which does not - provide list operators and methods. - -data structure: - A collection of related values, often organized in lists, - dictionaries, tuples, etc. +.. include:: glossary/12.txt -shape error: - An error caused because a value has the wrong shape; that is, the - wrong type or size. Exercises --------- diff --git a/book/13-case-struct.rst b/book/13-case-struct.rst index 8af257c..cf4717e 100644 --- a/book/13-case-struct.rst +++ b/book/13-case-struct.rst @@ -626,31 +626,13 @@ stripping it down. Then you can copy the pieces back one at a time. Finding a hard bug requires reading, running, ruminating, and sometimes retreating. If you get stuck on one of these activities, try the others. +.. _glossary13: + Glossary -------- -deterministic: - Pertaining to a program that does the same thing each time it runs, - given the same inputs. - -pseudorandom: - Pertaining to a sequence of numbers that appears to be random, but - is generated by a deterministic program. - -default value: - The value given to an optional parameter if no argument is provided. - -override: - To replace a default value with an argument. - -benchmarking: - The process of choosing between data structures by implementing - alternatives and testing them on a sample of the possible inputs. +.. include:: glossary/13.txt -rubber duck debugging: - Debugging by explaining your problem to an inanimate object such as - a rubber duck. Articulating the problem can help you solve it, even - if the rubber duck doesn’t know Python. Exercises --------- diff --git a/book/14-file.rst b/book/14-file.rst index 871634c..1d0e440 100644 --- a/book/14-file.rst +++ b/book/14-file.rst @@ -567,60 +567,13 @@ another. You can find them (and read more about this issue) at http://en.wikipedia.org/wiki/Newline. Or, of course, you could write one yourself. +.. _glossary14: + Glossary -------- -persistent: - Pertaining to a program that runs indefinitely and keeps at least - some of its data in permanent storage. - -format operator: - An operator, %, that takes a format string and a tuple and generates - a string that includes the elements of the tuple formatted as - specified by the format string. - -format string: - A string, used with the format operator, that contains format - sequences. - -format sequence: - A sequence of characters in a format string, like %d, that specifies - how a value should be formatted. - -text file: - A sequence of characters stored in permanent storage like a hard - drive. - -directory: - A named collection of files, also called a folder. - -path: - A string that identifies a file. - -relative path: - A path that starts from the current directory. - -absolute path: - A path that starts from the topmost directory in the file system. - -catch: - To prevent an exception from terminating a program using the try and - except statements. - -database: - A file whose contents are organized like a dictionary with keys that - correspond to values. - -bytes object: - An object similar to a string. - -shell: - A program that allows users to type commands and then executes them - by starting other programs. +.. include:: glossary/14.txt -pipe object: - An object that represents a running program, allowing a Python - program to run commands and read the results. Exercises --------- diff --git a/book/15-cls-object.rst b/book/15-cls-object.rst index 2494868..0fbb920 100644 --- a/book/15-cls-object.rst +++ b/book/15-cls-object.rst @@ -417,42 +417,14 @@ This approach can make it easier to write functions that work with different types; more on that topic is coming up in Section [polymorphism]. -Glossary --------- - -class: - A programmer-defined type. A class definition creates a new class - object. - -class object: - An object that contains information about a programmer-defined type. - The class object can be used to create instances of the type. - -instance: - An object that belongs to a class. -instantiate: - To create a new object. +.. _glossary15: -attribute: - One of the named values associated with an object. - -embedded object: - An object that is stored as an attribute of another object. - -shallow copy: - To copy the contents of an object, including any references to - embedded objects; implemented by the copy function in the copy - module. +Glossary +-------- -deep copy: - To copy the contents of an object as well as any embedded objects, - and any objects embedded in them, and so on; implemented by the - deepcopy function in the copy module. +.. include:: glossary/15.txt -object diagram: - A diagram that shows objects, their attributes, and the values of - the attributes. Exercises --------- diff --git a/book/16-cls-fn.rst b/book/16-cls-fn.rst index 45524f1..96d6de9 100644 --- a/book/16-cls-fn.rst +++ b/book/16-cls-fn.rst @@ -313,37 +313,13 @@ and raises an exception if it fails: assert statements are useful because they distinguish code that deals with normal conditions from code that checks for errors. +.. _glossary16: + Glossary -------- -prototype and patch: - A development plan that involves writing a rough draft of a program, - testing, and correcting errors as they are found. - -designed development: - A development plan that involves high-level insight into the problem - and more planning than incremental development or prototype - development. - -pure function: - A function that does not modify any of the objects it receives as - arguments. Most pure functions are fruitful. - -modifier: - A function that changes one or more of the objects it receives as - arguments. Most modifiers are void; that is, they return None. - -functional programming style: - A style of program design in which the majority of functions are - pure. - -invariant: - A condition that should always be true during the execution of a - program. +.. include:: glossary/16.txt -assert statement: - A statement that check a condition and raises an exception if it - fails. Exercises --------- diff --git a/book/17-cls-meth.rst b/book/17-cls-meth.rst index e639bde..860e0bb 100644 --- a/book/17-cls-meth.rst +++ b/book/17-cls-meth.rst @@ -576,43 +576,13 @@ But if you designed the interface carefully, you can change the implementation without changing the interface, which means that other parts of the program don’t have to change. +.. _glossary17: + Glossary -------- -object-oriented language: - A language that provides features, such as programmer-defined types - and methods, that facilitate object-oriented programming. - -object-oriented programming: - A style of programming in which data and the operations that - manipulate it are organized into classes and methods. - -method: - A function that is defined inside a class definition and is invoked - on instances of that class. - -subject: - The object a method is invoked on. - -positional argument: - An argument that does not include a parameter name, so it is not a - keyword argument. - -operator overloading: - Changing the behavior of an operator like + so it works with a - programmer-defined type. - -type-based dispatch: - A programming pattern that checks the type of an operand and invokes - different functions for different types. - -polymorphic: - Pertaining to a function that can work with more than one type. +.. include:: glossary/17.txt -information hiding: - The principle that the interface provided by an object should not - depend on its implementation, in particular the representation of - its attributes. Exercises --------- diff --git a/book/18-inherit.rst b/book/18-inherit.rst index 4b277b5..6725512 100644 --- a/book/18-inherit.rst +++ b/book/18-inherit.rst @@ -611,58 +611,13 @@ above to encapsulate the global variables as attributes of a new class called Markov. Solution: http://thinkpython2.com/code/Markov.py (note the capital M). +.. _glossary18: + Glossary -------- -encode: - To represent one set of values using another set of values by - constructing a mapping between them. - -class attribute: - An attribute associated with a class object. Class attributes are - defined inside a class definition but outside any method. - -instance attribute: - An attribute associated with an instance of a class. - -veneer: - A method or function that provides a different interface to another - function without doing much computation. - -inheritance: - The ability to define a new class that is a modified version of a - previously defined class. - -parent class: - The class from which a child class inherits. - -child class: - A new class created by inheriting from an existing class; also - called a “subclass”. - -IS-A relationship: - A relationship between a child class and its parent class. - -HAS-A relationship: - A relationship between two classes where instances of one class - contain references to instances of the other. - -dependency: - A relationship between two classes where instances of one class use - instances of the other class, but do not store them as attributes. - -class diagram: - A diagram that shows the classes in a program and the relationships - between them. - -multiplicity: - A notation in a class diagram that shows, for a HAS-A relationship, - how many references there are to instances of another class. +.. include:: glossary/18.txt -data encapsulation: - A program development plan that involves a prototype using global - variables and a final version that makes the global variables into - instance attributes. Exercises --------- diff --git a/book/19-goodies.rst b/book/19-goodies.rst index b044902..9865283 100644 --- a/book/19-goodies.rst +++ b/book/19-goodies.rst @@ -622,26 +622,13 @@ When you are working with functions that have a large number of parameters, it is often useful to create and pass around dictionaries that specify frequently used options. +.. _glossary19: + Glossary -------- -conditional expression: - An expression that has one of two values, depending on a condition. - -list comprehension: - An expression with a for loop in square brackets that yields a new - list. - -generator expression: - An expression with a for loop in parentheses that yields a generator - object. - -multiset: - A mathematical entity that represents a mapping between the elements - of a set and the number of times they appear. +.. include:: glossary/19.txt -factory: - A function, usually passed as a parameter, used to create objects. Exercises --------- diff --git a/book/B-analysis-alg.rst b/book/B-analysis-alg.rst index 5cc4ebc..3f7fd8c 100644 --- a/book/B-analysis-alg.rst +++ b/book/B-analysis-alg.rst @@ -538,52 +538,13 @@ You can download my implementation of HashMap from http://thinkpython2.com/code/Map.py, but remember that there is no reason to use it; if you want a map, just use a Python dictionary. +.. _glossaryB: + Glossary -------- -analysis of algorithms: - A way to compare algorithms in terms of their run time and/or space - requirements. - -machine model: - A simplified representation of a computer used to describe - algorithms. - -worst case: - The input that makes a given algorithm run slowest (or require the - most space. - -leading term: - In a polynomial, the term with the highest exponent. - -crossover point: - The problem size where two algorithms require the same run time or - space. - -order of growth: - A set of functions that all grow in a way considered equivalent for - purposes of analysis of algorithms. For example, all functions that - grow linearly belong to the same order of growth. - -Big-Oh notation: - Notation for representing an order of growth; for example, - :math:`O(n)` represents the set of functions that grow linearly. - -linear: - An algorithm whose run time is proportional to problem size, at - least for large problem sizes. - -quadratic: - An algorithm whose run time is proportional to :math:`n^2`, where - :math:`n` is a measure of problem size. - -search: - The problem of locating an element of a collection (like a list or - dictionary) or determining that it is not present. +.. include:: glossary/B.txt -hashtable: - A data structure that represents a collection of key-value pairs and - performs search in constant time. .. [1] popen is deprecated now, which means we are supposed to stop using it diff --git a/book/C-glossary.rst b/book/C-glossary.rst new file mode 100644 index 0000000..0557a22 --- /dev/null +++ b/book/C-glossary.rst @@ -0,0 +1,707 @@ +Glossário Consolidado +===================== + +Este glossário é a união de todos os glossários dos capítulos. +Cada entrada está vinculada ao capítulo onde ela aparece, por exemplo: +*bug* :ref:`[1] `. + +Note que alguns termos aparecem em mais de um capítulo, às vezes +com definições diferentes, de acordo com o contexto. + + +acumulador (*accumulator*) :ref:`[10] ` + A variable used in a loop to add up or accumulate a result. + +algoritmo (*algorithm*) :ref:`[7] ` + A general process for solving a category of problems. + +*aliasing* (“apelidamento”) :ref:`[10] ` + A circumstance where two or more variables refer to the same object. + +analisar (*parse*) :ref:`[1] ` + To examine a program and analyze the syntactic structure. + +análise de algoritmos (*analysis of algorithms*) :ref:`[B] ` + A way to compare algorithms in terms of their run time and/or space requirements. + +argumento nomeado (*keyword argument*) :ref:`[4] ` + An argument that includes the name of the parameter as a “keyword”. + +argumento opcional (*optional argument*) :ref:`[8] ` + A function or method argument that is not required. + +argumento posicional (*positional argument*) :ref:`[17] ` + An argument that does not include a parameter name, so it is not a keyword argument. + +argumento (*argument*) :ref:`[3] ` + A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function. + +arquivo-texto (*text file*) :ref:`[14] ` + A sequence of characters stored in permanent storage like a hard drive. + +``assert``, instrução (``assert`` *statement*) :ref:`[16] ` + A statement that check a condition and raises an exception if it fails. + +assinatura (*interface*) :ref:`[4] ` + A description of how to use a function, including the name and descriptions of the arguments and return value. + +atribuição combinada (*augmented assignment*) :ref:`[10] ` + A statement that updates the value of a variable using an operator like ``+=``. + +atribuição (*assignment*) :ref:`[2] ` + A statement that assigns a value to a variable. + +atributo de classe (*class attribute*) :ref:`[18] ` + An attribute associated with a class object. Class attributes are defined inside a class definition but outside any method. + +atributo de instância (*instance attribute*) :ref:`[18] ` + An attribute associated with an instance of a class. + +atributo (*attribute*) :ref:`[15] ` + One of the named values associated with an object. + +atualização (*update*) :ref:`[7] ` + An assignment where the new value of the variable depends on the old. + +avaliar (*evaluate*) :ref:`[2] ` + To simplify an expression by performing the operations in order to yield a single value. + +banco de dados (*database*) :ref:`[14] ` + A file whose contents are organized like a dictionary with keys that correspond to values. + +*bug* :ref:`[1] ` + An error in a program. + +busca invertida (*reverse lookup*) :ref:`[11] ` + A dictionary operation that takes a value and finds one or more keys that map to it. + +busca (*search*) :ref:`[8] ` + A pattern of traversal that stops when it finds what it is looking for. + +busca (*lookup*) :ref:`[11] ` + A dictionary operation that takes a key and finds the corresponding value. + +busca (*search*) :ref:`[B] ` + The problem of locating an element of a collection (like a list or dictionary) or determining that it is not present. + +cabeçalho (*header*) :ref:`[3] ` + The first line of a function definition. + +caminho absoluto (*absolute path*) :ref:`[14] ` + A path that starts from the topmost directory in the file system. + +caminho relativo (*relative path*) :ref:`[14] ` + A path that starts from the current directory. + +caminho (*path*) :ref:`[14] ` + A string that identifies a file. + +capturar (*catch*) :ref:`[14] ` + To prevent an exception from terminating a program using the try and except statements. + +cardinalidade (*multiplicity*) :ref:`[18] ` + A notation in a class diagram that shows, for a HAS-A relationship, how many references there are to instances of another class. + +caso base (*base case*) :ref:`[5] ` + A conditional branch in a recursive function that does not make a recursive call. + +caso especial (*special case*) :ref:`[9] ` + A test case that is atypical or non-obvious (and less likely to be handled correctly). + +chamada de função (*function call*) :ref:`[3] ` + A statement that runs a function. It consists of the function name followed by an argument list in parentheses. + +chave (*key*) :ref:`[11] ` + An object that appears in a dictionary as the first part of a key-value pair. + +classe base (*parent class*) :ref:`[18] ` + The class from which a child class inherits. + +classe derivada (*child class*) :ref:`[18] ` + A new class created by inheriting from an existing class; also called a “subclass”. + +classe (*class*) :ref:`[15] ` + A programmer-defined type. A class definition creates a new class object. + +codificar (*encode*) :ref:`[18] ` + To represent one set of values using another set of values by constructing a mapping between them. + +código morto (*dead code*) :ref:`[6] ` + Part of a program that can never run, often because it appears after a return statement. + +código provisório (*scaffolding*) :ref:`[6] ` + Code that is used during program development but is not part of the final version. + +código provisório (*slice*) :ref:`[8] ` + A part of a string specified by a range of indices. + +comentário (*comment*) :ref:`[2] ` + Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program. + +composição (*composition*) :ref:`[3] ` + Using an expression as part of a larger expression, or a statement as part of a larger statement. + +concatenar (*concatenate*) :ref:`[2] ` + To join two operands end-to-end. + +condição (*condition*) :ref:`[5] ` + The boolean expression in a conditional statement that determines which branch runs. + +condicional aninhado (*nested conditional*) :ref:`[5] ` + A conditional statement that appears in one of the branches of another conditional statement. + +condicional encadeado (*chained conditional*) :ref:`[5] ` + A conditional statement with a series of alternative branches. + +contador (*counter*) :ref:`[8] ` + A variable used to count something, usually initialized to zero and then incremented. + +cópia profunda (*deep copy*) :ref:`[15] ` + To copy the contents of an object as well as any embedded objects, and any objects embedded in them, and so on; implemented by the deepcopy function in the copy module. + +cópia rasa (*shallow copy*) :ref:`[15] ` + To copy the contents of an object, including any references to embedded objects; implemented by the copy function in the copy module. + +corpo (*body*) :ref:`[3] ` + The sequence of statements inside a function definition. + +declaração (*declaration*) :ref:`[11] ` + A statement like global that tells the interpreter something about a variable. + +decrementar (*decrement*) :ref:`[7] ` + An update that decreases the value of a variable. + +definição de função (*function definition*) :ref:`[3] ` + A statement that creates a new function, specifying its name, parameters, and the statements it contains. + +delimitador (*delimiter*) :ref:`[10] ` + A character or string used to indicate where a string should be split. + +dependência (*dependency*) :ref:`[18] ` + A relationship between two classes where instances of one class use instances of the other class, but do not store them as attributes. + +depuração com patinho de borracha (*rubber duck debugging*) :ref:`[13] ` + Debugging by explaining your problem to an inanimate object such as a rubber duck. Articulating the problem can help you solve it, even if the rubber duck doesn’t know Python. + +depuração (*debugging*) :ref:`[1] ` + The process of finding and correcting bugs. + +desempacotamento de tupla (*tuple assignment*) :ref:`[12] ` + An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left. + +desenvolvimento incremental (*incremental development*) :ref:`[6] ` + A program development plan intended to avoid debugging by adding and testing only a small amount of code at a time. + +desenvolvimento planejado (*designed development*) :ref:`[16] ` + A development plan that involves high-level insight into the problem and more planning than incremental development or prototype development. + +despacho por tipo (*type-based dispatch*) :ref:`[17] ` + A programming pattern that checks the type of an operand and invokes different functions for different types. + +desvio (*branch*) :ref:`[5] ` + One of the alternative sequences of statements in a conditional statement. + +determinístico (*deterministic*) :ref:`[13] ` + Pertaining to a program that does the same thing each time it runs, given the same inputs. + +diagrama de chamadas (*call graph*) :ref:`[11] ` + A diagram that shows every frame created during the execution of a program, with an arrow from each caller to each callee. + +diagrama de classe (*class diagram*) :ref:`[18] ` + A diagram that shows the classes in a program and the relationships between them. + +diagrama de estado (*state diagram*) :ref:`[2] ` + A graphical representation of a set of variables and the values they refer to. + +diagrama de objetos (*object diagram*) :ref:`[15] ` + A diagram that shows objects, their attributes, and the values of the attributes. + +diagrama de pilha (*stack diagram*) :ref:`[3] ` + A graphical representation of a stack of functions, their variables, and the values they refer to. + +dicionário (*dictionary*) :ref:`[11] ` + A mapping from keys to their corresponding values. + +diretório (*directory*) :ref:`[14] ` + A named collection of files, also called a folder. + +divisão pelo piso (*floor division*) :ref:`[5] ` + An operator, denoted //, that divides two numbers and rounds down (toward zero) to an integer. + +*docstring* :ref:`[4] ` + A string that appears at the top of a function definition to document the function’s interface. + +elemento (*element*) :ref:`[10] ` + One of the values in a list (or other sequence), also called items. + +encapsulamento de dados (*data encapsulation*) :ref:`[18] ` + A program development plan that involves a prototype using global variables and a final version that makes the global variables into instance attributes. + +encapsulamento (*encapsulation*) :ref:`[4] ` + The process of transforming a sequence of statements into a function definition. + +equivalente (*equivalent*) :ref:`[10] ` + Having the same value. + +erro semântico (*semantic error*) :ref:`[2] ` + An error in a program that makes it do something other than what the programmer intended. + +erro sintático (*syntax error*) :ref:`[2] ` + An error in a program that makes it impossible to parse (and therefore impossible to interpret). + +errro estrutural (*shape error*) :ref:`[12] ` + An error caused because a value has the wrong shape; that is, the wrong type or size. + +estrutura de dados (*data structure*) :ref:`[12] ` + A collection of related values, often organized in lists, dictionaries, tuples, etc. + +exceção (*exception*) :ref:`[2] ` + An error that is detected while the program is running. + +executar (*execute*) :ref:`[2] ` + To run a statement and do what it says. + +explodir (*scatter*) :ref:`[12] ` + The operation of treating a sequence as a list of arguments. + +expressão booleana (*boolean expression*) :ref:`[5] ` + An expression whose value is either True or False. + +expressão condicional (*conditional expression*) :ref:`[19] ` + An expression that has one of two values, depending on a condition. + +expressão geradora (*generator expression*) :ref:`[19] ` + An expression with a for loop in parentheses that yields a generator object. + +expressão (*expression*) :ref:`[2] ` + A combination of variables, operators, and values that represents a single result. + +fachada (*veneer*) :ref:`[18] ` + A method or function that provides a different interface to another function without doing much computation. + +*factory* (fábrica) :ref:`[19] ` + A function, usually passed as a parameter, used to create objects. + +filtro (*filter*) :ref:`[10] ` + A processing pattern that traverses a list and selects the elements that satisfy some criterion. + +*flag* (“indicador”) :ref:`[11] ` + A boolean variable used to indicate whether a condition is true. + +fluxo de execução (*flow of execution*) :ref:`[3] ` + The order statements run in. + +*frame* () :ref:`[3] ` + A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function. + +função de hash (*hash function*) :ref:`[11] ` + A function used by a hashtable to compute the location for a key. + +função produtiva (*fruitful function*) :ref:`[3] ` + A function that returns a value. + +função pura (*pure function*) :ref:`[16] ` + A function that does not modify any of the objects it receives as arguments. Most pure functions are fruitful. + +função (*function*) :ref:`[3] ` + A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result. + +generalização (*generalization*) :ref:`[4] ` + The process of replacing something unnecessarily specific (like a number) with something appropriately general (like a variable or parameter). + +``global``, declaração (``global`` *statement*) :ref:`[11] ` + A statement that declares a variable name global. + +guarda (*guardian*) :ref:`[6] ` + A programming pattern that uses a conditional statement to check for and handle circumstances that might cause an error. + +*hashable* () :ref:`[11] ` + A type that has a hash function. Immutable types like integers, floats and strings are hashable; mutable types like lists and dictionaries are not. + +herança (*inheritance*) :ref:`[18] ` + The ability to define a new class that is a modified version of a previously defined class. + +idêntico (*identical*) :ref:`[10] ` + Being the same object (which implies equivalence). + +implementação (*implementation*) :ref:`[11] ` + A way of performing a computation. + +``import``, instrução (``import`` *statement*) :ref:`[3] ` + A statement that reads a module file and creates a module object. + +imutável (*immutable*) :ref:`[8] ` + The property of a sequence whose items cannot be changed. + +incrementar (*increment*) :ref:`[7] ` + An update that increases the value of a variable (often by one). + +índice (*index*) :ref:`[8] ` + An integer value used to select an item in a sequence, such as a character in a string. In Python indices start from 0. + +inicialização (*initialization*) :ref:`[7] ` + An assignment that gives an initial value to a variable that will be updated. + +instanciar (*instantiate*) :ref:`[15] ` + To create a new object. + +instância (*instance*) :ref:`[15] ` + An object that belongs to a class. + +instrução composta (*compound statement*) :ref:`[5] ` + A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header. + +instrução condicional (*conditional statement*) :ref:`[5] ` + A statement that controls the flow of execution depending on some condition. + +instrução (*statement*) :ref:`[2] ` + A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements. + +inteiro (*integer*) :ref:`[1] ` + A type that represents whole numbers. + +interpretador (*interpreter*) :ref:`[1] ` + A program that reads another program and executes it + +invariante (*invariant*) :ref:`[16] ` + A condition that should always be true during the execution of a program. + +invocação (*invocation*) :ref:`[8] ` + A statement that calls a method. + +*item* (item) :ref:`[8] ` + One of the values in a sequence. + +*item* (item) :ref:`[11] ` + In a dictionary, another name for a key-value pair. + +iteração (*iteration*) :ref:`[7] ` + Repeated execution of a set of statements using either a recursive function call or a loop. + +iterador (*iterator*) :ref:`[12] ` + An object that can iterate through a sequence, but which does not provide list operators and methods. + +laço infinito (*infinite loop*) :ref:`[7] ` + A loop in which the terminating condition is never satisfied. + +laço (*loop*) :ref:`[4] ` + A part of a program that can run repeatedly. + +*linear* (linear) :ref:`[B] ` + An algorithm whose run time is proportional to problem size, at least for large problem sizes. + +linguagem de alto nível (*high-level language*) :ref:`[1] ` + A programming language like Python that is designed to be easy for humans to read and write. + +linguagem de baixo nível (*low-level language*) :ref:`[1] ` + A programming language that is designed to be easy for a computer to run; also called “machine language” or “assembly language”. + +linguagem formal (*formal language*) :ref:`[1] ` + Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages. + +linguagem natural (*natural language*) :ref:`[1] ` + Any one of the languages that people speak that evolved naturally. + +linguagem orientada a objetos (*object-oriented language*) :ref:`[17] ` + A language that provides features, such as programmer-defined types and methods, that facilitate object-oriented programming. + +lista aninhada (*nested list*) :ref:`[10] ` + A list that is an element of another list. + +lista (*list*) :ref:`[10] ` + A sequence of values. + +listcomp (*list comprehension*) :ref:`[19] ` + An expression with a for loop in square brackets that yields a new list. + +mapeamento (*mapping*) :ref:`[11] ` + A relationship in which each element of one set corresponds to an element of another set. + +*map* (“mapear”, “de-para”) :ref:`[10] ` + A processing pattern that traverses a sequence and performs an operation on each element. + +máquina-modelo (*machine model*) :ref:`[B] ` + A simplified representation of a computer used to describe algorithms. + +*memo* (“lembrete”) :ref:`[11] ` + A computed value stored to avoid unnecessary future computation. + +método (*method*) :ref:`[4] ` + A function that is associated with an object and called using dot notation. + +método (*method*) :ref:`[17] ` + A function that is defined inside a class definition and is invoked on instances of that class. + +modificadora (*modifier*) :ref:`[16] ` + A function that changes one or more of the objects it receives as arguments. Most modifiers are void; that is, they return None. + +modo de script (*script mode*) :ref:`[2] ` + A way of using the Python interpreter to read code from a script and run it. + +modo interativo (*interactive mode*) :ref:`[2] ` + A way of using the Python interpreter by typing code at the prompt. + +módulo (*module*) :ref:`[3] ` + A file that contains a collection of related functions and other definitions. + +*multiset* (“multi-conjunto”) :ref:`[19] ` + A mathematical entity that represents a mapping between the elements of a set and the number of times they appear. + +``None`` :ref:`[3] ` + A special value returned by void functions. + +notação assintótica (*Big-Oh notation*) :ref:`[B] ` + Notation for representing an order of growth; for example, :math:`O(n)` represents the set of functions that grow linearly. + +notação de ponto (*dot notation*) :ref:`[3] ` + The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name. + +objeto-arquivo (*file object*) :ref:`[9] ` + A value that represents an open file. + +objeto ``bytes`` (``bytes`` *object*) :ref:`[14] ` + An object similar to a string. + +objeto-classe (*class object*) :ref:`[15] ` + An object that contains information about a programmer-defined type. The class object can be used to create instances of the type. + +objeto embutido (*embedded object*) :ref:`[15] ` + An object that is stored as an attribute of another object. + +objeto-função (*function object*) :ref:`[3] ` + A value created by a function definition. The name of the function is a variable that refers to a function object. + +objeto-módulo (*module object*) :ref:`[3] ` + A value created by an import statement that provides access to the values defined in a module. + +objeto “pipe” (*pipe object*) :ref:`[14] ` + An object that represents a running program, allowing a Python program to run commands and read the results. + +objeto ``zip`` (``zip`` *object*) :ref:`[12] ` + The result of calling a built-in function zip; an object that iterates through a sequence of tuples. + +objeto (*object*) :ref:`[8] ` + Something a variable can refer to. For now, you can use “object” and “value” interchangeably. + +objeto (*object*) :ref:`[10] ` + Something a variable can refer to. An object has a type and a value. + +ocultação de informações (*information hiding*) :ref:`[17] ` + The principle that the interface provided by an object should not depend on its implementation, in particular the representation of its attributes. + +operador de formatação (*format operator*) :ref:`[14] ` + An operator, %, that takes a format string and a tuple and generates a string that includes the elements of the tuple formatted as specified by the format string. + +operador de módulo (*modulus operator*) :ref:`[5] ` + An operator, denoted with a percent sign (%), that works on integers and returns the remainder when one number is divided by another. + +operador lógico (*logical operator*) :ref:`[5] ` + One of the operators that combines boolean expressions: and, or, and not. + +operador relacional (*relational operator*) :ref:`[5] ` + One of the operators that compares its operands: ==, !=, >, <, >=, and <=. + +operador (*operator*) :ref:`[1] ` + A special symbol that represents a simple computation like addition, multiplication, or string concatenation. + +operando (*operand*) :ref:`[2] ` + One of the values on which an operator operates. + +ordem das operações (*order of operations*) :ref:`[2] ` + Rules governing the order in which expressions involving multiple operators and operands are evaluated. + +ordem de crescimento (*order of growth*) :ref:`[B] ` + A set of functions that all grow in a way considered equivalent for purposes of analysis of algorithms. For example, all functions that grow linearly belong to the same order of growth. + +palavra-chave (*keyword*) :ref:`[2] ` + A reserved word that is used to parse a program; you cannot use keywords like if, def, and while as variable names. + +parâmetro (*parameter*) :ref:`[3] ` + A name used inside a function to refer to the value passed as an argument. + +par chave-valor (*key-value pair*) :ref:`[11] ` + The representation of the mapping from a key to a value. + +percorrer (*traverse*) :ref:`[8] ` + To iterate through the items in a sequence, performing a similar operation on each. + +persistente (*persistent*) :ref:`[14] ` + Pertaining to a program that runs indefinitely and keeps at least some of its data in permanent storage. + +pior caso (*worst case*) :ref:`[B] ` + The input that makes a given algorithm run slowest (or require the most space. + +plano de desenvolvimento (*development plan*) :ref:`[4] ` + A process for writing programs. + +polimórfico (*polymorphic*) :ref:`[17] ` + Pertaining to a function that can work with more than one type. + +ponto de cruzamento (*crossover point*) :ref:`[B] ` + The problem size where two algorithms require the same run time or space. + +ponto-flutuante (*floating-point*) :ref:`[1] ` + A type that represents numbers with fractional parts. + +portabilidade (*portability*) :ref:`[1] ` + A property of a program that can run on more than one kind of computer. + +pós-condição (*postcondition*) :ref:`[4] ` + A requirement that should be satisfied by the function before it ends. + +pré-condição (*precondition*) :ref:`[4] ` + A requirement that should be satisfied by the caller before a function starts. + +``print``, instrução (``print`` *statement*) :ref:`[1] ` + An instruction that causes the Python interpreter to display a value on the screen. + +procedimento (*void function*) :ref:`[3] ` + A function that always returns None. + +programação funcional (*program*) :ref:`[1] ` + A set of instructions that specifies a computation. + +programação funcional (*functional programming style*) :ref:`[16] ` + A style of program design in which the majority of functions are pure. + +programação orientada a objetos (*object-oriented programming*) :ref:`[17] ` + A style of programming in which data and the operations that manipulate it are organized into classes and methods. + +*prompt* (“sinal de pronto”) :ref:`[1] ` + Characters displayed by the interpreter to indicate that it is ready to take input from the user. + +prototipar e ajustar (*prototype and patch*) :ref:`[16] ` + A development plan that involves writing a rough draft of a program, testing, and correcting errors as they are found. + +pseudo-aleatório (*pseudorandom*) :ref:`[13] ` + Pertaining to a sequence of numbers that appears to be random, but is generated by a deterministic program. + +quadrático (*quadratic*) :ref:`[B] ` + An algorithm whose run time is proportional to :math:`n^2`, where :math:`n` is a measure of problem size. + +``raise``, instrução (``raise`` *statement*) :ref:`[11] ` + A statement that (deliberately) raises an exception. + +reatribuição (*reassignment*) :ref:`[7] ` + Assigning a new value to a variable that already exists. + +recursão infinita (*infinite recursion*) :ref:`[5] ` + A recursion that doesn’t have a base case, or never reaches it. Eventually, an infinite recursion causes a runtime error. + +recursão (*recursion*) :ref:`[5] ` + The process of calling the function that is currently executing. + +redução a um problema resolvido (*reduction to a previously solved problem*) :ref:`[9] ` + A way of solving a problem by expressing it as an instance of a previously solved problem. + +reduzir (*reduce*) :ref:`[10] ` + A processing pattern that traverses a sequence and accumulates the elements into a single result. + +refatoração (*refactoring*) :ref:`[4] ` + The process of modifying a working program to improve function interfaces and other qualities of the code. + +referência (*reference*) :ref:`[10] ` + The association between a variable and its value. + +relação É-UM (*IS-A relationship*) :ref:`[18] ` + A relationship between a child class and its parent class. + +relação TEM-UM (*HAS-A relationship*) :ref:`[18] ` + A relationship between two classes where instances of one class contain references to instances of the other. + +``return``, instrução (``return`` *statement*) :ref:`[5] ` + A statement that causes a function to end immediately and return to the caller. + +reunir (*gather*) :ref:`[12] ` + The operation of assembling a variable-length argument tuple. + +*script* :ref:`[2] ` + A program stored in a file. + +semântica (*semantics*) :ref:`[2] ` + The meaning of a program. + +sequência de formatação (*sequence*) :ref:`[8] ` + An ordered collection of values where each value is identified by an integer index. + +sequência de formatação (*format sequence*) :ref:`[14] ` + A sequence of characters in a format string, like %d, that specifies how a value should be formatted. + +*shell* :ref:`[14] ` + A program that allows users to type commands and then executes them by starting other programs. + +*singleton* :ref:`[11] ` + A list (or other sequence) with a single element. + +sintaxe (*syntax*) :ref:`[1] ` + The rules that govern the structure of a program. + +sobrecarga de operadores (*operator overloading*) :ref:`[17] ` + Changing the behavior of an operator like + so it works with a programmer-defined type. + +sobrepor (*override*) :ref:`[13] ` + To replace a default value with an argument. + +solução de problemas (*problem solving*) :ref:`[1] ` + The process of formulating a problem, finding a solution, and expressing it. + +string de formatação (*format string*) :ref:`[14] ` + A string, used with the format operator, that contains format sequences. + +string vazia (*empty string*) :ref:`[8] ` + A string with no characters and length 0, represented by two quotation marks. + +*string* (“cadeia de caracteres”) :ref:`[1] ` + A type that represents sequences of characters. + +sujeito (*subject*) :ref:`[17] ` + The object a method is invoked on. + +tabela de hash (*hashtable*) :ref:`[11] ` + The algorithm used to implement Python dictionaries. + +tabela de hash (*hashtable*) :ref:`[B] ` + A data structure that represents a collection of key-value pairs and performs search in constant time. + +termo dominante (*leading term*) :ref:`[B] ` + In a polynomial, the term with the highest exponent. + +teste de desempenho (*benchmarking*) :ref:`[13] ` + The process of choosing between data structures by implementing alternatives and testing them on a sample of the possible inputs. + +tipo (*type*) :ref:`[1] ` + A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str). + +*token* (“símbolo”) :ref:`[1] ` + One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language. + +*traceback* () :ref:`[3] ` + A list of the functions that are executing, printed when an exception occurs. + +tupla (*tuple*) :ref:`[12] ` + An immutable sequence of elements. + +valor default (*default value*) :ref:`[13] ` + The value given to an optional parameter if no argument is provided. + +valor devolvido (*return value*) :ref:`[3] ` + The result of a function. If a function call is used as an expression, the return value is the value of the expression. + +valor (*value*) :ref:`[1] ` + One of the basic units of data, like a number or string, that a program manipulates. + +valor (*value*) :ref:`[11] ` + An object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word “value”. + +variável global (*global variable*) :ref:`[11] ` + A variable defined outside a function. Global variables can be accessed from any function. + +variável local (*local variable*) :ref:`[3] ` + A variable defined inside a function. A local variable can only be used inside its function. + +variável temporária (*temporary variable*) :ref:`[6] ` + A variable used to store an intermediate value in a complex calculation. + +variável (*variable*) :ref:`[2] ` + A name that refers to a value. + diff --git a/book/glossary/01.txt b/book/glossary/01.txt new file mode 100644 index 0000000..13aecf8 --- /dev/null +++ b/book/glossary/01.txt @@ -0,0 +1,63 @@ +solução de problemas (*problem solving*) + The process of formulating a problem, finding a solution, and expressing it. + +linguagem de alto nível (*high-level language*) + A programming language like Python that is designed to be easy for humans to read and write. + +linguagem de baixo nível (*low-level language*) + A programming language that is designed to be easy for a computer to run; also called “machine language” or “assembly language”. + +portabilidade (*portability*) + A property of a program that can run on more than one kind of computer. + +interpretador (*interpreter*) + A program that reads another program and executes it + +*prompt* (“sinal de pronto”) + Characters displayed by the interpreter to indicate that it is ready to take input from the user. + +programação funcional (*program*) + A set of instructions that specifies a computation. + +``print``, instrução (``print`` *statement*) + An instruction that causes the Python interpreter to display a value on the screen. + +operador (*operator*) + A special symbol that represents a simple computation like addition, multiplication, or string concatenation. + +valor (*value*) + One of the basic units of data, like a number or string, that a program manipulates. + +tipo (*type*) + A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str). + +inteiro (*integer*) + A type that represents whole numbers. + +ponto-flutuante (*floating-point*) + A type that represents numbers with fractional parts. + +*string* (“cadeia de caracteres”) + A type that represents sequences of characters. + +linguagem natural (*natural language*) + Any one of the languages that people speak that evolved naturally. + +linguagem formal (*formal language*) + Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages. + +*token* (“símbolo”) + One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language. + +sintaxe (*syntax*) + The rules that govern the structure of a program. + +analisar (*parse*) + To examine a program and analyze the syntactic structure. + +*bug* + An error in a program. + +depuração (*debugging*) + The process of finding and correcting bugs. + diff --git a/book/glossary/02.txt b/book/glossary/02.txt new file mode 100644 index 0000000..e2d387f --- /dev/null +++ b/book/glossary/02.txt @@ -0,0 +1,57 @@ +variável (*variable*) + A name that refers to a value. + +atribuição (*assignment*) + A statement that assigns a value to a variable. + +diagrama de estado (*state diagram*) + A graphical representation of a set of variables and the values they refer to. + +palavra-chave (*keyword*) + A reserved word that is used to parse a program; you cannot use keywords like if, def, and while as variable names. + +operando (*operand*) + One of the values on which an operator operates. + +expressão (*expression*) + A combination of variables, operators, and values that represents a single result. + +avaliar (*evaluate*) + To simplify an expression by performing the operations in order to yield a single value. + +instrução (*statement*) + A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements. + +executar (*execute*) + To run a statement and do what it says. + +modo interativo (*interactive mode*) + A way of using the Python interpreter by typing code at the prompt. + +modo de script (*script mode*) + A way of using the Python interpreter to read code from a script and run it. + +*script* + A program stored in a file. + +ordem das operações (*order of operations*) + Rules governing the order in which expressions involving multiple operators and operands are evaluated. + +concatenar (*concatenate*) + To join two operands end-to-end. + +comentário (*comment*) + Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program. + +erro sintático (*syntax error*) + An error in a program that makes it impossible to parse (and therefore impossible to interpret). + +exceção (*exception*) + An error that is detected while the program is running. + +semântica (*semantics*) + The meaning of a program. + +erro semântico (*semantic error*) + An error in a program that makes it do something other than what the programmer intended. + diff --git a/book/glossary/03.txt b/book/glossary/03.txt new file mode 100644 index 0000000..2d3fb0e --- /dev/null +++ b/book/glossary/03.txt @@ -0,0 +1,66 @@ +função (*function*) + A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result. + +definição de função (*function definition*) + A statement that creates a new function, specifying its name, parameters, and the statements it contains. + +objeto-função (*function object*) + A value created by a function definition. The name of the function is a variable that refers to a function object. + +cabeçalho (*header*) + The first line of a function definition. + +corpo (*body*) + The sequence of statements inside a function definition. + +parâmetro (*parameter*) + A name used inside a function to refer to the value passed as an argument. + +chamada de função (*function call*) + A statement that runs a function. It consists of the function name followed by an argument list in parentheses. + +argumento (*argument*) + A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function. + +variável local (*local variable*) + A variable defined inside a function. A local variable can only be used inside its function. + +valor devolvido (*return value*) + The result of a function. If a function call is used as an expression, the return value is the value of the expression. + +função produtiva (*fruitful function*) + A function that returns a value. + +procedimento (*void function*) + A function that always returns None. + +``None`` + A special value returned by void functions. + +módulo (*module*) + A file that contains a collection of related functions and other definitions. + +``import``, instrução (``import`` *statement*) + A statement that reads a module file and creates a module object. + +objeto-módulo (*module object*) + A value created by an import statement that provides access to the values defined in a module. + +notação de ponto (*dot notation*) + The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name. + +composição (*composition*) + Using an expression as part of a larger expression, or a statement as part of a larger statement. + +fluxo de execução (*flow of execution*) + The order statements run in. + +diagrama de pilha (*stack diagram*) + A graphical representation of a stack of functions, their variables, and the values they refer to. + +*frame* () + A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function. + +*traceback* () + A list of the functions that are executing, printed when an exception occurs. + diff --git a/book/glossary/04.txt b/book/glossary/04.txt new file mode 100644 index 0000000..acd2484 --- /dev/null +++ b/book/glossary/04.txt @@ -0,0 +1,33 @@ +método (*method*) + A function that is associated with an object and called using dot notation. + +laço (*loop*) + A part of a program that can run repeatedly. + +encapsulamento (*encapsulation*) + The process of transforming a sequence of statements into a function definition. + +generalização (*generalization*) + The process of replacing something unnecessarily specific (like a number) with something appropriately general (like a variable or parameter). + +argumento nomeado (*keyword argument*) + An argument that includes the name of the parameter as a “keyword”. + +assinatura (*interface*) + A description of how to use a function, including the name and descriptions of the arguments and return value. + +refatoração (*refactoring*) + The process of modifying a working program to improve function interfaces and other qualities of the code. + +plano de desenvolvimento (*development plan*) + A process for writing programs. + +*docstring* + A string that appears at the top of a function definition to document the function’s interface. + +pré-condição (*precondition*) + A requirement that should be satisfied by the caller before a function starts. + +pós-condição (*postcondition*) + A requirement that should be satisfied by the function before it ends. + diff --git a/book/glossary/05.txt b/book/glossary/05.txt new file mode 100644 index 0000000..7c512e7 --- /dev/null +++ b/book/glossary/05.txt @@ -0,0 +1,45 @@ +divisão pelo piso (*floor division*) + An operator, denoted //, that divides two numbers and rounds down (toward zero) to an integer. + +operador de módulo (*modulus operator*) + An operator, denoted with a percent sign (%), that works on integers and returns the remainder when one number is divided by another. + +expressão booleana (*boolean expression*) + An expression whose value is either True or False. + +operador relacional (*relational operator*) + One of the operators that compares its operands: ==, !=, >, <, >=, and <=. + +operador lógico (*logical operator*) + One of the operators that combines boolean expressions: and, or, and not. + +instrução condicional (*conditional statement*) + A statement that controls the flow of execution depending on some condition. + +condição (*condition*) + The boolean expression in a conditional statement that determines which branch runs. + +instrução composta (*compound statement*) + A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header. + +desvio (*branch*) + One of the alternative sequences of statements in a conditional statement. + +condicional encadeado (*chained conditional*) + A conditional statement with a series of alternative branches. + +condicional aninhado (*nested conditional*) + A conditional statement that appears in one of the branches of another conditional statement. + +``return``, instrução (``return`` *statement*) + A statement that causes a function to end immediately and return to the caller. + +recursão (*recursion*) + The process of calling the function that is currently executing. + +caso base (*base case*) + A conditional branch in a recursive function that does not make a recursive call. + +recursão infinita (*infinite recursion*) + A recursion that doesn’t have a base case, or never reaches it. Eventually, an infinite recursion causes a runtime error. + diff --git a/book/glossary/06.txt b/book/glossary/06.txt new file mode 100644 index 0000000..9e4d8c2 --- /dev/null +++ b/book/glossary/06.txt @@ -0,0 +1,15 @@ +variável temporária (*temporary variable*) + A variable used to store an intermediate value in a complex calculation. + +código morto (*dead code*) + Part of a program that can never run, often because it appears after a return statement. + +desenvolvimento incremental (*incremental development*) + A program development plan intended to avoid debugging by adding and testing only a small amount of code at a time. + +código provisório (*scaffolding*) + Code that is used during program development but is not part of the final version. + +guarda (*guardian*) + A programming pattern that uses a conditional statement to check for and handle circumstances that might cause an error. + diff --git a/book/glossary/07.txt b/book/glossary/07.txt new file mode 100644 index 0000000..a82d5a2 --- /dev/null +++ b/book/glossary/07.txt @@ -0,0 +1,24 @@ +reatribuição (*reassignment*) + Assigning a new value to a variable that already exists. + +atualização (*update*) + An assignment where the new value of the variable depends on the old. + +inicialização (*initialization*) + An assignment that gives an initial value to a variable that will be updated. + +incrementar (*increment*) + An update that increases the value of a variable (often by one). + +decrementar (*decrement*) + An update that decreases the value of a variable. + +iteração (*iteration*) + Repeated execution of a set of statements using either a recursive function call or a loop. + +laço infinito (*infinite loop*) + A loop in which the terminating condition is never satisfied. + +algoritmo (*algorithm*) + A general process for solving a category of problems. + diff --git a/book/glossary/08.txt b/book/glossary/08.txt new file mode 100644 index 0000000..454cd7e --- /dev/null +++ b/book/glossary/08.txt @@ -0,0 +1,36 @@ +objeto (*object*) + Something a variable can refer to. For now, you can use “object” and “value” interchangeably. + +sequência de formatação (*sequence*) + An ordered collection of values where each value is identified by an integer index. + +*item* (item) + One of the values in a sequence. + +índice (*index*) + An integer value used to select an item in a sequence, such as a character in a string. In Python indices start from 0. + +código provisório (*slice*) + A part of a string specified by a range of indices. + +string vazia (*empty string*) + A string with no characters and length 0, represented by two quotation marks. + +imutável (*immutable*) + The property of a sequence whose items cannot be changed. + +percorrer (*traverse*) + To iterate through the items in a sequence, performing a similar operation on each. + +busca (*search*) + A pattern of traversal that stops when it finds what it is looking for. + +contador (*counter*) + A variable used to count something, usually initialized to zero and then incremented. + +invocação (*invocation*) + A statement that calls a method. + +argumento opcional (*optional argument*) + A function or method argument that is not required. + diff --git a/book/glossary/09.txt b/book/glossary/09.txt new file mode 100644 index 0000000..38033d7 --- /dev/null +++ b/book/glossary/09.txt @@ -0,0 +1,9 @@ +objeto-arquivo (*file object*) + A value that represents an open file. + +redução a um problema resolvido (*reduction to a previously solved problem*) + A way of solving a problem by expressing it as an instance of a previously solved problem. + +caso especial (*special case*) + A test case that is atypical or non-obvious (and less likely to be handled correctly). + diff --git a/book/glossary/10.txt b/book/glossary/10.txt new file mode 100644 index 0000000..3466f07 --- /dev/null +++ b/book/glossary/10.txt @@ -0,0 +1,42 @@ +lista (*list*) + A sequence of values. + +elemento (*element*) + One of the values in a list (or other sequence), also called items. + +lista aninhada (*nested list*) + A list that is an element of another list. + +acumulador (*accumulator*) + A variable used in a loop to add up or accumulate a result. + +atribuição combinada (*augmented assignment*) + A statement that updates the value of a variable using an operator like ``+=``. + +reduzir (*reduce*) + A processing pattern that traverses a sequence and accumulates the elements into a single result. + +*map* (“mapear”, “de-para”) + A processing pattern that traverses a sequence and performs an operation on each element. + +filtro (*filter*) + A processing pattern that traverses a list and selects the elements that satisfy some criterion. + +objeto (*object*) + Something a variable can refer to. An object has a type and a value. + +equivalente (*equivalent*) + Having the same value. + +idêntico (*identical*) + Being the same object (which implies equivalence). + +referência (*reference*) + The association between a variable and its value. + +*aliasing* (“apelidamento”) + A circumstance where two or more variables refer to the same object. + +delimitador (*delimiter*) + A character or string used to indicate where a string should be split. + diff --git a/book/glossary/11.txt b/book/glossary/11.txt new file mode 100644 index 0000000..a8bb4aa --- /dev/null +++ b/book/glossary/11.txt @@ -0,0 +1,60 @@ +mapeamento (*mapping*) + A relationship in which each element of one set corresponds to an element of another set. + +dicionário (*dictionary*) + A mapping from keys to their corresponding values. + +par chave-valor (*key-value pair*) + The representation of the mapping from a key to a value. + +*item* (item) + In a dictionary, another name for a key-value pair. + +chave (*key*) + An object that appears in a dictionary as the first part of a key-value pair. + +valor (*value*) + An object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word “value”. + +implementação (*implementation*) + A way of performing a computation. + +tabela de hash (*hashtable*) + The algorithm used to implement Python dictionaries. + +função de hash (*hash function*) + A function used by a hashtable to compute the location for a key. + +*hashable* () + A type that has a hash function. Immutable types like integers, floats and strings are hashable; mutable types like lists and dictionaries are not. + +busca (*lookup*) + A dictionary operation that takes a key and finds the corresponding value. + +busca invertida (*reverse lookup*) + A dictionary operation that takes a value and finds one or more keys that map to it. + +``raise``, instrução (``raise`` *statement*) + A statement that (deliberately) raises an exception. + +*singleton* + A list (or other sequence) with a single element. + +diagrama de chamadas (*call graph*) + A diagram that shows every frame created during the execution of a program, with an arrow from each caller to each callee. + +*memo* (“lembrete”) + A computed value stored to avoid unnecessary future computation. + +variável global (*global variable*) + A variable defined outside a function. Global variables can be accessed from any function. + +``global``, declaração (``global`` *statement*) + A statement that declares a variable name global. + +*flag* (“indicador”) + A boolean variable used to indicate whether a condition is true. + +declaração (*declaration*) + A statement like global that tells the interpreter something about a variable. + diff --git a/book/glossary/12.txt b/book/glossary/12.txt new file mode 100644 index 0000000..b930883 --- /dev/null +++ b/book/glossary/12.txt @@ -0,0 +1,24 @@ +tupla (*tuple*) + An immutable sequence of elements. + +desempacotamento de tupla (*tuple assignment*) + An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left. + +reunir (*gather*) + The operation of assembling a variable-length argument tuple. + +explodir (*scatter*) + The operation of treating a sequence as a list of arguments. + +objeto ``zip`` (``zip`` *object*) + The result of calling a built-in function zip; an object that iterates through a sequence of tuples. + +iterador (*iterator*) + An object that can iterate through a sequence, but which does not provide list operators and methods. + +estrutura de dados (*data structure*) + A collection of related values, often organized in lists, dictionaries, tuples, etc. + +errro estrutural (*shape error*) + An error caused because a value has the wrong shape; that is, the wrong type or size. + diff --git a/book/glossary/13.txt b/book/glossary/13.txt new file mode 100644 index 0000000..96263c5 --- /dev/null +++ b/book/glossary/13.txt @@ -0,0 +1,18 @@ +determinístico (*deterministic*) + Pertaining to a program that does the same thing each time it runs, given the same inputs. + +pseudo-aleatório (*pseudorandom*) + Pertaining to a sequence of numbers that appears to be random, but is generated by a deterministic program. + +valor default (*default value*) + The value given to an optional parameter if no argument is provided. + +sobrepor (*override*) + To replace a default value with an argument. + +teste de desempenho (*benchmarking*) + The process of choosing between data structures by implementing alternatives and testing them on a sample of the possible inputs. + +depuração com patinho de borracha (*rubber duck debugging*) + Debugging by explaining your problem to an inanimate object such as a rubber duck. Articulating the problem can help you solve it, even if the rubber duck doesn’t know Python. + diff --git a/book/glossary/14.txt b/book/glossary/14.txt new file mode 100644 index 0000000..36ce9e8 --- /dev/null +++ b/book/glossary/14.txt @@ -0,0 +1,42 @@ +persistente (*persistent*) + Pertaining to a program that runs indefinitely and keeps at least some of its data in permanent storage. + +operador de formatação (*format operator*) + An operator, %, that takes a format string and a tuple and generates a string that includes the elements of the tuple formatted as specified by the format string. + +string de formatação (*format string*) + A string, used with the format operator, that contains format sequences. + +sequência de formatação (*format sequence*) + A sequence of characters in a format string, like %d, that specifies how a value should be formatted. + +arquivo-texto (*text file*) + A sequence of characters stored in permanent storage like a hard drive. + +diretório (*directory*) + A named collection of files, also called a folder. + +caminho (*path*) + A string that identifies a file. + +caminho relativo (*relative path*) + A path that starts from the current directory. + +caminho absoluto (*absolute path*) + A path that starts from the topmost directory in the file system. + +capturar (*catch*) + To prevent an exception from terminating a program using the try and except statements. + +banco de dados (*database*) + A file whose contents are organized like a dictionary with keys that correspond to values. + +objeto ``bytes`` (``bytes`` *object*) + An object similar to a string. + +*shell* + A program that allows users to type commands and then executes them by starting other programs. + +objeto “pipe” (*pipe object*) + An object that represents a running program, allowing a Python program to run commands and read the results. + diff --git a/book/glossary/15.txt b/book/glossary/15.txt new file mode 100644 index 0000000..cbb48b0 --- /dev/null +++ b/book/glossary/15.txt @@ -0,0 +1,27 @@ +classe (*class*) + A programmer-defined type. A class definition creates a new class object. + +objeto-classe (*class object*) + An object that contains information about a programmer-defined type. The class object can be used to create instances of the type. + +instância (*instance*) + An object that belongs to a class. + +instanciar (*instantiate*) + To create a new object. + +atributo (*attribute*) + One of the named values associated with an object. + +objeto embutido (*embedded object*) + An object that is stored as an attribute of another object. + +cópia rasa (*shallow copy*) + To copy the contents of an object, including any references to embedded objects; implemented by the copy function in the copy module. + +cópia profunda (*deep copy*) + To copy the contents of an object as well as any embedded objects, and any objects embedded in them, and so on; implemented by the deepcopy function in the copy module. + +diagrama de objetos (*object diagram*) + A diagram that shows objects, their attributes, and the values of the attributes. + diff --git a/book/glossary/16.txt b/book/glossary/16.txt new file mode 100644 index 0000000..be92caa --- /dev/null +++ b/book/glossary/16.txt @@ -0,0 +1,21 @@ +prototipar e ajustar (*prototype and patch*) + A development plan that involves writing a rough draft of a program, testing, and correcting errors as they are found. + +desenvolvimento planejado (*designed development*) + A development plan that involves high-level insight into the problem and more planning than incremental development or prototype development. + +função pura (*pure function*) + A function that does not modify any of the objects it receives as arguments. Most pure functions are fruitful. + +modificadora (*modifier*) + A function that changes one or more of the objects it receives as arguments. Most modifiers are void; that is, they return None. + +programação funcional (*functional programming style*) + A style of program design in which the majority of functions are pure. + +invariante (*invariant*) + A condition that should always be true during the execution of a program. + +``assert``, instrução (``assert`` *statement*) + A statement that check a condition and raises an exception if it fails. + diff --git a/book/glossary/17.txt b/book/glossary/17.txt new file mode 100644 index 0000000..4108dbf --- /dev/null +++ b/book/glossary/17.txt @@ -0,0 +1,27 @@ +linguagem orientada a objetos (*object-oriented language*) + A language that provides features, such as programmer-defined types and methods, that facilitate object-oriented programming. + +programação orientada a objetos (*object-oriented programming*) + A style of programming in which data and the operations that manipulate it are organized into classes and methods. + +método (*method*) + A function that is defined inside a class definition and is invoked on instances of that class. + +sujeito (*subject*) + The object a method is invoked on. + +argumento posicional (*positional argument*) + An argument that does not include a parameter name, so it is not a keyword argument. + +sobrecarga de operadores (*operator overloading*) + Changing the behavior of an operator like + so it works with a programmer-defined type. + +despacho por tipo (*type-based dispatch*) + A programming pattern that checks the type of an operand and invokes different functions for different types. + +polimórfico (*polymorphic*) + Pertaining to a function that can work with more than one type. + +ocultação de informações (*information hiding*) + The principle that the interface provided by an object should not depend on its implementation, in particular the representation of its attributes. + diff --git a/book/glossary/18.txt b/book/glossary/18.txt new file mode 100644 index 0000000..8dd4086 --- /dev/null +++ b/book/glossary/18.txt @@ -0,0 +1,39 @@ +codificar (*encode*) + To represent one set of values using another set of values by constructing a mapping between them. + +atributo de classe (*class attribute*) + An attribute associated with a class object. Class attributes are defined inside a class definition but outside any method. + +atributo de instância (*instance attribute*) + An attribute associated with an instance of a class. + +fachada (*veneer*) + A method or function that provides a different interface to another function without doing much computation. + +herança (*inheritance*) + The ability to define a new class that is a modified version of a previously defined class. + +classe base (*parent class*) + The class from which a child class inherits. + +classe derivada (*child class*) + A new class created by inheriting from an existing class; also called a “subclass”. + +relação É-UM (*IS-A relationship*) + A relationship between a child class and its parent class. + +relação TEM-UM (*HAS-A relationship*) + A relationship between two classes where instances of one class contain references to instances of the other. + +dependência (*dependency*) + A relationship between two classes where instances of one class use instances of the other class, but do not store them as attributes. + +diagrama de classe (*class diagram*) + A diagram that shows the classes in a program and the relationships between them. + +cardinalidade (*multiplicity*) + A notation in a class diagram that shows, for a HAS-A relationship, how many references there are to instances of another class. + +encapsulamento de dados (*data encapsulation*) + A program development plan that involves a prototype using global variables and a final version that makes the global variables into instance attributes. + diff --git a/book/glossary/19.txt b/book/glossary/19.txt new file mode 100644 index 0000000..3d271a4 --- /dev/null +++ b/book/glossary/19.txt @@ -0,0 +1,15 @@ +expressão condicional (*conditional expression*) + An expression that has one of two values, depending on a condition. + +listcomp (*list comprehension*) + An expression with a for loop in square brackets that yields a new list. + +expressão geradora (*generator expression*) + An expression with a for loop in parentheses that yields a generator object. + +*multiset* (“multi-conjunto”) + A mathematical entity that represents a mapping between the elements of a set and the number of times they appear. + +*factory* (fábrica) + A function, usually passed as a parameter, used to create objects. + diff --git a/book/glossary/B.txt b/book/glossary/B.txt new file mode 100644 index 0000000..c4fd032 --- /dev/null +++ b/book/glossary/B.txt @@ -0,0 +1,33 @@ +análise de algoritmos (*analysis of algorithms*) + A way to compare algorithms in terms of their run time and/or space requirements. + +máquina-modelo (*machine model*) + A simplified representation of a computer used to describe algorithms. + +pior caso (*worst case*) + The input that makes a given algorithm run slowest (or require the most space. + +termo dominante (*leading term*) + In a polynomial, the term with the highest exponent. + +ponto de cruzamento (*crossover point*) + The problem size where two algorithms require the same run time or space. + +ordem de crescimento (*order of growth*) + A set of functions that all grow in a way considered equivalent for purposes of analysis of algorithms. For example, all functions that grow linearly belong to the same order of growth. + +notação assintótica (*Big-Oh notation*) + Notation for representing an order of growth; for example, :math:`O(n)` represents the set of functions that grow linearly. + +*linear* (linear) + An algorithm whose run time is proportional to problem size, at least for large problem sizes. + +quadrático (*quadratic*) + An algorithm whose run time is proportional to :math:`n^2`, where :math:`n` is a measure of problem size. + +busca (*search*) + The problem of locating an element of a collection (like a list or dictionary) or determining that it is not present. + +tabela de hash (*hashtable*) + A data structure that represents a collection of key-value pairs and performs search in constant time. + diff --git a/book/index.rst b/book/index.rst index ca38d60..859ec1b 100644 --- a/book/index.rst +++ b/book/index.rst @@ -33,8 +33,9 @@ Contents: 19-goodies.rst A-debug.rst B-analysis-alg.rst + C-glossary.rst + - Indices and tables ================== diff --git a/tools/glossary.csv b/tools/glossary.csv new file mode 100644 index 0000000..7e150f1 --- /dev/null +++ b/tools/glossary.csv @@ -0,0 +1,233 @@ +adopted term,EN-US term,PT-BR term,chapter,order,EN-US definition +"``assert``, instrução",``assert`` statement,instrução ``assert``,16,7,A statement that check a condition and raises an exception if it fails. +"``global``, declaração",``global`` statement,declaração ``global``,11,18,A statement that declares a variable name global. +"``import``, instrução",``import`` statement,instrução ``import``,03,15,A statement that reads a module file and creates a module object. +``None``,``None``,-,03,13,A special value returned by void functions. +"``print``, instrução",``print`` statement,instrução ``print``,01,8,An instruction that causes the Python interpreter to display a value on the screen. +"``raise``, instrução",``raise`` statement,instrução ``raise``,11,13,A statement that (deliberately) raises an exception. +"``return``, instrução",``return`` statement,instrução ``return``,05,12,A statement that causes a function to end immediately and return to the caller. +acumulador,accumulator,acumulador,10,4,A variable used in a loop to add up or accumulate a result. +algoritmo,algorithm,algoritmo,07,8,A general process for solving a category of problems. +aliasing,aliasing,“apelidamento”,10,13,A circumstance where two or more variables refer to the same object. +analisar,parse,analisar,01,19,To examine a program and analyze the syntactic structure. +análise de algoritmos,analysis of algorithms,análise de algoritmos,B,1,A way to compare algorithms in terms of their run time and/or space requirements. +argumento,argument,argumento,03,8,A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function. +argumento nomeado,keyword argument,argumento nomeado,04,5,An argument that includes the name of the parameter as a “keyword”. +argumento opcional,optional argument,argumento opcional,08,12,A function or method argument that is not required. +argumento posicional,positional argument,argumento posicional,17,5,"An argument that does not include a parameter name, so it is not a keyword argument." +arquivo-texto,text file,arquivo-texto,14,5,A sequence of characters stored in permanent storage like a hard drive. +assinatura,interface,"assinatura, interface",04,6,"A description of how to use a function, including the name and descriptions of the arguments and return value." +atribuição,assignment,atribuição,02,2,A statement that assigns a value to a variable. +atribuição combinada,augmented assignment,atribuição combinada,10,5,A statement that updates the value of a variable using an operator like ``+=``. +atributo,attribute,atributo,15,5,One of the named values associated with an object. +atributo de classe,class attribute,atributo de classe,18,2,An attribute associated with a class object. Class attributes are defined inside a class definition but outside any method. +atributo de instância,instance attribute,atributo de instância,18,3,An attribute associated with an instance of a class. +atualização,update,atualização,07,2,An assignment where the new value of the variable depends on the old. +avaliar,evaluate,avaliar,02,7,To simplify an expression by performing the operations in order to yield a single value. +banco de dados,database,banco de dados,14,11,A file whose contents are organized like a dictionary with keys that correspond to values. +bug,bug,-,01,20,An error in a program. +busca,search,busca,08,9,A pattern of traversal that stops when it finds what it is looking for. +busca,lookup,"busca, pesquisa",11,11,A dictionary operation that takes a key and finds the corresponding value. +busca,search,busca,B,10,The problem of locating an element of a collection (like a list or dictionary) or determining that it is not present. +busca invertida,reverse lookup,busca invertida,11,12,A dictionary operation that takes a value and finds one or more keys that map to it. +cabeçalho,header,cabeçalho,03,4,The first line of a function definition. +caminho,path,caminho,14,7,A string that identifies a file. +caminho absoluto,absolute path,caminho absoluto,14,9,A path that starts from the topmost directory in the file system. +caminho relativo,relative path,caminho relativo,14,8,A path that starts from the current directory. +capturar,catch,capturar,14,10,To prevent an exception from terminating a program using the try and except statements. +cardinalidade,multiplicity,"cardinalidade, multiplicidadade",18,12,"A notation in a class diagram that shows, for a HAS-A relationship, how many references there are to instances of another class." +caso base,base case,caso base,05,14,A conditional branch in a recursive function that does not make a recursive call. +caso especial,special case,caso especial,09,3,A test case that is atypical or non-obvious (and less likely to be handled correctly). +chamada de função,function call,chamada de função,03,7,A statement that runs a function. It consists of the function name followed by an argument list in parentheses. +chave,key,chave,11,5,An object that appears in a dictionary as the first part of a key-value pair. +classe,class,classe,15,1,A programmer-defined type. A class definition creates a new class object. +classe base,parent class,"classe base, superclasse",18,6,The class from which a child class inherits. +classe derivada,child class,"classe derivada, subclasse",18,7,A new class created by inheriting from an existing class; also called a “subclass”. +codificar,encode,codificar,18,1,To represent one set of values using another set of values by constructing a mapping between them. +código morto,dead code,código morto,06,2,"Part of a program that can never run, often because it appears after a return statement." +código provisório,scaffolding,"“andaime”, código provisório",06,4,Code that is used during program development but is not part of the final version. +código provisório,slice,fatia,08,5,A part of a string specified by a range of indices. +comentário,comment,comentário,02,15,Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program. +composição,composition,composição,03,18,"Using an expression as part of a larger expression, or a statement as part of a larger statement." +concatenar,concatenate,concatenar,02,14,To join two operands end-to-end. +condição,condition,condição,05,7,The boolean expression in a conditional statement that determines which branch runs. +condicional aninhado,nested conditional,condicional aninhado,05,11,A conditional statement that appears in one of the branches of another conditional statement. +condicional encadeado,chained conditional,condicional encadeado,05,10,A conditional statement with a series of alternative branches. +contador,counter,contador,08,10,"A variable used to count something, usually initialized to zero and then incremented." +cópia profunda,deep copy,cópia profunda,15,8,"To copy the contents of an object as well as any embedded objects, and any objects embedded in them, and so on; implemented by the deepcopy function in the copy module." +cópia rasa,shallow copy,cópia rasa,15,7,"To copy the contents of an object, including any references to embedded objects; implemented by the copy function in the copy module." +corpo,body,corpo,03,5,The sequence of statements inside a function definition. +declaração,declaration,declaração,11,20,A statement like global that tells the interpreter something about a variable. +decrementar,decrement,decrementar,07,5,An update that decreases the value of a variable. +definição de função,function definition,definição de função,03,2,"A statement that creates a new function, specifying its name, parameters, and the statements it contains." +delimitador,delimiter,delimitador,10,14,A character or string used to indicate where a string should be split. +dependência,dependency,dependência,18,10,"A relationship between two classes where instances of one class use instances of the other class, but do not store them as attributes." +depuração,debugging,depuração,01,21,The process of finding and correcting bugs. +depuração com patinho de borracha,rubber duck debugging,depuração com patinho de borracha,13,6,"Debugging by explaining your problem to an inanimate object such as a rubber duck. Articulating the problem can help you solve it, even if the rubber duck doesn’t know Python." +desempacotamento de tupla,tuple assignment,desempacotamento de tupla,12,2,An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left. +desenvolvimento incremental,incremental development,desenvolvimento incremental,06,3,A program development plan intended to avoid debugging by adding and testing only a small amount of code at a time. +desenvolvimento planejado,designed development,desenvolvimento planejado,16,2,A development plan that involves high-level insight into the problem and more planning than incremental development or prototype development. +despacho por tipo,type-based dispatch,despacho por tipo,17,7,A programming pattern that checks the type of an operand and invokes different functions for different types. +desvio,branch,desvio,05,9,One of the alternative sequences of statements in a conditional statement. +determinístico,deterministic,determinístico,13,1,"Pertaining to a program that does the same thing each time it runs, given the same inputs." +diagrama de chamadas,call graph,diagrama de chamadas,11,15,"A diagram that shows every frame created during the execution of a program, with an arrow from each caller to each callee." +diagrama de classe,class diagram,diagrama de classe,18,11,A diagram that shows the classes in a program and the relationships between them. +diagrama de estado,state diagram,diagrama de estado,02,3,A graphical representation of a set of variables and the values they refer to. +diagrama de objetos,object diagram,diagrama de objetos,15,9,"A diagram that shows objects, their attributes, and the values of the attributes." +diagrama de pilha,stack diagram,diagrama de pilha,03,20,"A graphical representation of a stack of functions, their variables, and the values they refer to." +dicionário,dictionary,dicionário,11,2,A mapping from keys to their corresponding values. +diretório,directory,diretório,14,6,"A named collection of files, also called a folder." +divisão pelo piso,floor division,divisão pelo piso,05,1,"An operator, denoted //, that divides two numbers and rounds down (toward zero) to an integer." +docstring,docstring,-,04,9,A string that appears at the top of a function definition to document the function’s interface. +elemento,element,elemento,10,2,"One of the values in a list (or other sequence), also called items." +encapsulamento,encapsulation,encapsulamento,04,3,The process of transforming a sequence of statements into a function definition. +encapsulamento de dados,data encapsulation,encapsulamento de dados,18,13,A program development plan that involves a prototype using global variables and a final version that makes the global variables into instance attributes. +equivalente,equivalent,equivalente,10,10,Having the same value. +erro semântico,semantic error,erro semântico,02,19,An error in a program that makes it do something other than what the programmer intended. +erro sintático,syntax error,erro sintático,02,16,An error in a program that makes it impossible to parse (and therefore impossible to interpret). +errro estrutural,shape error,errro estrutural,12,8,"An error caused because a value has the wrong shape; that is, the wrong type or size." +estrutura de dados,data structure,estrutura de dados,12,7,"A collection of related values, often organized in lists, dictionaries, tuples, etc." +exceção,exception,exceção,02,17,An error that is detected while the program is running. +executar,execute,executar,02,9,To run a statement and do what it says. +explodir,scatter,explodir,12,4,The operation of treating a sequence as a list of arguments. +expressão,expression,expressão,02,6,"A combination of variables, operators, and values that represents a single result." +expressão booleana,boolean expression,expressão booleana,05,3,An expression whose value is either True or False. +expressão condicional,conditional expression,expressão condicional,19,1,"An expression that has one of two values, depending on a condition." +expressão geradora,generator expression,expressão geradora,19,3,An expression with a for loop in parentheses that yields a generator object. +fachada,veneer,“verniz” ou fachada,18,4,A method or function that provides a different interface to another function without doing much computation. +factory,factory,fábrica,19,5,"A function, usually passed as a parameter, used to create objects." +filtro,filter,filtro,10,8,A processing pattern that traverses a list and selects the elements that satisfy some criterion. +flag,flag,“indicador”,11,19,A boolean variable used to indicate whether a condition is true. +fluxo de execução,flow of execution,fluxo de execução,03,19,The order statements run in. +frame,frame,,03,21,A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function. +função,function,função,03,1,A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result. +função de hash,hash function,função de espalhamento,11,9,A function used by a hashtable to compute the location for a key. +função produtiva,fruitful function,função produtiva,03,11,A function that returns a value. +função pura,pure function,função pura,16,3,A function that does not modify any of the objects it receives as arguments. Most pure functions are fruitful. +generalização,generalization,generalização,04,4,The process of replacing something unnecessarily specific (like a number) with something appropriately general (like a variable or parameter). +guarda,guardian,guarda,06,5,A programming pattern that uses a conditional statement to check for and handle circumstances that might cause an error. +hashable,hashable,,11,10,"A type that has a hash function. Immutable types like integers, floats and strings are hashable; mutable types like lists and dictionaries are not." +herança,inheritance,herança,18,5,The ability to define a new class that is a modified version of a previously defined class. +idêntico,identical,idêntico,10,11,Being the same object (which implies equivalence). +implementação,implementation,implementação,11,7,A way of performing a computation. +imutável,immutable,imutável,08,7,The property of a sequence whose items cannot be changed. +incrementar,increment,incrementar,07,4,An update that increases the value of a variable (often by one). +índice,index,índice,08,4,"An integer value used to select an item in a sequence, such as a character in a string. In Python indices start from 0." +inicialização,initialization,inicialização,07,3,An assignment that gives an initial value to a variable that will be updated. +instância,instance,instância,15,3,An object that belongs to a class. +instanciar,instantiate,instanciar,15,4,To create a new object. +instrução,statement,instrução,02,8,"A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements." +instrução composta,compound statement,instrução composta,05,8,A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header. +instrução condicional,conditional statement,instrução condicional,05,6,A statement that controls the flow of execution depending on some condition. +inteiro,integer,inteiro,01,12,A type that represents whole numbers. +interpretador,interpreter,interpretador,01,5,A program that reads another program and executes it +invariante,invariant,invariante,16,6,A condition that should always be true during the execution of a program. +invocação,invocation,invocação,08,11,A statement that calls a method. +item,item,item,08,3,One of the values in a sequence. +item,item,item,11,4,"In a dictionary, another name for a key-value pair." +iteração,iteration,iteração,07,6,Repeated execution of a set of statements using either a recursive function call or a loop. +iterador,iterator,iterador,12,6,"An object that can iterate through a sequence, but which does not provide list operators and methods." +laço,loop,"laço, loop",04,2,A part of a program that can run repeatedly. +laço infinito,infinite loop,laço infinito,07,7,A loop in which the terminating condition is never satisfied. +linear,linear,linear,B,8,"An algorithm whose run time is proportional to problem size, at least for large problem sizes." +linguagem de alto nível,high-level language,linguagem de alto nível,01,2,A programming language like Python that is designed to be easy for humans to read and write. +linguagem de baixo nível,low-level language,linguagem de baixo nível,01,3,A programming language that is designed to be easy for a computer to run; also called “machine language” or “assembly language”. +linguagem formal,formal language,linguagem formal,01,16,"Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages." +linguagem natural,natural language,linguagem natural,01,15,Any one of the languages that people speak that evolved naturally. +linguagem orientada a objetos,object-oriented language,linguagem orientada a objetos,17,1,"A language that provides features, such as programmer-defined types and methods, that facilitate object-oriented programming." +lista,list,lista,10,1,A sequence of values. +lista aninhada,nested list,lista aninhada,10,3,A list that is an element of another list. +listcomp,list comprehension,"“compreensão de lista”, listcomp",19,2,An expression with a for loop in square brackets that yields a new list. +map,map,"“mapear”, “de-para”",10,7,A processing pattern that traverses a sequence and performs an operation on each element. +mapeamento,mapping,mapeamento,11,1,A relationship in which each element of one set corresponds to an element of another set. +máquina-modelo,machine model,máquina-modelo,B,2,A simplified representation of a computer used to describe algorithms. +memo,memo,“lembrete”,11,16,A computed value stored to avoid unnecessary future computation. +método,method,método,04,1,A function that is associated with an object and called using dot notation. +método,method,método,17,3,A function that is defined inside a class definition and is invoked on instances of that class. +modificadora,modifier,modificadora,16,4,"A function that changes one or more of the objects it receives as arguments. Most modifiers are void; that is, they return None." +modo de script,script mode,modo de script,02,11,A way of using the Python interpreter to read code from a script and run it. +modo interativo,interactive mode,modo interativo,02,10,A way of using the Python interpreter by typing code at the prompt. +módulo,module,módulo,03,14,A file that contains a collection of related functions and other definitions. +multiset,multiset,“multi-conjunto”,19,4,A mathematical entity that represents a mapping between the elements of a set and the number of times they appear. +notação assintótica,Big-Oh notation,notação assintótica,B,7,"Notation for representing an order of growth; for example, :math:`O(n)` represents the set of functions that grow linearly." +notação de ponto,dot notation,notação de ponto,03,17,The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name. +objeto,object,objeto,08,1,"Something a variable can refer to. For now, you can use “object” and “value” interchangeably." +objeto,object,objeto,10,9,Something a variable can refer to. An object has a type and a value. +objeto “pipe”,pipe object,objeto “pipe”,14,14,"An object that represents a running program, allowing a Python program to run commands and read the results." +objeto ``bytes``,``bytes`` object,objeto ``bytes``,14,12,An object similar to a string. +objeto ``zip``,``zip`` object,objeto ``zip``,12,5,The result of calling a built-in function zip; an object that iterates through a sequence of tuples. +objeto embutido,embedded object,objeto embutido,15,6,An object that is stored as an attribute of another object. +objeto-arquivo,file object,objeto-arquivo,09,1,A value that represents an open file. +objeto-classe,class object,objeto-classe,15,2,An object that contains information about a programmer-defined type. The class object can be used to create instances of the type. +objeto-função,function object,objeto-função,03,3,A value created by a function definition. The name of the function is a variable that refers to a function object. +objeto-módulo,module object,objeto-módulo,03,16,A value created by an import statement that provides access to the values defined in a module. +ocultação de informações,information hiding,ocultação de informações,17,9,"The principle that the interface provided by an object should not depend on its implementation, in particular the representation of its attributes." +operador,operator,operador,01,9,"A special symbol that represents a simple computation like addition, multiplication, or string concatenation." +operador de formatação,format operator,operador de formatação,14,2,"An operator, %, that takes a format string and a tuple and generates a string that includes the elements of the tuple formatted as specified by the format string." +operador de módulo,modulus operator,operador de módulo,05,2,"An operator, denoted with a percent sign (%), that works on integers and returns the remainder when one number is divided by another." +operador lógico,logical operator,operador lógico,05,5,"One of the operators that combines boolean expressions: and, or, and not." +operador relacional,relational operator,operador relacional,05,4,"One of the operators that compares its operands: ==, !=, >, <, >=, and <=." +operando,operand,operando,02,5,One of the values on which an operator operates. +ordem das operações,order of operations,ordem das operações,02,13,Rules governing the order in which expressions involving multiple operators and operands are evaluated. +ordem de crescimento,order of growth,ordem de crescimento,B,6,"A set of functions that all grow in a way considered equivalent for purposes of analysis of algorithms. For example, all functions that grow linearly belong to the same order of growth." +palavra-chave,keyword,palavra-chave,02,4,"A reserved word that is used to parse a program; you cannot use keywords like if, def, and while as variable names." +par chave-valor,key-value pair,par chave-valor,11,3,The representation of the mapping from a key to a value. +parâmetro,parameter,parâmetro,03,6,A name used inside a function to refer to the value passed as an argument. +percorrer,traverse,percorrer,08,8,"To iterate through the items in a sequence, performing a similar operation on each." +persistente,persistent,persistente,14,1,Pertaining to a program that runs indefinitely and keeps at least some of its data in permanent storage. +pior caso,worst case,pior caso,B,3,The input that makes a given algorithm run slowest (or require the most space. +plano de desenvolvimento,development plan,plano de desenvolvimento,04,8,A process for writing programs. +polimórfico,polymorphic,polimórfico,17,8,Pertaining to a function that can work with more than one type. +ponto de cruzamento,crossover point,ponto de cruzamento,B,5,The problem size where two algorithms require the same run time or space. +ponto-flutuante,floating-point,ponto-flutuante,01,13,A type that represents numbers with fractional parts. +portabilidade,portability,portabilidade,01,4,A property of a program that can run on more than one kind of computer. +pós-condição,postcondition,pós-condição,04,11,A requirement that should be satisfied by the function before it ends. +pré-condição,precondition,pré-condição,04,10,A requirement that should be satisfied by the caller before a function starts. +procedimento,void function,“função nula” ou procedimento,03,12,A function that always returns None. +programação funcional,program,programação funcional,01,7,A set of instructions that specifies a computation. +programação funcional,functional programming style,programação funcional,16,5,A style of program design in which the majority of functions are pure. +programação orientada a objetos,object-oriented programming,programação orientada a objetos,17,2,A style of programming in which data and the operations that manipulate it are organized into classes and methods. +prompt,prompt,“sinal de pronto”,01,6,Characters displayed by the interpreter to indicate that it is ready to take input from the user. +prototipar e ajustar,prototype and patch,prototipar e ajustar,16,1,"A development plan that involves writing a rough draft of a program, testing, and correcting errors as they are found." +pseudo-aleatório,pseudorandom,pseudo-aleatório,13,2,"Pertaining to a sequence of numbers that appears to be random, but is generated by a deterministic program." +quadrático,quadratic,quadrático,B,9,"An algorithm whose run time is proportional to :math:`n^2`, where :math:`n` is a measure of problem size." +reatribuição,reassignment,reatribuição,07,1,Assigning a new value to a variable that already exists. +recursão,recursion,recursão,05,13,The process of calling the function that is currently executing. +recursão infinita,infinite recursion,recursão infinita,05,15,"A recursion that doesn’t have a base case, or never reaches it. Eventually, an infinite recursion causes a runtime error." +redução a um problema resolvido,reduction to a previously solved problem,redução a um problema resolvido,09,2,A way of solving a problem by expressing it as an instance of a previously solved problem. +reduzir,reduce,reduzir,10,6,A processing pattern that traverses a sequence and accumulates the elements into a single result. +refatoração,refactoring,refatoração,04,7,The process of modifying a working program to improve function interfaces and other qualities of the code. +referência,reference,referência,10,12,The association between a variable and its value. +relação É-UM,IS-A relationship,relação É-UM,18,8,A relationship between a child class and its parent class. +relação TEM-UM,HAS-A relationship,relação TEM-UM,18,9,A relationship between two classes where instances of one class contain references to instances of the other. +reunir,gather,reunir,12,3,The operation of assembling a variable-length argument tuple. +script,script,-,02,12,A program stored in a file. +semântica,semantics,semântica,02,18,The meaning of a program. +sequência de formatação,sequence,sequência de formatação,08,2,An ordered collection of values where each value is identified by an integer index. +sequência de formatação,format sequence,sequência de formatação,14,4,"A sequence of characters in a format string, like %d, that specifies how a value should be formatted." +shell,shell,-,14,13,A program that allows users to type commands and then executes them by starting other programs. +singleton,singleton,-,11,14,A list (or other sequence) with a single element. +sintaxe,syntax,sintaxe,01,18,The rules that govern the structure of a program. +sobrecarga de operadores,operator overloading,sobrecarga de operadores,17,6,Changing the behavior of an operator like + so it works with a programmer-defined type. +sobrepor,override,sobrescrever,13,4,To replace a default value with an argument. +solução de problemas,problem solving,solução de problemas,01,1,"The process of formulating a problem, finding a solution, and expressing it." +string,string,“cadeia de caracteres”,01,14,A type that represents sequences of characters. +string de formatação,format string,string de formatação,14,3,"A string, used with the format operator, that contains format sequences." +string vazia,empty string,string vazia,08,6,"A string with no characters and length 0, represented by two quotation marks." +sujeito,subject,sujeito,17,4,The object a method is invoked on. +tabela de hash,hashtable,tabela de espalhamento,11,8,The algorithm used to implement Python dictionaries. +tabela de hash,hashtable,tabela de espalhamento,B,11,A data structure that represents a collection of key-value pairs and performs search in constant time. +termo dominante,leading term,"termo dominante, termo de maior expoente",B,4,"In a polynomial, the term with the highest exponent." +teste de desempenho,benchmarking,teste de desempenho,13,5,The process of choosing between data structures by implementing alternatives and testing them on a sample of the possible inputs. +tipo,type,tipo,01,11,"A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str)." +token,token,“símbolo”,01,17,"One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language." +traceback,traceback,,03,22,"A list of the functions that are executing, printed when an exception occurs." +tupla,tuple,tupla,12,1,An immutable sequence of elements. +valor,value,valor,01,10,"One of the basic units of data, like a number or string, that a program manipulates." +valor,value,valor,11,6,An object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word “value”. +valor default,default value,valor default,13,3,The value given to an optional parameter if no argument is provided. +valor devolvido,return value,valor devolvido,03,10,"The result of a function. If a function call is used as an expression, the return value is the value of the expression." +variável,variable,variável,02,1,A name that refers to a value. +variável global,global variable,variável global,11,17,A variable defined outside a function. Global variables can be accessed from any function. +variável local,local variable,variável local,03,9,A variable defined inside a function. A local variable can only be used inside its function. +variável temporária,temporary variable,variável temporária,06,1,A variable used to store an intermediate value in a complex calculation. diff --git a/tools/glossary.ods b/tools/glossary.ods index c76ac850b2572ee9a6d6f6300d1798873242eae6..72712c6eef658591da89063e3ab75a8b7b5ba5fb 100644 GIT binary patch delta 52344 zcmZ^qQ*@v~v#w*?wrv}ei8--tTVE!&olI=onq(%nZQI74{qKD)&RXZ(blunLs_K5; zw`!9h+Ka#um1MyoFhD?HKtRsn{1XtBk^Tj#jf=(4J8uw>JMRQrR-hOJ1mp__?B7YO z`;!0!#JfXULR8H&`=T3CL}%oY$Jap@7WVS8h7nRGB(Ap)opI0=kMd`B7$7*ary zUFqMS0cs{f+Rvq+K-`clMWWN*pk9|}0!f^he=!<}*Z>QunFJW90MZM60tgRBz_dza z9&LC`aR_Q13xU!ljiZnw8jho53)(*Fz>p(`AUKjCujLLgByKmR9ixp0*ykbQ?Q4j9 z`HQfDG(b3k6#Jab01NRhM$L16EV#2Yh2acbJ%GV_PYOs%NR~i?k{&~kyX@&!LZ3OPd&~A3HdzW;i-uf^pgpQQh(R7qQ@E$^mnTanaaeOtGG(skaT@L@J+9&SaTOc{1Ts(=8U?-WfpHFN z(HSLn={+Mz$pq&X1w`#}e~&)_fp$F(AW!)70TmDU>&VE2r+fJ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> z__fha{zM_6zxp%VpGXmv+lebDsZ)Ie<%=LJ7gd*rn>FA1>cNQQ$Y_Rijj-I$mR8nQ z2HyLvtzHRt0#!e(mGhJKlIj)t&p#UP=7D!JwdWcaWu<^)@S%yV`O83yCshTQd^8kG zqV&XADd5n{FbFpueCHAF$Mvzo(xST)eJjsKQ#8Fo9JLABD|jldlZ03uTZMqZL=lYd zGUok(t&cOf%L=RwLNWRYg-+Y-UPK-VtEb0)A z-!$@~uPOlB6&`et!|v3lLqLYGs8GBN=7G3~oM(?{%b;RD|HRQ$D=dLpTFc3jBlsG& zBi2MOVgM)fp+18GCQPjS?|U8qvQoMUEFSH+$4=_;ebb@|g+jq8Nh4sTd|*D;7{OE4jyYI4IacVIOj#34 zO`0RPqFIZv>hE(7ysumneT!?N*~Dpb^DBwR=J16=ceZ4C>=olDq{PM3#O@&$C7aVG zEzAJ3_CBnJv-@WGkx}YU95|^s#c~G7nJhAToCwP|f9x@3sVyUfaEE`K2O@*aIOU4< zhaR9EQZ(te`)mz%TyLbxWjyr{7mFQ&S0^N@-|5D?;{{8@D+x3m`(+5yyEiv7D@96f zW~p}9=kl47J3tkVKf1t%AU<-)i6lE22^9r425%JbC2Z-;;kMVDGk84OT2TWs1tU(B z5=im}z(%OyBCdrU`g0c~DN4JH8C&8}r9}bH%i$k~93qt4oDKGJ^M`=oU5vlDeU(v? zqo_|!4$OVpX$_j{W0snQUyFe#G-3sXfXQYCxKTfNRU9^ zK;a+Gj_WD*fAv9AtpDGcIAwhb zNBf^e|BZWK|F1{~zNigmbu{jzGXE{Bzj3_EN zAKl5f&VPaO-!($>xS#|ez$y3h`. + +Note que alguns termos aparecem em mais de um capítulo, às vezes +com definições diferentes, de acordo com o contexto. +\n\n''' + +GlossaryEntry = collections.namedtuple('GlossaryEntry', FIELDS) + + +def asciize(txt): + """Return only ASCII letters from text""" + return ''.join(c for c in unicodedata.normalize('NFD', txt) + if c in string.ascii_lowercase) + +def master_order(entry): + return asciize(entry.term.casefold()) + '|' + entry.chapter + + +def read_glossary(): + master_glossary = [] + glossaries = collections.defaultdict(list) + with open(GLOSSARY_DATA_PATH) as csvfile: + reader = csv.DictReader(csvfile, FIELDS) + next(reader) # skip header line + for row in reader: + row['order'] = int(row['order']) + entry = GlossaryEntry(**row) + #print(entry) + glossaries[row['chapter']].append(entry) + master_glossary.append(entry) + return master_glossary, glossaries + + +def formatted_head(entry): + us_term = entry.us_term + if '``' in us_term: + if us_term != '``None``': + symbol, noun = us_term.split() + us_term = '{} *{}*'.format(symbol, noun) + else: + us_term = '*{}*'.format(us_term) + if entry.br_term == '-': # no BR term + head = us_term + elif entry.term != entry.us_term: # adopted BR term + head = '{} ({})'.format(entry.term, us_term) + else: # adopted US term + head = '{} ({})'.format(us_term, entry.br_term) + return head + +def main(): + master_glossary, chapter_glossaries = read_glossary() + + link_fmt = ':ref:`[1] `' + + out_path = os.path.join(RST_PATH, 'C-glossary.rst') + with open(out_path, 'wt', encoding='utf-8') as out_file: + out_file.write(GLOSSARY_HEAD) + for entry in sorted(master_glossary, key=master_order): + short_chapter = entry.chapter.lstrip('0') + out_file.write('{} :ref:`[{}] `\n {}\n\n' + .format(formatted_head(entry), short_chapter, + entry.chapter, entry.definition)) + + for chapter_id, entries_qty in expected_entries: + chapter_glob = os.path.join(RST_PATH, chapter_id+'*.rst') + found = glob.glob(chapter_glob) + assert len(found) == 1, 'found: {}'.format(len(found)) + out_path = os.path.join(RST_PATH, 'glossary', chapter_id+'.txt') + glossary = chapter_glossaries[chapter_id] + with open(out_path, 'wt', encoding='utf-8') as out_file: + for entry in sorted(glossary, key=operator.attrgetter('order')): + out_file.write('{}\n {}\n\n'.format(formatted_head(entry), entry.definition)) + + print() + +if __name__ == '__main__': + main() + + + From 621a2f015fde644f6dca0cb88da8dc662ff7a30a Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Mon, 30 Nov 2015 00:46:43 -0200 Subject: [PATCH 07/28] changed Markov.py to markov.py --- code/Markov.py | 102 ------------------------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 code/Markov.py diff --git a/code/Markov.py b/code/Markov.py deleted file mode 100644 index 5a5344b..0000000 --- a/code/Markov.py +++ /dev/null @@ -1,102 +0,0 @@ -"""This module contains a code example related to - -Think Python, 2nd Edition -by Allen Downey -http://thinkpython2.com - -Copyright 2015 Allen Downey - -License: http://creativecommons.org/licenses/by/4.0/ -""" - -from __future__ import print_function, division - - -import sys -import random - -from markov import skip_gutenberg_header, shift - - -class Markov: - """Encapsulates the statistical summary of a text.""" - - def __init__(self): - self.suffix_map = {} # map from prefixes to a list of suffixes - self.prefix = () # current tuple of words - - def process_file(self, filename, order=2): - """Reads a file and performs Markov analysis. - - filename: string - order: integer number of words in the prefix - - Returns: map from prefix to list of possible suffixes. - """ - fp = open(filename) - skip_gutenberg_header(fp) - - for line in fp: - for word in line.rstrip().split(): - self.process_word(word, order) - - def process_word(self, word, order=2): - """Processes each word. - - word: string - order: integer - - During the first few iterations, all we do is store up the words; - after that we start adding entries to the dictionary. - """ - if len(self.prefix) < order: - self.prefix += (word,) - return - - try: - self.suffix_map[self.prefix].append(word) - except KeyError: - # if there is no entry for this prefix, make one - self.suffix_map[self.prefix] = [word] - - self.prefix = shift(self.prefix, word) - - def random_text(self, n=100): - """Generates random wordsfrom the analyzed text. - - Starts with a random prefix from the dictionary. - - n: number of words to generate - """ - # choose a random prefix (not weighted by frequency) - start = random.choice(list(self.suffix_map.keys())) - - for i in range(n): - suffixes = self.suffix_map.get(start, None) - if suffixes == None: - # if the prefix isn't in map, we got to the end of the - # original text, so we have to start again. - self.random_text(n-i) - return - - # choose a random suffix - word = random.choice(suffixes) - print(word, end=' ') - start = shift(start, word) - - -def main(script, filename='emma.txt', n=100, order=2): - try: - n = int(n) - order = int(order) - except ValueError: - print('Usage: %d filename [# of words] [prefix length]' % script) - else: - markov = Markov() - markov.process_file(filename, order) - markov.random_text(n) - - -if __name__ == '__main__': - main(*sys.argv) - From 719fc2669e0eb125a0fd2e8e6971b12909d3298e Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Mon, 30 Nov 2015 09:33:00 -0200 Subject: [PATCH 08/28] =?UTF-8?q?Hist=C3=B3rico=20do=20Projeto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/README.md b/README.md index a97516a..f839593 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,43 @@ Pense Python 2 Tradução da 2ª edição de Think Python, de Allen Downey. Este repositório contém o código fonte do texto integral, exemplos e exercícios. + +Histórico do projeto +-------------------- + +No início de 1999 o prof. Allen Downey iria ministrar uma terceira turma de programação introdutória com Java, depois de duas tentativas pouco satisfatórias. Então ele resolveu escrever um livro muito menor e mais simples que os livros de Java que conhecia. Assim nasceu "How to Think Like a Computer Scientist" ("Como pensar como um cientista da computação"), publicado por Downey como GNU Free Documentation. + +No ano seguinte, o prof. Jeff Elkner converteu o livro para Python, e em 2001 Downey, Elkner e Chris Meyers publicaram "How to Think Like a Computer Scientist: Learning with Python", também uma publicação livre pela GNU-FDL. + +Por volta de 2003 eu (LR) trabalhava com o prof. Imre Simon na Incubadora Virtual Fapesp, e resolvemos iniciar um mutirão para traduzir o "How to Think Like a Computer Scientist: Learning with Python". Reunimos mais um pessoal online, fizemos um encontro presencial no FISL, e traduzimos o livro nos meses seguintes. O prof. Imre traduziu pessoalmente o capítulo sobre árvores. O que faltou daquela vez foi alguém (eu) assumir a responsabilidade de revisar o livro de ponta a ponta, uniformizando a terminologia e traduzindo alguns pequenos trechos que restaram em inglês por causa de dificuldades na tradução. A incubadora Fapesp saiu do ar, mas o trabalho realizado então está neste repositório: + +https://github.com/PensePython/aprendacompy + +Alguns anos depois, os professores do IME/USP Carlos Hitoshi Morimoto, Jose Coelho de Pina Jr. e José Antonio (não sei o nome completo, perdão), traduziram uma versão interativa de "How to Think Like a Computer Scientist: Learning with Python" e publicaram aqui: + +https://panda.ime.usp.br/pensepy/static/pensepy/index.html + +O código-fonte desta tradução pode ser visto aqui: + +https://github.com/PensePython/pensepython (mas o repositório principal é outro, fora do Github) + +Enquanto isso, Allen Downey foi trabalhar no Olin College onde passou a usar Python como linguagem para ensinar programação e foi aperfeiçoando seu material até lançar o Think Python (O'Reilly, 2012) e agora o Think Python 2ed (O'Reilly, 2015), dessa vez usando uma licença Creative Commons Attribution-NonCommercial 3.0 Unported. + +Fiz um clone do repositório do Think Python 2ed, converti o código-fonte de LaTeX para ReStructuredText (mesmo formado usado nas duas traduções brasileiras anteriores), separei os capítulos e criei um glossário consolidado. O repositório é este: + +https://github.com/PensePython/PensePython2 + +O glossário consolidado em HTML pode ser visto aqui: + +https://pensepython.github.io/C-glossary.html + +E é aqui que a gente se encontra! + +Vamos traduzir o Think Python 2ed para PT-BR com dois objetivos: + +* produzir versões eletrônicas livres em HTML, PDF e ePUB para que o maior número de pessoas possam aprender com este livro maravilhoso + +* produzir uma versão impressa a ser publicada por uma editora de verdade, com ISBN, para que o MEC possa aceitar o Pense Python como livro-texto de introdução à programação no ensino superior em todo o Brasil! + +[ ]s +Luciano From c7093e9f70a4ef6325c8166edf8dde6fe1690f1e Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Mon, 30 Nov 2015 09:34:47 -0200 Subject: [PATCH 09/28] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index f839593..88ccf32 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +============== Pense Python 2 ============== @@ -5,6 +6,7 @@ Tradução da 2ª edição de Think Python, de Allen Downey. Este repositório contém o código fonte do texto integral, exemplos e exercícios. +-------------------- Histórico do projeto -------------------- @@ -12,10 +14,16 @@ No início de 1999 o prof. Allen Downey iria ministrar uma terceira turma de pro No ano seguinte, o prof. Jeff Elkner converteu o livro para Python, e em 2001 Downey, Elkner e Chris Meyers publicaram "How to Think Like a Computer Scientist: Learning with Python", também uma publicação livre pela GNU-FDL. +Primeira tradução brasileira +---------------------------- + Por volta de 2003 eu (LR) trabalhava com o prof. Imre Simon na Incubadora Virtual Fapesp, e resolvemos iniciar um mutirão para traduzir o "How to Think Like a Computer Scientist: Learning with Python". Reunimos mais um pessoal online, fizemos um encontro presencial no FISL, e traduzimos o livro nos meses seguintes. O prof. Imre traduziu pessoalmente o capítulo sobre árvores. O que faltou daquela vez foi alguém (eu) assumir a responsabilidade de revisar o livro de ponta a ponta, uniformizando a terminologia e traduzindo alguns pequenos trechos que restaram em inglês por causa de dificuldades na tradução. A incubadora Fapesp saiu do ar, mas o trabalho realizado então está neste repositório: https://github.com/PensePython/aprendacompy +Segunda tradução brasileira +--------------------------- + Alguns anos depois, os professores do IME/USP Carlos Hitoshi Morimoto, Jose Coelho de Pina Jr. e José Antonio (não sei o nome completo, perdão), traduziram uma versão interativa de "How to Think Like a Computer Scientist: Learning with Python" e publicaram aqui: https://panda.ime.usp.br/pensepy/static/pensepy/index.html @@ -24,6 +32,9 @@ O código-fonte desta tradução pode ser visto aqui: https://github.com/PensePython/pensepython (mas o repositório principal é outro, fora do Github) +Think Python 2ed e a terceira tradução +-------------------------------------- + Enquanto isso, Allen Downey foi trabalhar no Olin College onde passou a usar Python como linguagem para ensinar programação e foi aperfeiçoando seu material até lançar o Think Python (O'Reilly, 2012) e agora o Think Python 2ed (O'Reilly, 2015), dessa vez usando uma licença Creative Commons Attribution-NonCommercial 3.0 Unported. Fiz um clone do repositório do Think Python 2ed, converti o código-fonte de LaTeX para ReStructuredText (mesmo formado usado nas duas traduções brasileiras anteriores), separei os capítulos e criei um glossário consolidado. O repositório é este: From 8b21ecadc123cba18c06c337d7f4524208d49d2b Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Mon, 30 Nov 2015 09:37:05 -0200 Subject: [PATCH 10/28] Update README.md --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 88ccf32..bbf8953 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,18 @@ Pense Python 2 ============== -Tradução da 2ª edição de Think Python, de Allen Downey. +Mutirão para tradução da 2ª edição de Think Python, de Allen Downey. Este repositório contém o código fonte do texto integral, exemplos e exercícios. +-------------- +Como colaborar +-------------- + +Entre no grupo ``pensepython`` no Google Groups, se apresente e pergunte o que há para ser feito: + +https://groups.google.com/forum/?hl=en#!forum/pensepython + -------------------- Histórico do projeto -------------------- From 246d2ff3d1f33afbd5e9003d3daccd75cdae3e66 Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Mon, 30 Nov 2015 09:39:45 -0200 Subject: [PATCH 11/28] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bbf8953..4a72369 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Think Python 2ed e a terceira tradução Enquanto isso, Allen Downey foi trabalhar no Olin College onde passou a usar Python como linguagem para ensinar programação e foi aperfeiçoando seu material até lançar o Think Python (O'Reilly, 2012) e agora o Think Python 2ed (O'Reilly, 2015), dessa vez usando uma licença Creative Commons Attribution-NonCommercial 3.0 Unported. -Fiz um clone do repositório do Think Python 2ed, converti o código-fonte de LaTeX para ReStructuredText (mesmo formado usado nas duas traduções brasileiras anteriores), separei os capítulos e criei um glossário consolidado. O repositório é este: +Fiz um clone do repositório do Think Python 2ed, converti o código-fonte de LaTeX para ReStructuredText (mesmo formato usado nas duas traduções brasileiras anteriores), separei os capítulos e criei um glossário consolidado. O repositório é este: https://github.com/PensePython/PensePython2 From 09a2a630381a0c2478ab2e6fd044f22998c3a200 Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Mon, 30 Nov 2015 09:41:07 -0200 Subject: [PATCH 12/28] Update README.md --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4a72369..c54a490 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,17 @@ Mutirão para tradução da 2ª edição de Think Python, de Allen Downey. Este repositório contém o código fonte do texto integral, exemplos e exercícios. +------------------- +Objetivo do projeto +------------------- + +Vamos traduzir o Think Python 2ed para PT-BR com dois objetivos: + +* Produzir versões eletrônicas livres em HTML, PDF e ePUB para que o maior número de pessoas possam aprender com este livro maravilhoso. + +* Produzir uma versão impressa a ser publicada por uma editora de verdade, com ISBN, para que o MEC possa aceitar o *Pense Python* como livro-texto de introdução à programação no ensino superior em todo o Brasil! + + -------------- Como colaborar -------------- @@ -55,11 +66,5 @@ https://pensepython.github.io/C-glossary.html E é aqui que a gente se encontra! -Vamos traduzir o Think Python 2ed para PT-BR com dois objetivos: - -* produzir versões eletrônicas livres em HTML, PDF e ePUB para que o maior número de pessoas possam aprender com este livro maravilhoso - -* produzir uma versão impressa a ser publicada por uma editora de verdade, com ISBN, para que o MEC possa aceitar o Pense Python como livro-texto de introdução à programação no ensino superior em todo o Brasil! - [ ]s Luciano From db6373ff6f4b6e87d62900b2ad8f7bbec9ed6b99 Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Mon, 30 Nov 2015 09:42:44 -0200 Subject: [PATCH 13/28] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c54a490..49967b0 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ No ano seguinte, o prof. Jeff Elkner converteu o livro para Python, e em 2001 Do Primeira tradução brasileira ---------------------------- -Por volta de 2003 eu (LR) trabalhava com o prof. Imre Simon na Incubadora Virtual Fapesp, e resolvemos iniciar um mutirão para traduzir o "How to Think Like a Computer Scientist: Learning with Python". Reunimos mais um pessoal online, fizemos um encontro presencial no FISL, e traduzimos o livro nos meses seguintes. O prof. Imre traduziu pessoalmente o capítulo sobre árvores. O que faltou daquela vez foi alguém (eu) assumir a responsabilidade de revisar o livro de ponta a ponta, uniformizando a terminologia e traduzindo alguns pequenos trechos que restaram em inglês por causa de dificuldades na tradução. A incubadora Fapesp saiu do ar, mas o trabalho realizado então está neste repositório: +Por volta de 2003 eu (LR) trabalhava com o prof. Imre Simon do IME/USP na Incubadora Virtual Fapesp, e resolvemos iniciar um mutirão para traduzir o "How to Think Like a Computer Scientist: Learning with Python". Reunimos mais um pessoal online, fizemos um encontro presencial no FISL, e traduzimos o livro nos meses seguintes. O prof. Imre traduziu pessoalmente o capítulo sobre árvores. O que faltou daquela vez foi alguém (eu) assumir a responsabilidade de revisar o livro de ponta a ponta, uniformizando a terminologia e traduzindo alguns pequenos trechos que restaram em inglês por causa de dificuldades na tradução. A incubadora Fapesp saiu do ar, mas o trabalho realizado então está neste repositório: https://github.com/PensePython/aprendacompy From 57a5c008c0567e66001856cf1222c1b8d1fab18d Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Mon, 30 Nov 2015 11:30:44 -0200 Subject: [PATCH 14/28] added support to csv translation on a per-entry basis --- book/C-glossary.rst | 252 +++++++++++----------- book/glossary/01.txt | 63 ------ book/glossary/02.txt | 57 ----- book/glossary/03.txt | 66 ------ book/glossary/04.txt | 33 --- book/glossary/05.txt | 45 ---- book/glossary/06.txt | 15 -- book/glossary/07.txt | 24 --- book/glossary/08.txt | 36 ---- book/glossary/09.txt | 9 - tools/glossary.csv | 466 ++++++++++++++++++++-------------------- tools/glossary.ods | Bin 53817 -> 0 bytes tools/split_glossary.py | 8 +- 13 files changed, 364 insertions(+), 710 deletions(-) delete mode 100644 tools/glossary.ods diff --git a/book/C-glossary.rst b/book/C-glossary.rst index 0557a22..626b135 100644 --- a/book/C-glossary.rst +++ b/book/C-glossary.rst @@ -12,28 +12,28 @@ com definições diferentes, de acordo com o contexto. acumulador (*accumulator*) :ref:`[10] ` A variable used in a loop to add up or accumulate a result. -algoritmo (*algorithm*) :ref:`[7] ` +algoritmo (*algorithm*) :ref:`[7] ` A general process for solving a category of problems. *aliasing* (“apelidamento”) :ref:`[10] ` A circumstance where two or more variables refer to the same object. -analisar (*parse*) :ref:`[1] ` +analisar (*parse*) :ref:`[1] ` To examine a program and analyze the syntactic structure. análise de algoritmos (*analysis of algorithms*) :ref:`[B] ` A way to compare algorithms in terms of their run time and/or space requirements. -argumento nomeado (*keyword argument*) :ref:`[4] ` +argumento nomeado (*keyword argument*) :ref:`[4] ` An argument that includes the name of the parameter as a “keyword”. -argumento opcional (*optional argument*) :ref:`[8] ` +argumento opcional (*optional argument*) :ref:`[8] ` A function or method argument that is not required. argumento posicional (*positional argument*) :ref:`[17] ` An argument that does not include a parameter name, so it is not a keyword argument. -argumento (*argument*) :ref:`[3] ` +argumento (*argument*) :ref:`[3] ` A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function. arquivo-texto (*text file*) :ref:`[14] ` @@ -42,13 +42,13 @@ arquivo-texto (*text file*) :ref:`[14] ` ``assert``, instrução (``assert`` *statement*) :ref:`[16] ` A statement that check a condition and raises an exception if it fails. -assinatura (*interface*) :ref:`[4] ` +assinatura (*interface*) :ref:`[4] ` A description of how to use a function, including the name and descriptions of the arguments and return value. atribuição combinada (*augmented assignment*) :ref:`[10] ` A statement that updates the value of a variable using an operator like ``+=``. -atribuição (*assignment*) :ref:`[2] ` +atribuição (*assignment*) :ref:`[2] ` A statement that assigns a value to a variable. atributo de classe (*class attribute*) :ref:`[18] ` @@ -60,31 +60,31 @@ atributo de instância (*instance attribute*) :ref:`[18] ` atributo (*attribute*) :ref:`[15] ` One of the named values associated with an object. -atualização (*update*) :ref:`[7] ` +atualização (*update*) :ref:`[7] ` An assignment where the new value of the variable depends on the old. -avaliar (*evaluate*) :ref:`[2] ` +avaliar (*evaluate*) :ref:`[2] ` To simplify an expression by performing the operations in order to yield a single value. banco de dados (*database*) :ref:`[14] ` A file whose contents are organized like a dictionary with keys that correspond to values. -*bug* :ref:`[1] ` +*bug* :ref:`[1] ` An error in a program. busca invertida (*reverse lookup*) :ref:`[11] ` A dictionary operation that takes a value and finds one or more keys that map to it. -busca (*search*) :ref:`[8] ` - A pattern of traversal that stops when it finds what it is looking for. - busca (*lookup*) :ref:`[11] ` A dictionary operation that takes a key and finds the corresponding value. +busca (*search*) :ref:`[8] ` + A pattern of traversal that stops when it finds what it is looking for. + busca (*search*) :ref:`[B] ` The problem of locating an element of a collection (like a list or dictionary) or determining that it is not present. -cabeçalho (*header*) :ref:`[3] ` +cabeçalho (*header*) :ref:`[3] ` The first line of a function definition. caminho absoluto (*absolute path*) :ref:`[14] ` @@ -102,13 +102,13 @@ capturar (*catch*) :ref:`[14] ` cardinalidade (*multiplicity*) :ref:`[18] ` A notation in a class diagram that shows, for a HAS-A relationship, how many references there are to instances of another class. -caso base (*base case*) :ref:`[5] ` +caso base (*base case*) :ref:`[5] ` A conditional branch in a recursive function that does not make a recursive call. -caso especial (*special case*) :ref:`[9] ` +caso especial (*special case*) :ref:`[9] ` A test case that is atypical or non-obvious (and less likely to be handled correctly). -chamada de função (*function call*) :ref:`[3] ` +chamada de função (*function call*) :ref:`[3] ` A statement that runs a function. It consists of the function name followed by an argument list in parentheses. chave (*key*) :ref:`[11] ` @@ -126,34 +126,34 @@ classe (*class*) :ref:`[15] ` codificar (*encode*) :ref:`[18] ` To represent one set of values using another set of values by constructing a mapping between them. -código morto (*dead code*) :ref:`[6] ` +código morto (*dead code*) :ref:`[6] ` Part of a program that can never run, often because it appears after a return statement. -código provisório (*scaffolding*) :ref:`[6] ` +código provisório (*scaffolding*) :ref:`[6] ` Code that is used during program development but is not part of the final version. -código provisório (*slice*) :ref:`[8] ` +código provisório (*slice*) :ref:`[8] ` A part of a string specified by a range of indices. -comentário (*comment*) :ref:`[2] ` +comentário (*comment*) :ref:`[2] ` Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program. -composição (*composition*) :ref:`[3] ` +composição (*composition*) :ref:`[3] ` Using an expression as part of a larger expression, or a statement as part of a larger statement. -concatenar (*concatenate*) :ref:`[2] ` +concatenar (*concatenate*) :ref:`[2] ` To join two operands end-to-end. -condição (*condition*) :ref:`[5] ` +condição (*condition*) :ref:`[5] ` The boolean expression in a conditional statement that determines which branch runs. -condicional aninhado (*nested conditional*) :ref:`[5] ` +condicional aninhado (*nested conditional*) :ref:`[5] ` A conditional statement that appears in one of the branches of another conditional statement. -condicional encadeado (*chained conditional*) :ref:`[5] ` +condicional encadeado (*chained conditional*) :ref:`[5] ` A conditional statement with a series of alternative branches. -contador (*counter*) :ref:`[8] ` +contador (*counter*) :ref:`[8] ` A variable used to count something, usually initialized to zero and then incremented. cópia profunda (*deep copy*) :ref:`[15] ` @@ -162,16 +162,16 @@ cópia profunda (*deep copy*) :ref:`[15] ` cópia rasa (*shallow copy*) :ref:`[15] ` To copy the contents of an object, including any references to embedded objects; implemented by the copy function in the copy module. -corpo (*body*) :ref:`[3] ` +corpo (*body*) :ref:`[3] ` The sequence of statements inside a function definition. declaração (*declaration*) :ref:`[11] ` A statement like global that tells the interpreter something about a variable. -decrementar (*decrement*) :ref:`[7] ` +decrementar (*decrement*) :ref:`[7] ` An update that decreases the value of a variable. -definição de função (*function definition*) :ref:`[3] ` +definição de função (*function definition*) :ref:`[3] ` A statement that creates a new function, specifying its name, parameters, and the statements it contains. delimitador (*delimiter*) :ref:`[10] ` @@ -183,13 +183,13 @@ dependência (*dependency*) :ref:`[18] ` depuração com patinho de borracha (*rubber duck debugging*) :ref:`[13] ` Debugging by explaining your problem to an inanimate object such as a rubber duck. Articulating the problem can help you solve it, even if the rubber duck doesn’t know Python. -depuração (*debugging*) :ref:`[1] ` +depuração (*debugging*) :ref:`[1] ` The process of finding and correcting bugs. desempacotamento de tupla (*tuple assignment*) :ref:`[12] ` An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left. -desenvolvimento incremental (*incremental development*) :ref:`[6] ` +desenvolvimento incremental (*incremental development*) :ref:`[6] ` A program development plan intended to avoid debugging by adding and testing only a small amount of code at a time. desenvolvimento planejado (*designed development*) :ref:`[16] ` @@ -198,7 +198,7 @@ desenvolvimento planejado (*designed development*) :ref:`[16] ` despacho por tipo (*type-based dispatch*) :ref:`[17] ` A programming pattern that checks the type of an operand and invokes different functions for different types. -desvio (*branch*) :ref:`[5] ` +desvio (*branch*) :ref:`[5] ` One of the alternative sequences of statements in a conditional statement. determinístico (*deterministic*) :ref:`[13] ` @@ -210,13 +210,13 @@ diagrama de chamadas (*call graph*) :ref:`[11] ` diagrama de classe (*class diagram*) :ref:`[18] ` A diagram that shows the classes in a program and the relationships between them. -diagrama de estado (*state diagram*) :ref:`[2] ` +diagrama de estado (*state diagram*) :ref:`[2] ` A graphical representation of a set of variables and the values they refer to. diagrama de objetos (*object diagram*) :ref:`[15] ` A diagram that shows objects, their attributes, and the values of the attributes. -diagrama de pilha (*stack diagram*) :ref:`[3] ` +diagrama de pilha (*stack diagram*) :ref:`[3] ` A graphical representation of a stack of functions, their variables, and the values they refer to. dicionário (*dictionary*) :ref:`[11] ` @@ -225,10 +225,10 @@ dicionário (*dictionary*) :ref:`[11] ` diretório (*directory*) :ref:`[14] ` A named collection of files, also called a folder. -divisão pelo piso (*floor division*) :ref:`[5] ` +divisão pelo piso (*floor division*) :ref:`[5] ` An operator, denoted //, that divides two numbers and rounds down (toward zero) to an integer. -*docstring* :ref:`[4] ` +*docstring* :ref:`[4] ` A string that appears at the top of a function definition to document the function’s interface. elemento (*element*) :ref:`[10] ` @@ -237,16 +237,16 @@ elemento (*element*) :ref:`[10] ` encapsulamento de dados (*data encapsulation*) :ref:`[18] ` A program development plan that involves a prototype using global variables and a final version that makes the global variables into instance attributes. -encapsulamento (*encapsulation*) :ref:`[4] ` +encapsulamento (*encapsulation*) :ref:`[4] ` The process of transforming a sequence of statements into a function definition. equivalente (*equivalent*) :ref:`[10] ` Having the same value. -erro semântico (*semantic error*) :ref:`[2] ` +erro semântico (*semantic error*) :ref:`[2] ` An error in a program that makes it do something other than what the programmer intended. -erro sintático (*syntax error*) :ref:`[2] ` +erro sintático (*syntax error*) :ref:`[2] ` An error in a program that makes it impossible to parse (and therefore impossible to interpret). errro estrutural (*shape error*) :ref:`[12] ` @@ -255,16 +255,16 @@ errro estrutural (*shape error*) :ref:`[12] ` estrutura de dados (*data structure*) :ref:`[12] ` A collection of related values, often organized in lists, dictionaries, tuples, etc. -exceção (*exception*) :ref:`[2] ` +exceção (*exception*) :ref:`[2] ` An error that is detected while the program is running. -executar (*execute*) :ref:`[2] ` +executar (*execute*) :ref:`[2] ` To run a statement and do what it says. explodir (*scatter*) :ref:`[12] ` The operation of treating a sequence as a list of arguments. -expressão booleana (*boolean expression*) :ref:`[5] ` +expressão booleana (*boolean expression*) :ref:`[5] ` An expression whose value is either True or False. expressão condicional (*conditional expression*) :ref:`[19] ` @@ -273,7 +273,7 @@ expressão condicional (*conditional expression*) :ref:`[19] ` expressão geradora (*generator expression*) :ref:`[19] ` An expression with a for loop in parentheses that yields a generator object. -expressão (*expression*) :ref:`[2] ` +expressão (*expression*) :ref:`[2] ` A combination of variables, operators, and values that represents a single result. fachada (*veneer*) :ref:`[18] ` @@ -288,31 +288,31 @@ filtro (*filter*) :ref:`[10] ` *flag* (“indicador”) :ref:`[11] ` A boolean variable used to indicate whether a condition is true. -fluxo de execução (*flow of execution*) :ref:`[3] ` +fluxo de execução (*flow of execution*) :ref:`[3] ` The order statements run in. -*frame* () :ref:`[3] ` +*frame* () :ref:`[3] ` A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function. função de hash (*hash function*) :ref:`[11] ` A function used by a hashtable to compute the location for a key. -função produtiva (*fruitful function*) :ref:`[3] ` +função produtiva (*fruitful function*) :ref:`[3] ` A function that returns a value. função pura (*pure function*) :ref:`[16] ` A function that does not modify any of the objects it receives as arguments. Most pure functions are fruitful. -função (*function*) :ref:`[3] ` +função (*function*) :ref:`[3] ` A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result. -generalização (*generalization*) :ref:`[4] ` +generalização (*generalization*) :ref:`[4] ` The process of replacing something unnecessarily specific (like a number) with something appropriately general (like a variable or parameter). ``global``, declaração (``global`` *statement*) :ref:`[11] ` A statement that declares a variable name global. -guarda (*guardian*) :ref:`[6] ` +guarda (*guardian*) :ref:`[6] ` A programming pattern that uses a conditional statement to check for and handle circumstances that might cause an error. *hashable* () :ref:`[11] ` @@ -327,19 +327,19 @@ idêntico (*identical*) :ref:`[10] ` implementação (*implementation*) :ref:`[11] ` A way of performing a computation. -``import``, instrução (``import`` *statement*) :ref:`[3] ` +``import``, instrução (``import`` *statement*) :ref:`[3] ` A statement that reads a module file and creates a module object. -imutável (*immutable*) :ref:`[8] ` +imutável (*immutable*) :ref:`[8] ` The property of a sequence whose items cannot be changed. -incrementar (*increment*) :ref:`[7] ` +incrementar (*increment*) :ref:`[7] ` An update that increases the value of a variable (often by one). -índice (*index*) :ref:`[8] ` +índice (*index*) :ref:`[8] ` An integer value used to select an item in a sequence, such as a character in a string. In Python indices start from 0. -inicialização (*initialization*) :ref:`[7] ` +inicialização (*initialization*) :ref:`[7] ` An assignment that gives an initial value to a variable that will be updated. instanciar (*instantiate*) :ref:`[15] ` @@ -348,58 +348,58 @@ instanciar (*instantiate*) :ref:`[15] ` instância (*instance*) :ref:`[15] ` An object that belongs to a class. -instrução composta (*compound statement*) :ref:`[5] ` +instrução composta (*compound statement*) :ref:`[5] ` A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header. -instrução condicional (*conditional statement*) :ref:`[5] ` +instrução condicional (*conditional statement*) :ref:`[5] ` A statement that controls the flow of execution depending on some condition. -instrução (*statement*) :ref:`[2] ` +instrução (*statement*) :ref:`[2] ` A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements. -inteiro (*integer*) :ref:`[1] ` +inteiro (*integer*) :ref:`[1] ` A type that represents whole numbers. -interpretador (*interpreter*) :ref:`[1] ` +interpretador (*interpreter*) :ref:`[1] ` A program that reads another program and executes it invariante (*invariant*) :ref:`[16] ` A condition that should always be true during the execution of a program. -invocação (*invocation*) :ref:`[8] ` +invocação (*invocation*) :ref:`[8] ` A statement that calls a method. -*item* (item) :ref:`[8] ` - One of the values in a sequence. - *item* (item) :ref:`[11] ` In a dictionary, another name for a key-value pair. -iteração (*iteration*) :ref:`[7] ` +*item* (item) :ref:`[8] ` + One of the values in a sequence. + +iteração (*iteration*) :ref:`[7] ` Repeated execution of a set of statements using either a recursive function call or a loop. iterador (*iterator*) :ref:`[12] ` An object that can iterate through a sequence, but which does not provide list operators and methods. -laço infinito (*infinite loop*) :ref:`[7] ` +laço infinito (*infinite loop*) :ref:`[7] ` A loop in which the terminating condition is never satisfied. -laço (*loop*) :ref:`[4] ` +laço (*loop*) :ref:`[4] ` A part of a program that can run repeatedly. *linear* (linear) :ref:`[B] ` An algorithm whose run time is proportional to problem size, at least for large problem sizes. -linguagem de alto nível (*high-level language*) :ref:`[1] ` +linguagem de alto nível (*high-level language*) :ref:`[1] ` A programming language like Python that is designed to be easy for humans to read and write. -linguagem de baixo nível (*low-level language*) :ref:`[1] ` +linguagem de baixo nível (*low-level language*) :ref:`[1] ` A programming language that is designed to be easy for a computer to run; also called “machine language” or “assembly language”. -linguagem formal (*formal language*) :ref:`[1] ` +linguagem formal (*formal language*) :ref:`[1] ` Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages. -linguagem natural (*natural language*) :ref:`[1] ` +linguagem natural (*natural language*) :ref:`[1] ` Any one of the languages that people speak that evolved naturally. linguagem orientada a objetos (*object-oriented language*) :ref:`[17] ` @@ -426,37 +426,37 @@ máquina-modelo (*machine model*) :ref:`[B] ` *memo* (“lembrete”) :ref:`[11] ` A computed value stored to avoid unnecessary future computation. -método (*method*) :ref:`[4] ` - A function that is associated with an object and called using dot notation. - método (*method*) :ref:`[17] ` A function that is defined inside a class definition and is invoked on instances of that class. +método (*method*) :ref:`[4] ` + A function that is associated with an object and called using dot notation. + modificadora (*modifier*) :ref:`[16] ` A function that changes one or more of the objects it receives as arguments. Most modifiers are void; that is, they return None. -modo de script (*script mode*) :ref:`[2] ` +modo de script (*script mode*) :ref:`[2] ` A way of using the Python interpreter to read code from a script and run it. -modo interativo (*interactive mode*) :ref:`[2] ` +modo interativo (*interactive mode*) :ref:`[2] ` A way of using the Python interpreter by typing code at the prompt. -módulo (*module*) :ref:`[3] ` +módulo (*module*) :ref:`[3] ` A file that contains a collection of related functions and other definitions. *multiset* (“multi-conjunto”) :ref:`[19] ` A mathematical entity that represents a mapping between the elements of a set and the number of times they appear. -``None`` :ref:`[3] ` +``None`` :ref:`[3] ` A special value returned by void functions. notação assintótica (*Big-Oh notation*) :ref:`[B] ` Notation for representing an order of growth; for example, :math:`O(n)` represents the set of functions that grow linearly. -notação de ponto (*dot notation*) :ref:`[3] ` +notação de ponto (*dot notation*) :ref:`[3] ` The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name. -objeto-arquivo (*file object*) :ref:`[9] ` +objeto-arquivo (*file object*) :ref:`[9] ` A value that represents an open file. objeto ``bytes`` (``bytes`` *object*) :ref:`[14] ` @@ -468,10 +468,10 @@ objeto-classe (*class object*) :ref:`[15] ` objeto embutido (*embedded object*) :ref:`[15] ` An object that is stored as an attribute of another object. -objeto-função (*function object*) :ref:`[3] ` +objeto-função (*function object*) :ref:`[3] ` A value created by a function definition. The name of the function is a variable that refers to a function object. -objeto-módulo (*module object*) :ref:`[3] ` +objeto-módulo (*module object*) :ref:`[3] ` A value created by an import statement that provides access to the values defined in a module. objeto “pipe” (*pipe object*) :ref:`[14] ` @@ -480,49 +480,49 @@ objeto “pipe” (*pipe object*) :ref:`[14] ` objeto ``zip`` (``zip`` *object*) :ref:`[12] ` The result of calling a built-in function zip; an object that iterates through a sequence of tuples. -objeto (*object*) :ref:`[8] ` - Something a variable can refer to. For now, you can use “object” and “value” interchangeably. - objeto (*object*) :ref:`[10] ` Something a variable can refer to. An object has a type and a value. +objeto (*object*) :ref:`[8] ` + Something a variable can refer to. For now, you can use “object” and “value” interchangeably. + ocultação de informações (*information hiding*) :ref:`[17] ` The principle that the interface provided by an object should not depend on its implementation, in particular the representation of its attributes. operador de formatação (*format operator*) :ref:`[14] ` An operator, %, that takes a format string and a tuple and generates a string that includes the elements of the tuple formatted as specified by the format string. -operador de módulo (*modulus operator*) :ref:`[5] ` +operador de módulo (*modulus operator*) :ref:`[5] ` An operator, denoted with a percent sign (%), that works on integers and returns the remainder when one number is divided by another. -operador lógico (*logical operator*) :ref:`[5] ` +operador lógico (*logical operator*) :ref:`[5] ` One of the operators that combines boolean expressions: and, or, and not. -operador relacional (*relational operator*) :ref:`[5] ` +operador relacional (*relational operator*) :ref:`[5] ` One of the operators that compares its operands: ==, !=, >, <, >=, and <=. -operador (*operator*) :ref:`[1] ` +operador (*operator*) :ref:`[1] ` A special symbol that represents a simple computation like addition, multiplication, or string concatenation. -operando (*operand*) :ref:`[2] ` +operando (*operand*) :ref:`[2] ` One of the values on which an operator operates. -ordem das operações (*order of operations*) :ref:`[2] ` +ordem das operações (*order of operations*) :ref:`[2] ` Rules governing the order in which expressions involving multiple operators and operands are evaluated. ordem de crescimento (*order of growth*) :ref:`[B] ` A set of functions that all grow in a way considered equivalent for purposes of analysis of algorithms. For example, all functions that grow linearly belong to the same order of growth. -palavra-chave (*keyword*) :ref:`[2] ` +palavra-chave (*keyword*) :ref:`[2] ` A reserved word that is used to parse a program; you cannot use keywords like if, def, and while as variable names. -parâmetro (*parameter*) :ref:`[3] ` +parâmetro (*parameter*) :ref:`[3] ` A name used inside a function to refer to the value passed as an argument. par chave-valor (*key-value pair*) :ref:`[11] ` The representation of the mapping from a key to a value. -percorrer (*traverse*) :ref:`[8] ` +percorrer (*traverse*) :ref:`[8] ` To iterate through the items in a sequence, performing a similar operation on each. persistente (*persistent*) :ref:`[14] ` @@ -531,7 +531,7 @@ persistente (*persistent*) :ref:`[14] ` pior caso (*worst case*) :ref:`[B] ` The input that makes a given algorithm run slowest (or require the most space. -plano de desenvolvimento (*development plan*) :ref:`[4] ` +plano de desenvolvimento (*development plan*) :ref:`[4] ` A process for writing programs. polimórfico (*polymorphic*) :ref:`[17] ` @@ -540,25 +540,25 @@ polimórfico (*polymorphic*) :ref:`[17] ` ponto de cruzamento (*crossover point*) :ref:`[B] ` The problem size where two algorithms require the same run time or space. -ponto-flutuante (*floating-point*) :ref:`[1] ` +ponto-flutuante (*floating-point*) :ref:`[1] ` A type that represents numbers with fractional parts. -portabilidade (*portability*) :ref:`[1] ` +portabilidade (*portability*) :ref:`[1] ` A property of a program that can run on more than one kind of computer. -pós-condição (*postcondition*) :ref:`[4] ` +pós-condição (*postcondition*) :ref:`[4] ` A requirement that should be satisfied by the function before it ends. -pré-condição (*precondition*) :ref:`[4] ` +pré-condição (*precondition*) :ref:`[4] ` A requirement that should be satisfied by the caller before a function starts. -``print``, instrução (``print`` *statement*) :ref:`[1] ` +``print``, instrução (``print`` *statement*) :ref:`[1] ` An instruction that causes the Python interpreter to display a value on the screen. -procedimento (*void function*) :ref:`[3] ` +procedimento (*void function*) :ref:`[3] ` A function that always returns None. -programação funcional (*program*) :ref:`[1] ` +programação funcional (*program*) :ref:`[1] ` A set of instructions that specifies a computation. programação funcional (*functional programming style*) :ref:`[16] ` @@ -567,7 +567,7 @@ programação funcional (*functional programming style*) :ref:`[16] programação orientada a objetos (*object-oriented programming*) :ref:`[17] ` A style of programming in which data and the operations that manipulate it are organized into classes and methods. -*prompt* (“sinal de pronto”) :ref:`[1] ` +*prompt* (“sinal de pronto”) :ref:`[1] ` Characters displayed by the interpreter to indicate that it is ready to take input from the user. prototipar e ajustar (*prototype and patch*) :ref:`[16] ` @@ -582,22 +582,22 @@ quadrático (*quadratic*) :ref:`[B] ` ``raise``, instrução (``raise`` *statement*) :ref:`[11] ` A statement that (deliberately) raises an exception. -reatribuição (*reassignment*) :ref:`[7] ` +reatribuição (*reassignment*) :ref:`[7] ` Assigning a new value to a variable that already exists. -recursão infinita (*infinite recursion*) :ref:`[5] ` +recursão infinita (*infinite recursion*) :ref:`[5] ` A recursion that doesn’t have a base case, or never reaches it. Eventually, an infinite recursion causes a runtime error. -recursão (*recursion*) :ref:`[5] ` +recursão (*recursion*) :ref:`[5] ` The process of calling the function that is currently executing. -redução a um problema resolvido (*reduction to a previously solved problem*) :ref:`[9] ` +redução a um problema resolvido (*reduction to a previously solved problem*) :ref:`[9] ` A way of solving a problem by expressing it as an instance of a previously solved problem. reduzir (*reduce*) :ref:`[10] ` A processing pattern that traverses a sequence and accumulates the elements into a single result. -refatoração (*refactoring*) :ref:`[4] ` +refatoração (*refactoring*) :ref:`[4] ` The process of modifying a working program to improve function interfaces and other qualities of the code. referência (*reference*) :ref:`[10] ` @@ -609,31 +609,31 @@ relação É-UM (*IS-A relationship*) :ref:`[18] ` relação TEM-UM (*HAS-A relationship*) :ref:`[18] ` A relationship between two classes where instances of one class contain references to instances of the other. -``return``, instrução (``return`` *statement*) :ref:`[5] ` +``return``, instrução (``return`` *statement*) :ref:`[5] ` A statement that causes a function to end immediately and return to the caller. reunir (*gather*) :ref:`[12] ` The operation of assembling a variable-length argument tuple. -*script* :ref:`[2] ` +*script* :ref:`[2] ` A program stored in a file. -semântica (*semantics*) :ref:`[2] ` +semântica (*semantics*) :ref:`[2] ` The meaning of a program. -sequência de formatação (*sequence*) :ref:`[8] ` - An ordered collection of values where each value is identified by an integer index. - sequência de formatação (*format sequence*) :ref:`[14] ` A sequence of characters in a format string, like %d, that specifies how a value should be formatted. +sequência de formatação (*sequence*) :ref:`[8] ` + An ordered collection of values where each value is identified by an integer index. + *shell* :ref:`[14] ` A program that allows users to type commands and then executes them by starting other programs. *singleton* :ref:`[11] ` A list (or other sequence) with a single element. -sintaxe (*syntax*) :ref:`[1] ` +sintaxe (*syntax*) :ref:`[1] ` The rules that govern the structure of a program. sobrecarga de operadores (*operator overloading*) :ref:`[17] ` @@ -642,16 +642,16 @@ sobrecarga de operadores (*operator overloading*) :ref:`[17] ` sobrepor (*override*) :ref:`[13] ` To replace a default value with an argument. -solução de problemas (*problem solving*) :ref:`[1] ` +solução de problemas (*problem solving*) :ref:`[1] ` The process of formulating a problem, finding a solution, and expressing it. string de formatação (*format string*) :ref:`[14] ` A string, used with the format operator, that contains format sequences. -string vazia (*empty string*) :ref:`[8] ` +string vazia (*empty string*) :ref:`[8] ` A string with no characters and length 0, represented by two quotation marks. -*string* (“cadeia de caracteres”) :ref:`[1] ` +*string* (“cadeia de caracteres”) :ref:`[1] ` A type that represents sequences of characters. sujeito (*subject*) :ref:`[17] ` @@ -669,13 +669,13 @@ termo dominante (*leading term*) :ref:`[B] ` teste de desempenho (*benchmarking*) :ref:`[13] ` The process of choosing between data structures by implementing alternatives and testing them on a sample of the possible inputs. -tipo (*type*) :ref:`[1] ` +tipo (*type*) :ref:`[1] ` A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str). -*token* (“símbolo”) :ref:`[1] ` +*token* (“símbolo”) :ref:`[1] ` One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language. -*traceback* () :ref:`[3] ` +*traceback* () :ref:`[3] ` A list of the functions that are executing, printed when an exception occurs. tupla (*tuple*) :ref:`[12] ` @@ -684,10 +684,10 @@ tupla (*tuple*) :ref:`[12] ` valor default (*default value*) :ref:`[13] ` The value given to an optional parameter if no argument is provided. -valor devolvido (*return value*) :ref:`[3] ` +valor devolvido (*return value*) :ref:`[3] ` The result of a function. If a function call is used as an expression, the return value is the value of the expression. -valor (*value*) :ref:`[1] ` +valor (*value*) :ref:`[1] ` One of the basic units of data, like a number or string, that a program manipulates. valor (*value*) :ref:`[11] ` @@ -696,12 +696,12 @@ valor (*value*) :ref:`[11] ` variável global (*global variable*) :ref:`[11] ` A variable defined outside a function. Global variables can be accessed from any function. -variável local (*local variable*) :ref:`[3] ` +variável local (*local variable*) :ref:`[3] ` A variable defined inside a function. A local variable can only be used inside its function. -variável temporária (*temporary variable*) :ref:`[6] ` +variável temporária (*temporary variable*) :ref:`[6] ` A variable used to store an intermediate value in a complex calculation. -variável (*variable*) :ref:`[2] ` +variável (*variable*) :ref:`[2] ` A name that refers to a value. diff --git a/book/glossary/01.txt b/book/glossary/01.txt index 13aecf8..e69de29 100644 --- a/book/glossary/01.txt +++ b/book/glossary/01.txt @@ -1,63 +0,0 @@ -solução de problemas (*problem solving*) - The process of formulating a problem, finding a solution, and expressing it. - -linguagem de alto nível (*high-level language*) - A programming language like Python that is designed to be easy for humans to read and write. - -linguagem de baixo nível (*low-level language*) - A programming language that is designed to be easy for a computer to run; also called “machine language” or “assembly language”. - -portabilidade (*portability*) - A property of a program that can run on more than one kind of computer. - -interpretador (*interpreter*) - A program that reads another program and executes it - -*prompt* (“sinal de pronto”) - Characters displayed by the interpreter to indicate that it is ready to take input from the user. - -programação funcional (*program*) - A set of instructions that specifies a computation. - -``print``, instrução (``print`` *statement*) - An instruction that causes the Python interpreter to display a value on the screen. - -operador (*operator*) - A special symbol that represents a simple computation like addition, multiplication, or string concatenation. - -valor (*value*) - One of the basic units of data, like a number or string, that a program manipulates. - -tipo (*type*) - A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str). - -inteiro (*integer*) - A type that represents whole numbers. - -ponto-flutuante (*floating-point*) - A type that represents numbers with fractional parts. - -*string* (“cadeia de caracteres”) - A type that represents sequences of characters. - -linguagem natural (*natural language*) - Any one of the languages that people speak that evolved naturally. - -linguagem formal (*formal language*) - Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages. - -*token* (“símbolo”) - One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language. - -sintaxe (*syntax*) - The rules that govern the structure of a program. - -analisar (*parse*) - To examine a program and analyze the syntactic structure. - -*bug* - An error in a program. - -depuração (*debugging*) - The process of finding and correcting bugs. - diff --git a/book/glossary/02.txt b/book/glossary/02.txt index e2d387f..e69de29 100644 --- a/book/glossary/02.txt +++ b/book/glossary/02.txt @@ -1,57 +0,0 @@ -variável (*variable*) - A name that refers to a value. - -atribuição (*assignment*) - A statement that assigns a value to a variable. - -diagrama de estado (*state diagram*) - A graphical representation of a set of variables and the values they refer to. - -palavra-chave (*keyword*) - A reserved word that is used to parse a program; you cannot use keywords like if, def, and while as variable names. - -operando (*operand*) - One of the values on which an operator operates. - -expressão (*expression*) - A combination of variables, operators, and values that represents a single result. - -avaliar (*evaluate*) - To simplify an expression by performing the operations in order to yield a single value. - -instrução (*statement*) - A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements. - -executar (*execute*) - To run a statement and do what it says. - -modo interativo (*interactive mode*) - A way of using the Python interpreter by typing code at the prompt. - -modo de script (*script mode*) - A way of using the Python interpreter to read code from a script and run it. - -*script* - A program stored in a file. - -ordem das operações (*order of operations*) - Rules governing the order in which expressions involving multiple operators and operands are evaluated. - -concatenar (*concatenate*) - To join two operands end-to-end. - -comentário (*comment*) - Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program. - -erro sintático (*syntax error*) - An error in a program that makes it impossible to parse (and therefore impossible to interpret). - -exceção (*exception*) - An error that is detected while the program is running. - -semântica (*semantics*) - The meaning of a program. - -erro semântico (*semantic error*) - An error in a program that makes it do something other than what the programmer intended. - diff --git a/book/glossary/03.txt b/book/glossary/03.txt index 2d3fb0e..e69de29 100644 --- a/book/glossary/03.txt +++ b/book/glossary/03.txt @@ -1,66 +0,0 @@ -função (*function*) - A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result. - -definição de função (*function definition*) - A statement that creates a new function, specifying its name, parameters, and the statements it contains. - -objeto-função (*function object*) - A value created by a function definition. The name of the function is a variable that refers to a function object. - -cabeçalho (*header*) - The first line of a function definition. - -corpo (*body*) - The sequence of statements inside a function definition. - -parâmetro (*parameter*) - A name used inside a function to refer to the value passed as an argument. - -chamada de função (*function call*) - A statement that runs a function. It consists of the function name followed by an argument list in parentheses. - -argumento (*argument*) - A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function. - -variável local (*local variable*) - A variable defined inside a function. A local variable can only be used inside its function. - -valor devolvido (*return value*) - The result of a function. If a function call is used as an expression, the return value is the value of the expression. - -função produtiva (*fruitful function*) - A function that returns a value. - -procedimento (*void function*) - A function that always returns None. - -``None`` - A special value returned by void functions. - -módulo (*module*) - A file that contains a collection of related functions and other definitions. - -``import``, instrução (``import`` *statement*) - A statement that reads a module file and creates a module object. - -objeto-módulo (*module object*) - A value created by an import statement that provides access to the values defined in a module. - -notação de ponto (*dot notation*) - The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name. - -composição (*composition*) - Using an expression as part of a larger expression, or a statement as part of a larger statement. - -fluxo de execução (*flow of execution*) - The order statements run in. - -diagrama de pilha (*stack diagram*) - A graphical representation of a stack of functions, their variables, and the values they refer to. - -*frame* () - A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function. - -*traceback* () - A list of the functions that are executing, printed when an exception occurs. - diff --git a/book/glossary/04.txt b/book/glossary/04.txt index acd2484..e69de29 100644 --- a/book/glossary/04.txt +++ b/book/glossary/04.txt @@ -1,33 +0,0 @@ -método (*method*) - A function that is associated with an object and called using dot notation. - -laço (*loop*) - A part of a program that can run repeatedly. - -encapsulamento (*encapsulation*) - The process of transforming a sequence of statements into a function definition. - -generalização (*generalization*) - The process of replacing something unnecessarily specific (like a number) with something appropriately general (like a variable or parameter). - -argumento nomeado (*keyword argument*) - An argument that includes the name of the parameter as a “keyword”. - -assinatura (*interface*) - A description of how to use a function, including the name and descriptions of the arguments and return value. - -refatoração (*refactoring*) - The process of modifying a working program to improve function interfaces and other qualities of the code. - -plano de desenvolvimento (*development plan*) - A process for writing programs. - -*docstring* - A string that appears at the top of a function definition to document the function’s interface. - -pré-condição (*precondition*) - A requirement that should be satisfied by the caller before a function starts. - -pós-condição (*postcondition*) - A requirement that should be satisfied by the function before it ends. - diff --git a/book/glossary/05.txt b/book/glossary/05.txt index 7c512e7..e69de29 100644 --- a/book/glossary/05.txt +++ b/book/glossary/05.txt @@ -1,45 +0,0 @@ -divisão pelo piso (*floor division*) - An operator, denoted //, that divides two numbers and rounds down (toward zero) to an integer. - -operador de módulo (*modulus operator*) - An operator, denoted with a percent sign (%), that works on integers and returns the remainder when one number is divided by another. - -expressão booleana (*boolean expression*) - An expression whose value is either True or False. - -operador relacional (*relational operator*) - One of the operators that compares its operands: ==, !=, >, <, >=, and <=. - -operador lógico (*logical operator*) - One of the operators that combines boolean expressions: and, or, and not. - -instrução condicional (*conditional statement*) - A statement that controls the flow of execution depending on some condition. - -condição (*condition*) - The boolean expression in a conditional statement that determines which branch runs. - -instrução composta (*compound statement*) - A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header. - -desvio (*branch*) - One of the alternative sequences of statements in a conditional statement. - -condicional encadeado (*chained conditional*) - A conditional statement with a series of alternative branches. - -condicional aninhado (*nested conditional*) - A conditional statement that appears in one of the branches of another conditional statement. - -``return``, instrução (``return`` *statement*) - A statement that causes a function to end immediately and return to the caller. - -recursão (*recursion*) - The process of calling the function that is currently executing. - -caso base (*base case*) - A conditional branch in a recursive function that does not make a recursive call. - -recursão infinita (*infinite recursion*) - A recursion that doesn’t have a base case, or never reaches it. Eventually, an infinite recursion causes a runtime error. - diff --git a/book/glossary/06.txt b/book/glossary/06.txt index 9e4d8c2..e69de29 100644 --- a/book/glossary/06.txt +++ b/book/glossary/06.txt @@ -1,15 +0,0 @@ -variável temporária (*temporary variable*) - A variable used to store an intermediate value in a complex calculation. - -código morto (*dead code*) - Part of a program that can never run, often because it appears after a return statement. - -desenvolvimento incremental (*incremental development*) - A program development plan intended to avoid debugging by adding and testing only a small amount of code at a time. - -código provisório (*scaffolding*) - Code that is used during program development but is not part of the final version. - -guarda (*guardian*) - A programming pattern that uses a conditional statement to check for and handle circumstances that might cause an error. - diff --git a/book/glossary/07.txt b/book/glossary/07.txt index a82d5a2..e69de29 100644 --- a/book/glossary/07.txt +++ b/book/glossary/07.txt @@ -1,24 +0,0 @@ -reatribuição (*reassignment*) - Assigning a new value to a variable that already exists. - -atualização (*update*) - An assignment where the new value of the variable depends on the old. - -inicialização (*initialization*) - An assignment that gives an initial value to a variable that will be updated. - -incrementar (*increment*) - An update that increases the value of a variable (often by one). - -decrementar (*decrement*) - An update that decreases the value of a variable. - -iteração (*iteration*) - Repeated execution of a set of statements using either a recursive function call or a loop. - -laço infinito (*infinite loop*) - A loop in which the terminating condition is never satisfied. - -algoritmo (*algorithm*) - A general process for solving a category of problems. - diff --git a/book/glossary/08.txt b/book/glossary/08.txt index 454cd7e..e69de29 100644 --- a/book/glossary/08.txt +++ b/book/glossary/08.txt @@ -1,36 +0,0 @@ -objeto (*object*) - Something a variable can refer to. For now, you can use “object” and “value” interchangeably. - -sequência de formatação (*sequence*) - An ordered collection of values where each value is identified by an integer index. - -*item* (item) - One of the values in a sequence. - -índice (*index*) - An integer value used to select an item in a sequence, such as a character in a string. In Python indices start from 0. - -código provisório (*slice*) - A part of a string specified by a range of indices. - -string vazia (*empty string*) - A string with no characters and length 0, represented by two quotation marks. - -imutável (*immutable*) - The property of a sequence whose items cannot be changed. - -percorrer (*traverse*) - To iterate through the items in a sequence, performing a similar operation on each. - -busca (*search*) - A pattern of traversal that stops when it finds what it is looking for. - -contador (*counter*) - A variable used to count something, usually initialized to zero and then incremented. - -invocação (*invocation*) - A statement that calls a method. - -argumento opcional (*optional argument*) - A function or method argument that is not required. - diff --git a/book/glossary/09.txt b/book/glossary/09.txt index 38033d7..e69de29 100644 --- a/book/glossary/09.txt +++ b/book/glossary/09.txt @@ -1,9 +0,0 @@ -objeto-arquivo (*file object*) - A value that represents an open file. - -redução a um problema resolvido (*reduction to a previously solved problem*) - A way of solving a problem by expressing it as an instance of a previously solved problem. - -caso especial (*special case*) - A test case that is atypical or non-obvious (and less likely to be handled correctly). - diff --git a/tools/glossary.csv b/tools/glossary.csv index 7e150f1..ee04cb6 100644 --- a/tools/glossary.csv +++ b/tools/glossary.csv @@ -1,233 +1,233 @@ -adopted term,EN-US term,PT-BR term,chapter,order,EN-US definition -"``assert``, instrução",``assert`` statement,instrução ``assert``,16,7,A statement that check a condition and raises an exception if it fails. -"``global``, declaração",``global`` statement,declaração ``global``,11,18,A statement that declares a variable name global. -"``import``, instrução",``import`` statement,instrução ``import``,03,15,A statement that reads a module file and creates a module object. -``None``,``None``,-,03,13,A special value returned by void functions. -"``print``, instrução",``print`` statement,instrução ``print``,01,8,An instruction that causes the Python interpreter to display a value on the screen. -"``raise``, instrução",``raise`` statement,instrução ``raise``,11,13,A statement that (deliberately) raises an exception. -"``return``, instrução",``return`` statement,instrução ``return``,05,12,A statement that causes a function to end immediately and return to the caller. -acumulador,accumulator,acumulador,10,4,A variable used in a loop to add up or accumulate a result. -algoritmo,algorithm,algoritmo,07,8,A general process for solving a category of problems. -aliasing,aliasing,“apelidamento”,10,13,A circumstance where two or more variables refer to the same object. -analisar,parse,analisar,01,19,To examine a program and analyze the syntactic structure. -análise de algoritmos,analysis of algorithms,análise de algoritmos,B,1,A way to compare algorithms in terms of their run time and/or space requirements. -argumento,argument,argumento,03,8,A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function. -argumento nomeado,keyword argument,argumento nomeado,04,5,An argument that includes the name of the parameter as a “keyword”. -argumento opcional,optional argument,argumento opcional,08,12,A function or method argument that is not required. -argumento posicional,positional argument,argumento posicional,17,5,"An argument that does not include a parameter name, so it is not a keyword argument." -arquivo-texto,text file,arquivo-texto,14,5,A sequence of characters stored in permanent storage like a hard drive. -assinatura,interface,"assinatura, interface",04,6,"A description of how to use a function, including the name and descriptions of the arguments and return value." -atribuição,assignment,atribuição,02,2,A statement that assigns a value to a variable. -atribuição combinada,augmented assignment,atribuição combinada,10,5,A statement that updates the value of a variable using an operator like ``+=``. -atributo,attribute,atributo,15,5,One of the named values associated with an object. -atributo de classe,class attribute,atributo de classe,18,2,An attribute associated with a class object. Class attributes are defined inside a class definition but outside any method. -atributo de instância,instance attribute,atributo de instância,18,3,An attribute associated with an instance of a class. -atualização,update,atualização,07,2,An assignment where the new value of the variable depends on the old. -avaliar,evaluate,avaliar,02,7,To simplify an expression by performing the operations in order to yield a single value. -banco de dados,database,banco de dados,14,11,A file whose contents are organized like a dictionary with keys that correspond to values. -bug,bug,-,01,20,An error in a program. -busca,search,busca,08,9,A pattern of traversal that stops when it finds what it is looking for. -busca,lookup,"busca, pesquisa",11,11,A dictionary operation that takes a key and finds the corresponding value. -busca,search,busca,B,10,The problem of locating an element of a collection (like a list or dictionary) or determining that it is not present. -busca invertida,reverse lookup,busca invertida,11,12,A dictionary operation that takes a value and finds one or more keys that map to it. -cabeçalho,header,cabeçalho,03,4,The first line of a function definition. -caminho,path,caminho,14,7,A string that identifies a file. -caminho absoluto,absolute path,caminho absoluto,14,9,A path that starts from the topmost directory in the file system. -caminho relativo,relative path,caminho relativo,14,8,A path that starts from the current directory. -capturar,catch,capturar,14,10,To prevent an exception from terminating a program using the try and except statements. -cardinalidade,multiplicity,"cardinalidade, multiplicidadade",18,12,"A notation in a class diagram that shows, for a HAS-A relationship, how many references there are to instances of another class." -caso base,base case,caso base,05,14,A conditional branch in a recursive function that does not make a recursive call. -caso especial,special case,caso especial,09,3,A test case that is atypical or non-obvious (and less likely to be handled correctly). -chamada de função,function call,chamada de função,03,7,A statement that runs a function. It consists of the function name followed by an argument list in parentheses. -chave,key,chave,11,5,An object that appears in a dictionary as the first part of a key-value pair. -classe,class,classe,15,1,A programmer-defined type. A class definition creates a new class object. -classe base,parent class,"classe base, superclasse",18,6,The class from which a child class inherits. -classe derivada,child class,"classe derivada, subclasse",18,7,A new class created by inheriting from an existing class; also called a “subclass”. -codificar,encode,codificar,18,1,To represent one set of values using another set of values by constructing a mapping between them. -código morto,dead code,código morto,06,2,"Part of a program that can never run, often because it appears after a return statement." -código provisório,scaffolding,"“andaime”, código provisório",06,4,Code that is used during program development but is not part of the final version. -código provisório,slice,fatia,08,5,A part of a string specified by a range of indices. -comentário,comment,comentário,02,15,Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program. -composição,composition,composição,03,18,"Using an expression as part of a larger expression, or a statement as part of a larger statement." -concatenar,concatenate,concatenar,02,14,To join two operands end-to-end. -condição,condition,condição,05,7,The boolean expression in a conditional statement that determines which branch runs. -condicional aninhado,nested conditional,condicional aninhado,05,11,A conditional statement that appears in one of the branches of another conditional statement. -condicional encadeado,chained conditional,condicional encadeado,05,10,A conditional statement with a series of alternative branches. -contador,counter,contador,08,10,"A variable used to count something, usually initialized to zero and then incremented." -cópia profunda,deep copy,cópia profunda,15,8,"To copy the contents of an object as well as any embedded objects, and any objects embedded in them, and so on; implemented by the deepcopy function in the copy module." -cópia rasa,shallow copy,cópia rasa,15,7,"To copy the contents of an object, including any references to embedded objects; implemented by the copy function in the copy module." -corpo,body,corpo,03,5,The sequence of statements inside a function definition. -declaração,declaration,declaração,11,20,A statement like global that tells the interpreter something about a variable. -decrementar,decrement,decrementar,07,5,An update that decreases the value of a variable. -definição de função,function definition,definição de função,03,2,"A statement that creates a new function, specifying its name, parameters, and the statements it contains." -delimitador,delimiter,delimitador,10,14,A character or string used to indicate where a string should be split. -dependência,dependency,dependência,18,10,"A relationship between two classes where instances of one class use instances of the other class, but do not store them as attributes." -depuração,debugging,depuração,01,21,The process of finding and correcting bugs. -depuração com patinho de borracha,rubber duck debugging,depuração com patinho de borracha,13,6,"Debugging by explaining your problem to an inanimate object such as a rubber duck. Articulating the problem can help you solve it, even if the rubber duck doesn’t know Python." -desempacotamento de tupla,tuple assignment,desempacotamento de tupla,12,2,An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left. -desenvolvimento incremental,incremental development,desenvolvimento incremental,06,3,A program development plan intended to avoid debugging by adding and testing only a small amount of code at a time. -desenvolvimento planejado,designed development,desenvolvimento planejado,16,2,A development plan that involves high-level insight into the problem and more planning than incremental development or prototype development. -despacho por tipo,type-based dispatch,despacho por tipo,17,7,A programming pattern that checks the type of an operand and invokes different functions for different types. -desvio,branch,desvio,05,9,One of the alternative sequences of statements in a conditional statement. -determinístico,deterministic,determinístico,13,1,"Pertaining to a program that does the same thing each time it runs, given the same inputs." -diagrama de chamadas,call graph,diagrama de chamadas,11,15,"A diagram that shows every frame created during the execution of a program, with an arrow from each caller to each callee." -diagrama de classe,class diagram,diagrama de classe,18,11,A diagram that shows the classes in a program and the relationships between them. -diagrama de estado,state diagram,diagrama de estado,02,3,A graphical representation of a set of variables and the values they refer to. -diagrama de objetos,object diagram,diagrama de objetos,15,9,"A diagram that shows objects, their attributes, and the values of the attributes." -diagrama de pilha,stack diagram,diagrama de pilha,03,20,"A graphical representation of a stack of functions, their variables, and the values they refer to." -dicionário,dictionary,dicionário,11,2,A mapping from keys to their corresponding values. -diretório,directory,diretório,14,6,"A named collection of files, also called a folder." -divisão pelo piso,floor division,divisão pelo piso,05,1,"An operator, denoted //, that divides two numbers and rounds down (toward zero) to an integer." -docstring,docstring,-,04,9,A string that appears at the top of a function definition to document the function’s interface. -elemento,element,elemento,10,2,"One of the values in a list (or other sequence), also called items." -encapsulamento,encapsulation,encapsulamento,04,3,The process of transforming a sequence of statements into a function definition. -encapsulamento de dados,data encapsulation,encapsulamento de dados,18,13,A program development plan that involves a prototype using global variables and a final version that makes the global variables into instance attributes. -equivalente,equivalent,equivalente,10,10,Having the same value. -erro semântico,semantic error,erro semântico,02,19,An error in a program that makes it do something other than what the programmer intended. -erro sintático,syntax error,erro sintático,02,16,An error in a program that makes it impossible to parse (and therefore impossible to interpret). -errro estrutural,shape error,errro estrutural,12,8,"An error caused because a value has the wrong shape; that is, the wrong type or size." -estrutura de dados,data structure,estrutura de dados,12,7,"A collection of related values, often organized in lists, dictionaries, tuples, etc." -exceção,exception,exceção,02,17,An error that is detected while the program is running. -executar,execute,executar,02,9,To run a statement and do what it says. -explodir,scatter,explodir,12,4,The operation of treating a sequence as a list of arguments. -expressão,expression,expressão,02,6,"A combination of variables, operators, and values that represents a single result." -expressão booleana,boolean expression,expressão booleana,05,3,An expression whose value is either True or False. -expressão condicional,conditional expression,expressão condicional,19,1,"An expression that has one of two values, depending on a condition." -expressão geradora,generator expression,expressão geradora,19,3,An expression with a for loop in parentheses that yields a generator object. -fachada,veneer,“verniz” ou fachada,18,4,A method or function that provides a different interface to another function without doing much computation. -factory,factory,fábrica,19,5,"A function, usually passed as a parameter, used to create objects." -filtro,filter,filtro,10,8,A processing pattern that traverses a list and selects the elements that satisfy some criterion. -flag,flag,“indicador”,11,19,A boolean variable used to indicate whether a condition is true. -fluxo de execução,flow of execution,fluxo de execução,03,19,The order statements run in. -frame,frame,,03,21,A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function. -função,function,função,03,1,A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result. -função de hash,hash function,função de espalhamento,11,9,A function used by a hashtable to compute the location for a key. -função produtiva,fruitful function,função produtiva,03,11,A function that returns a value. -função pura,pure function,função pura,16,3,A function that does not modify any of the objects it receives as arguments. Most pure functions are fruitful. -generalização,generalization,generalização,04,4,The process of replacing something unnecessarily specific (like a number) with something appropriately general (like a variable or parameter). -guarda,guardian,guarda,06,5,A programming pattern that uses a conditional statement to check for and handle circumstances that might cause an error. -hashable,hashable,,11,10,"A type that has a hash function. Immutable types like integers, floats and strings are hashable; mutable types like lists and dictionaries are not." -herança,inheritance,herança,18,5,The ability to define a new class that is a modified version of a previously defined class. -idêntico,identical,idêntico,10,11,Being the same object (which implies equivalence). -implementação,implementation,implementação,11,7,A way of performing a computation. -imutável,immutable,imutável,08,7,The property of a sequence whose items cannot be changed. -incrementar,increment,incrementar,07,4,An update that increases the value of a variable (often by one). -índice,index,índice,08,4,"An integer value used to select an item in a sequence, such as a character in a string. In Python indices start from 0." -inicialização,initialization,inicialização,07,3,An assignment that gives an initial value to a variable that will be updated. -instância,instance,instância,15,3,An object that belongs to a class. -instanciar,instantiate,instanciar,15,4,To create a new object. -instrução,statement,instrução,02,8,"A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements." -instrução composta,compound statement,instrução composta,05,8,A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header. -instrução condicional,conditional statement,instrução condicional,05,6,A statement that controls the flow of execution depending on some condition. -inteiro,integer,inteiro,01,12,A type that represents whole numbers. -interpretador,interpreter,interpretador,01,5,A program that reads another program and executes it -invariante,invariant,invariante,16,6,A condition that should always be true during the execution of a program. -invocação,invocation,invocação,08,11,A statement that calls a method. -item,item,item,08,3,One of the values in a sequence. -item,item,item,11,4,"In a dictionary, another name for a key-value pair." -iteração,iteration,iteração,07,6,Repeated execution of a set of statements using either a recursive function call or a loop. -iterador,iterator,iterador,12,6,"An object that can iterate through a sequence, but which does not provide list operators and methods." -laço,loop,"laço, loop",04,2,A part of a program that can run repeatedly. -laço infinito,infinite loop,laço infinito,07,7,A loop in which the terminating condition is never satisfied. -linear,linear,linear,B,8,"An algorithm whose run time is proportional to problem size, at least for large problem sizes." -linguagem de alto nível,high-level language,linguagem de alto nível,01,2,A programming language like Python that is designed to be easy for humans to read and write. -linguagem de baixo nível,low-level language,linguagem de baixo nível,01,3,A programming language that is designed to be easy for a computer to run; also called “machine language” or “assembly language”. -linguagem formal,formal language,linguagem formal,01,16,"Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages." -linguagem natural,natural language,linguagem natural,01,15,Any one of the languages that people speak that evolved naturally. -linguagem orientada a objetos,object-oriented language,linguagem orientada a objetos,17,1,"A language that provides features, such as programmer-defined types and methods, that facilitate object-oriented programming." -lista,list,lista,10,1,A sequence of values. -lista aninhada,nested list,lista aninhada,10,3,A list that is an element of another list. -listcomp,list comprehension,"“compreensão de lista”, listcomp",19,2,An expression with a for loop in square brackets that yields a new list. -map,map,"“mapear”, “de-para”",10,7,A processing pattern that traverses a sequence and performs an operation on each element. -mapeamento,mapping,mapeamento,11,1,A relationship in which each element of one set corresponds to an element of another set. -máquina-modelo,machine model,máquina-modelo,B,2,A simplified representation of a computer used to describe algorithms. -memo,memo,“lembrete”,11,16,A computed value stored to avoid unnecessary future computation. -método,method,método,04,1,A function that is associated with an object and called using dot notation. -método,method,método,17,3,A function that is defined inside a class definition and is invoked on instances of that class. -modificadora,modifier,modificadora,16,4,"A function that changes one or more of the objects it receives as arguments. Most modifiers are void; that is, they return None." -modo de script,script mode,modo de script,02,11,A way of using the Python interpreter to read code from a script and run it. -modo interativo,interactive mode,modo interativo,02,10,A way of using the Python interpreter by typing code at the prompt. -módulo,module,módulo,03,14,A file that contains a collection of related functions and other definitions. -multiset,multiset,“multi-conjunto”,19,4,A mathematical entity that represents a mapping between the elements of a set and the number of times they appear. -notação assintótica,Big-Oh notation,notação assintótica,B,7,"Notation for representing an order of growth; for example, :math:`O(n)` represents the set of functions that grow linearly." -notação de ponto,dot notation,notação de ponto,03,17,The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name. -objeto,object,objeto,08,1,"Something a variable can refer to. For now, you can use “object” and “value” interchangeably." -objeto,object,objeto,10,9,Something a variable can refer to. An object has a type and a value. -objeto “pipe”,pipe object,objeto “pipe”,14,14,"An object that represents a running program, allowing a Python program to run commands and read the results." -objeto ``bytes``,``bytes`` object,objeto ``bytes``,14,12,An object similar to a string. -objeto ``zip``,``zip`` object,objeto ``zip``,12,5,The result of calling a built-in function zip; an object that iterates through a sequence of tuples. -objeto embutido,embedded object,objeto embutido,15,6,An object that is stored as an attribute of another object. -objeto-arquivo,file object,objeto-arquivo,09,1,A value that represents an open file. -objeto-classe,class object,objeto-classe,15,2,An object that contains information about a programmer-defined type. The class object can be used to create instances of the type. -objeto-função,function object,objeto-função,03,3,A value created by a function definition. The name of the function is a variable that refers to a function object. -objeto-módulo,module object,objeto-módulo,03,16,A value created by an import statement that provides access to the values defined in a module. -ocultação de informações,information hiding,ocultação de informações,17,9,"The principle that the interface provided by an object should not depend on its implementation, in particular the representation of its attributes." -operador,operator,operador,01,9,"A special symbol that represents a simple computation like addition, multiplication, or string concatenation." -operador de formatação,format operator,operador de formatação,14,2,"An operator, %, that takes a format string and a tuple and generates a string that includes the elements of the tuple formatted as specified by the format string." -operador de módulo,modulus operator,operador de módulo,05,2,"An operator, denoted with a percent sign (%), that works on integers and returns the remainder when one number is divided by another." -operador lógico,logical operator,operador lógico,05,5,"One of the operators that combines boolean expressions: and, or, and not." -operador relacional,relational operator,operador relacional,05,4,"One of the operators that compares its operands: ==, !=, >, <, >=, and <=." -operando,operand,operando,02,5,One of the values on which an operator operates. -ordem das operações,order of operations,ordem das operações,02,13,Rules governing the order in which expressions involving multiple operators and operands are evaluated. -ordem de crescimento,order of growth,ordem de crescimento,B,6,"A set of functions that all grow in a way considered equivalent for purposes of analysis of algorithms. For example, all functions that grow linearly belong to the same order of growth." -palavra-chave,keyword,palavra-chave,02,4,"A reserved word that is used to parse a program; you cannot use keywords like if, def, and while as variable names." -par chave-valor,key-value pair,par chave-valor,11,3,The representation of the mapping from a key to a value. -parâmetro,parameter,parâmetro,03,6,A name used inside a function to refer to the value passed as an argument. -percorrer,traverse,percorrer,08,8,"To iterate through the items in a sequence, performing a similar operation on each." -persistente,persistent,persistente,14,1,Pertaining to a program that runs indefinitely and keeps at least some of its data in permanent storage. -pior caso,worst case,pior caso,B,3,The input that makes a given algorithm run slowest (or require the most space. -plano de desenvolvimento,development plan,plano de desenvolvimento,04,8,A process for writing programs. -polimórfico,polymorphic,polimórfico,17,8,Pertaining to a function that can work with more than one type. -ponto de cruzamento,crossover point,ponto de cruzamento,B,5,The problem size where two algorithms require the same run time or space. -ponto-flutuante,floating-point,ponto-flutuante,01,13,A type that represents numbers with fractional parts. -portabilidade,portability,portabilidade,01,4,A property of a program that can run on more than one kind of computer. -pós-condição,postcondition,pós-condição,04,11,A requirement that should be satisfied by the function before it ends. -pré-condição,precondition,pré-condição,04,10,A requirement that should be satisfied by the caller before a function starts. -procedimento,void function,“função nula” ou procedimento,03,12,A function that always returns None. -programação funcional,program,programação funcional,01,7,A set of instructions that specifies a computation. -programação funcional,functional programming style,programação funcional,16,5,A style of program design in which the majority of functions are pure. -programação orientada a objetos,object-oriented programming,programação orientada a objetos,17,2,A style of programming in which data and the operations that manipulate it are organized into classes and methods. -prompt,prompt,“sinal de pronto”,01,6,Characters displayed by the interpreter to indicate that it is ready to take input from the user. -prototipar e ajustar,prototype and patch,prototipar e ajustar,16,1,"A development plan that involves writing a rough draft of a program, testing, and correcting errors as they are found." -pseudo-aleatório,pseudorandom,pseudo-aleatório,13,2,"Pertaining to a sequence of numbers that appears to be random, but is generated by a deterministic program." -quadrático,quadratic,quadrático,B,9,"An algorithm whose run time is proportional to :math:`n^2`, where :math:`n` is a measure of problem size." -reatribuição,reassignment,reatribuição,07,1,Assigning a new value to a variable that already exists. -recursão,recursion,recursão,05,13,The process of calling the function that is currently executing. -recursão infinita,infinite recursion,recursão infinita,05,15,"A recursion that doesn’t have a base case, or never reaches it. Eventually, an infinite recursion causes a runtime error." -redução a um problema resolvido,reduction to a previously solved problem,redução a um problema resolvido,09,2,A way of solving a problem by expressing it as an instance of a previously solved problem. -reduzir,reduce,reduzir,10,6,A processing pattern that traverses a sequence and accumulates the elements into a single result. -refatoração,refactoring,refatoração,04,7,The process of modifying a working program to improve function interfaces and other qualities of the code. -referência,reference,referência,10,12,The association between a variable and its value. -relação É-UM,IS-A relationship,relação É-UM,18,8,A relationship between a child class and its parent class. -relação TEM-UM,HAS-A relationship,relação TEM-UM,18,9,A relationship between two classes where instances of one class contain references to instances of the other. -reunir,gather,reunir,12,3,The operation of assembling a variable-length argument tuple. -script,script,-,02,12,A program stored in a file. -semântica,semantics,semântica,02,18,The meaning of a program. -sequência de formatação,sequence,sequência de formatação,08,2,An ordered collection of values where each value is identified by an integer index. -sequência de formatação,format sequence,sequência de formatação,14,4,"A sequence of characters in a format string, like %d, that specifies how a value should be formatted." -shell,shell,-,14,13,A program that allows users to type commands and then executes them by starting other programs. -singleton,singleton,-,11,14,A list (or other sequence) with a single element. -sintaxe,syntax,sintaxe,01,18,The rules that govern the structure of a program. -sobrecarga de operadores,operator overloading,sobrecarga de operadores,17,6,Changing the behavior of an operator like + so it works with a programmer-defined type. -sobrepor,override,sobrescrever,13,4,To replace a default value with an argument. -solução de problemas,problem solving,solução de problemas,01,1,"The process of formulating a problem, finding a solution, and expressing it." -string,string,“cadeia de caracteres”,01,14,A type that represents sequences of characters. -string de formatação,format string,string de formatação,14,3,"A string, used with the format operator, that contains format sequences." -string vazia,empty string,string vazia,08,6,"A string with no characters and length 0, represented by two quotation marks." -sujeito,subject,sujeito,17,4,The object a method is invoked on. -tabela de hash,hashtable,tabela de espalhamento,11,8,The algorithm used to implement Python dictionaries. -tabela de hash,hashtable,tabela de espalhamento,B,11,A data structure that represents a collection of key-value pairs and performs search in constant time. -termo dominante,leading term,"termo dominante, termo de maior expoente",B,4,"In a polynomial, the term with the highest exponent." -teste de desempenho,benchmarking,teste de desempenho,13,5,The process of choosing between data structures by implementing alternatives and testing them on a sample of the possible inputs. -tipo,type,tipo,01,11,"A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str)." -token,token,“símbolo”,01,17,"One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language." -traceback,traceback,,03,22,"A list of the functions that are executing, printed when an exception occurs." -tupla,tuple,tupla,12,1,An immutable sequence of elements. -valor,value,valor,01,10,"One of the basic units of data, like a number or string, that a program manipulates." -valor,value,valor,11,6,An object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word “value”. -valor default,default value,valor default,13,3,The value given to an optional parameter if no argument is provided. -valor devolvido,return value,valor devolvido,03,10,"The result of a function. If a function call is used as an expression, the return value is the value of the expression." -variável,variable,variável,02,1,A name that refers to a value. -variável global,global variable,variável global,11,17,A variable defined outside a function. Global variables can be accessed from any function. -variável local,local variable,variável local,03,9,A variable defined inside a function. A local variable can only be used inside its function. -variável temporária,temporary variable,variável temporária,06,1,A variable used to store an intermediate value in a complex calculation. +ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION +"``assert``, instrução",``assert`` statement,instrução ``assert``,16,7,A statement that check a condition and raises an exception if it fails., +"``global``, declaração",``global`` statement,declaração ``global``,11,18,A statement that declares a variable name global., +"``import``, instrução",``import`` statement,instrução ``import``,3,15,A statement that reads a module file and creates a module object., +``None``,``None``,-,3,13,A special value returned by void functions., +"``print``, instrução",``print`` statement,instrução ``print``,1,8,An instruction that causes the Python interpreter to display a value on the screen., +"``raise``, instrução",``raise`` statement,instrução ``raise``,11,13,A statement that (deliberately) raises an exception., +"``return``, instrução",``return`` statement,instrução ``return``,5,12,A statement that causes a function to end immediately and return to the caller., +acumulador,accumulator,acumulador,10,4,A variable used in a loop to add up or accumulate a result., +algoritmo,algorithm,algoritmo,7,8,A general process for solving a category of problems., +aliasing,aliasing,“apelidamento”,10,13,A circumstance where two or more variables refer to the same object., +analisar,parse,analisar,1,19,To examine a program and analyze the syntactic structure., +análise de algoritmos,analysis of algorithms,análise de algoritmos,B,1,A way to compare algorithms in terms of their run time and/or space requirements., +argumento,argument,argumento,3,8,A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function., +argumento nomeado,keyword argument,argumento nomeado,4,5,An argument that includes the name of the parameter as a “keyword”., +argumento opcional,optional argument,argumento opcional,8,12,A function or method argument that is not required., +argumento posicional,positional argument,argumento posicional,17,5,"An argument that does not include a parameter name, so it is not a keyword argument.", +arquivo-texto,text file,arquivo-texto,14,5,A sequence of characters stored in permanent storage like a hard drive., +assinatura,interface,"assinatura, interface",4,6,"A description of how to use a function, including the name and descriptions of the arguments and return value.", +atribuição,assignment,atribuição,2,2,A statement that assigns a value to a variable., +atribuição combinada,augmented assignment,atribuição combinada,10,5,A statement that updates the value of a variable using an operator like ``+=``., +atributo,attribute,atributo,15,5,One of the named values associated with an object., +atributo de classe,class attribute,atributo de classe,18,2,An attribute associated with a class object. Class attributes are defined inside a class definition but outside any method., +atributo de instância,instance attribute,atributo de instância,18,3,An attribute associated with an instance of a class., +atualização,update,atualização,7,2,An assignment where the new value of the variable depends on the old., +avaliar,evaluate,avaliar,2,7,To simplify an expression by performing the operations in order to yield a single value., +banco de dados,database,banco de dados,14,11,A file whose contents are organized like a dictionary with keys that correspond to values., +bug,bug,-,1,20,An error in a program., +busca,search,busca,8,9,A pattern of traversal that stops when it finds what it is looking for., +busca,lookup,"busca, pesquisa",11,11,A dictionary operation that takes a key and finds the corresponding value., +busca,search,busca,B,10,The problem of locating an element of a collection (like a list or dictionary) or determining that it is not present., +busca invertida,reverse lookup,busca invertida,11,12,A dictionary operation that takes a value and finds one or more keys that map to it., +cabeçalho,header,cabeçalho,3,4,The first line of a function definition., +caminho,path,caminho,14,7,A string that identifies a file., +caminho absoluto,absolute path,caminho absoluto,14,9,A path that starts from the topmost directory in the file system., +caminho relativo,relative path,caminho relativo,14,8,A path that starts from the current directory., +capturar,catch,capturar,14,10,To prevent an exception from terminating a program using the try and except statements., +cardinalidade,multiplicity,"cardinalidade, multiplicidadade",18,12,"A notation in a class diagram that shows, for a HAS-A relationship, how many references there are to instances of another class.", +caso base,base case,caso base,5,14,A conditional branch in a recursive function that does not make a recursive call., +caso especial,special case,caso especial,9,3,A test case that is atypical or non-obvious (and less likely to be handled correctly)., +chamada de função,function call,chamada de função,3,7,A statement that runs a function. It consists of the function name followed by an argument list in parentheses., +chave,key,chave,11,5,An object that appears in a dictionary as the first part of a key-value pair., +classe,class,classe,15,1,A programmer-defined type. A class definition creates a new class object., +classe base,parent class,"classe base, superclasse",18,6,The class from which a child class inherits., +classe derivada,child class,"classe derivada, subclasse",18,7,A new class created by inheriting from an existing class; also called a “subclass”., +codificar,encode,codificar,18,1,To represent one set of values using another set of values by constructing a mapping between them., +código morto,dead code,código morto,6,2,"Part of a program that can never run, often because it appears after a return statement.", +código provisório,scaffolding,"“andaime”, código provisório",6,4,Code that is used during program development but is not part of the final version., +código provisório,slice,fatia,8,5,A part of a string specified by a range of indices., +comentário,comment,comentário,2,15,Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program., +composição,composition,composição,3,18,"Using an expression as part of a larger expression, or a statement as part of a larger statement.", +concatenar,concatenate,concatenar,2,14,To join two operands end-to-end., +condição,condition,condição,5,7,The boolean expression in a conditional statement that determines which branch runs., +condicional aninhado,nested conditional,condicional aninhado,5,11,A conditional statement that appears in one of the branches of another conditional statement., +condicional encadeado,chained conditional,condicional encadeado,5,10,A conditional statement with a series of alternative branches., +contador,counter,contador,8,10,"A variable used to count something, usually initialized to zero and then incremented.", +cópia profunda,deep copy,cópia profunda,15,8,"To copy the contents of an object as well as any embedded objects, and any objects embedded in them, and so on; implemented by the deepcopy function in the copy module.", +cópia rasa,shallow copy,cópia rasa,15,7,"To copy the contents of an object, including any references to embedded objects; implemented by the copy function in the copy module.", +corpo,body,corpo,3,5,The sequence of statements inside a function definition., +declaração,declaration,declaração,11,20,A statement like global that tells the interpreter something about a variable., +decrementar,decrement,decrementar,7,5,An update that decreases the value of a variable., +definição de função,function definition,definição de função,3,2,"A statement that creates a new function, specifying its name, parameters, and the statements it contains.", +delimitador,delimiter,delimitador,10,14,A character or string used to indicate where a string should be split., +dependência,dependency,dependência,18,10,"A relationship between two classes where instances of one class use instances of the other class, but do not store them as attributes.", +depuração,debugging,depuração,1,21,The process of finding and correcting bugs., +depuração com patinho de borracha,rubber duck debugging,depuração com patinho de borracha,13,6,"Debugging by explaining your problem to an inanimate object such as a rubber duck. Articulating the problem can help you solve it, even if the rubber duck doesn’t know Python.", +desempacotamento de tupla,tuple assignment,desempacotamento de tupla,12,2,An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left., +desenvolvimento incremental,incremental development,desenvolvimento incremental,6,3,A program development plan intended to avoid debugging by adding and testing only a small amount of code at a time., +desenvolvimento planejado,designed development,desenvolvimento planejado,16,2,A development plan that involves high-level insight into the problem and more planning than incremental development or prototype development., +despacho por tipo,type-based dispatch,despacho por tipo,17,7,A programming pattern that checks the type of an operand and invokes different functions for different types., +desvio,branch,desvio,5,9,One of the alternative sequences of statements in a conditional statement., +determinístico,deterministic,determinístico,13,1,"Pertaining to a program that does the same thing each time it runs, given the same inputs.", +diagrama de chamadas,call graph,diagrama de chamadas,11,15,"A diagram that shows every frame created during the execution of a program, with an arrow from each caller to each callee.", +diagrama de classe,class diagram,diagrama de classe,18,11,A diagram that shows the classes in a program and the relationships between them., +diagrama de estado,state diagram,diagrama de estado,2,3,A graphical representation of a set of variables and the values they refer to., +diagrama de objetos,object diagram,diagrama de objetos,15,9,"A diagram that shows objects, their attributes, and the values of the attributes.", +diagrama de pilha,stack diagram,diagrama de pilha,3,20,"A graphical representation of a stack of functions, their variables, and the values they refer to.", +dicionário,dictionary,dicionário,11,2,A mapping from keys to their corresponding values., +diretório,directory,diretório,14,6,"A named collection of files, also called a folder.", +divisão pelo piso,floor division,divisão pelo piso,5,1,"An operator, denoted //, that divides two numbers and rounds down (toward zero) to an integer.", +docstring,docstring,-,4,9,A string that appears at the top of a function definition to document the function’s interface., +elemento,element,elemento,10,2,"One of the values in a list (or other sequence), also called items.", +encapsulamento,encapsulation,encapsulamento,4,3,The process of transforming a sequence of statements into a function definition., +encapsulamento de dados,data encapsulation,encapsulamento de dados,18,13,A program development plan that involves a prototype using global variables and a final version that makes the global variables into instance attributes., +equivalente,equivalent,equivalente,10,10,Having the same value., +erro semântico,semantic error,erro semântico,2,19,An error in a program that makes it do something other than what the programmer intended., +erro sintático,syntax error,erro sintático,2,16,An error in a program that makes it impossible to parse (and therefore impossible to interpret)., +errro estrutural,shape error,errro estrutural,12,8,"An error caused because a value has the wrong shape; that is, the wrong type or size.", +estrutura de dados,data structure,estrutura de dados,12,7,"A collection of related values, often organized in lists, dictionaries, tuples, etc.", +exceção,exception,exceção,2,17,An error that is detected while the program is running., +executar,execute,executar,2,9,To run a statement and do what it says., +explodir,scatter,explodir,12,4,The operation of treating a sequence as a list of arguments., +expressão,expression,expressão,2,6,"A combination of variables, operators, and values that represents a single result.", +expressão booleana,boolean expression,expressão booleana,5,3,An expression whose value is either True or False., +expressão condicional,conditional expression,expressão condicional,19,1,"An expression that has one of two values, depending on a condition.", +expressão geradora,generator expression,expressão geradora,19,3,An expression with a for loop in parentheses that yields a generator object., +fachada,veneer,“verniz” ou fachada,18,4,A method or function that provides a different interface to another function without doing much computation., +factory,factory,fábrica,19,5,"A function, usually passed as a parameter, used to create objects.", +filtro,filter,filtro,10,8,A processing pattern that traverses a list and selects the elements that satisfy some criterion., +flag,flag,“indicador”,11,19,A boolean variable used to indicate whether a condition is true., +fluxo de execução,flow of execution,fluxo de execução,3,19,The order statements run in., +frame,frame,,3,21,A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function., +função,function,função,3,1,A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result., +função de hash,hash function,função de espalhamento,11,9,A function used by a hashtable to compute the location for a key., +função produtiva,fruitful function,função produtiva,3,11,A function that returns a value., +função pura,pure function,função pura,16,3,A function that does not modify any of the objects it receives as arguments. Most pure functions are fruitful., +generalização,generalization,generalização,4,4,The process of replacing something unnecessarily specific (like a number) with something appropriately general (like a variable or parameter)., +guarda,guardian,guarda,6,5,A programming pattern that uses a conditional statement to check for and handle circumstances that might cause an error., +hashable,hashable,,11,10,"A type that has a hash function. Immutable types like integers, floats and strings are hashable; mutable types like lists and dictionaries are not.", +herança,inheritance,herança,18,5,The ability to define a new class that is a modified version of a previously defined class., +idêntico,identical,idêntico,10,11,Being the same object (which implies equivalence)., +implementação,implementation,implementação,11,7,A way of performing a computation., +imutável,immutable,imutável,8,7,The property of a sequence whose items cannot be changed., +incrementar,increment,incrementar,7,4,An update that increases the value of a variable (often by one)., +índice,index,índice,8,4,"An integer value used to select an item in a sequence, such as a character in a string. In Python indices start from 0.", +inicialização,initialization,inicialização,7,3,An assignment that gives an initial value to a variable that will be updated., +instância,instance,instância,15,3,An object that belongs to a class., +instanciar,instantiate,instanciar,15,4,To create a new object., +instrução,statement,instrução,2,8,"A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements.", +instrução composta,compound statement,instrução composta,5,8,A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header., +instrução condicional,conditional statement,instrução condicional,5,6,A statement that controls the flow of execution depending on some condition., +inteiro,integer,inteiro,1,12,A type that represents whole numbers., +interpretador,interpreter,interpretador,1,5,A program that reads another program and executes it, +invariante,invariant,invariante,16,6,A condition that should always be true during the execution of a program., +invocação,invocation,invocação,8,11,A statement that calls a method., +item,item,item,8,3,One of the values in a sequence., +item,item,item,11,4,"In a dictionary, another name for a key-value pair.", +iteração,iteration,iteração,7,6,Repeated execution of a set of statements using either a recursive function call or a loop., +iterador,iterator,iterador,12,6,"An object that can iterate through a sequence, but which does not provide list operators and methods.", +laço,loop,"laço, loop",4,2,A part of a program that can run repeatedly., +laço infinito,infinite loop,laço infinito,7,7,A loop in which the terminating condition is never satisfied., +linear,linear,linear,B,8,"An algorithm whose run time is proportional to problem size, at least for large problem sizes.", +linguagem de alto nível,high-level language,linguagem de alto nível,1,2,A programming language like Python that is designed to be easy for humans to read and write., +linguagem de baixo nível,low-level language,linguagem de baixo nível,1,3,A programming language that is designed to be easy for a computer to run; also called “machine language” or “assembly language”., +linguagem formal,formal language,linguagem formal,1,16,"Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages.", +linguagem natural,natural language,linguagem natural,1,15,Any one of the languages that people speak that evolved naturally., +linguagem orientada a objetos,object-oriented language,linguagem orientada a objetos,17,1,"A language that provides features, such as programmer-defined types and methods, that facilitate object-oriented programming.", +lista,list,lista,10,1,A sequence of values., +lista aninhada,nested list,lista aninhada,10,3,A list that is an element of another list., +listcomp,list comprehension,"“compreensão de lista”, listcomp",19,2,An expression with a for loop in square brackets that yields a new list., +map,map,"“mapear”, “de-para”",10,7,A processing pattern that traverses a sequence and performs an operation on each element., +mapeamento,mapping,mapeamento,11,1,A relationship in which each element of one set corresponds to an element of another set., +máquina-modelo,machine model,máquina-modelo,B,2,A simplified representation of a computer used to describe algorithms., +memo,memo,“lembrete”,11,16,A computed value stored to avoid unnecessary future computation., +método,method,método,4,1,A function that is associated with an object and called using dot notation., +método,method,método,17,3,A function that is defined inside a class definition and is invoked on instances of that class., +modificadora,modifier,modificadora,16,4,"A function that changes one or more of the objects it receives as arguments. Most modifiers are void; that is, they return None.", +modo de script,script mode,modo de script,2,11,A way of using the Python interpreter to read code from a script and run it., +modo interativo,interactive mode,modo interativo,2,10,A way of using the Python interpreter by typing code at the prompt., +módulo,module,módulo,3,14,A file that contains a collection of related functions and other definitions., +multiset,multiset,“multi-conjunto”,19,4,A mathematical entity that represents a mapping between the elements of a set and the number of times they appear., +notação assintótica,Big-Oh notation,notação assintótica,B,7,"Notation for representing an order of growth; for example, :math:`O(n)` represents the set of functions that grow linearly.", +notação de ponto,dot notation,notação de ponto,3,17,The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name., +objeto,object,objeto,8,1,"Something a variable can refer to. For now, you can use “object” and “value” interchangeably.", +objeto,object,objeto,10,9,Something a variable can refer to. An object has a type and a value., +objeto “pipe”,pipe object,objeto “pipe”,14,14,"An object that represents a running program, allowing a Python program to run commands and read the results.", +objeto ``bytes``,``bytes`` object,objeto ``bytes``,14,12,An object similar to a string., +objeto ``zip``,``zip`` object,objeto ``zip``,12,5,The result of calling a built-in function zip; an object that iterates through a sequence of tuples., +objeto embutido,embedded object,objeto embutido,15,6,An object that is stored as an attribute of another object., +objeto-arquivo,file object,objeto-arquivo,9,1,A value that represents an open file., +objeto-classe,class object,objeto-classe,15,2,An object that contains information about a programmer-defined type. The class object can be used to create instances of the type., +objeto-função,function object,objeto-função,3,3,A value created by a function definition. The name of the function is a variable that refers to a function object., +objeto-módulo,module object,objeto-módulo,3,16,A value created by an import statement that provides access to the values defined in a module., +ocultação de informações,information hiding,ocultação de informações,17,9,"The principle that the interface provided by an object should not depend on its implementation, in particular the representation of its attributes.", +operador,operator,operador,1,9,"A special symbol that represents a simple computation like addition, multiplication, or string concatenation.", +operador de formatação,format operator,operador de formatação,14,2,"An operator, %, that takes a format string and a tuple and generates a string that includes the elements of the tuple formatted as specified by the format string.", +operador de módulo,modulus operator,operador de módulo,5,2,"An operator, denoted with a percent sign (%), that works on integers and returns the remainder when one number is divided by another.", +operador lógico,logical operator,operador lógico,5,5,"One of the operators that combines boolean expressions: and, or, and not.", +operador relacional,relational operator,operador relacional,5,4,"One of the operators that compares its operands: ==, !=, >, <, >=, and <=.", +operando,operand,operando,2,5,One of the values on which an operator operates., +ordem das operações,order of operations,ordem das operações,2,13,Rules governing the order in which expressions involving multiple operators and operands are evaluated., +ordem de crescimento,order of growth,ordem de crescimento,B,6,"A set of functions that all grow in a way considered equivalent for purposes of analysis of algorithms. For example, all functions that grow linearly belong to the same order of growth.", +palavra-chave,keyword,palavra-chave,2,4,"A reserved word that is used to parse a program; you cannot use keywords like if, def, and while as variable names.", +par chave-valor,key-value pair,par chave-valor,11,3,The representation of the mapping from a key to a value., +parâmetro,parameter,parâmetro,3,6,A name used inside a function to refer to the value passed as an argument., +percorrer,traverse,percorrer,8,8,"To iterate through the items in a sequence, performing a similar operation on each.", +persistente,persistent,persistente,14,1,Pertaining to a program that runs indefinitely and keeps at least some of its data in permanent storage., +pior caso,worst case,pior caso,B,3,The input that makes a given algorithm run slowest (or require the most space., +plano de desenvolvimento,development plan,plano de desenvolvimento,4,8,A process for writing programs., +polimórfico,polymorphic,polimórfico,17,8,Pertaining to a function that can work with more than one type., +ponto de cruzamento,crossover point,ponto de cruzamento,B,5,The problem size where two algorithms require the same run time or space., +ponto-flutuante,floating-point,ponto-flutuante,1,13,A type that represents numbers with fractional parts., +portabilidade,portability,portabilidade,1,4,A property of a program that can run on more than one kind of computer., +pós-condição,postcondition,pós-condição,4,11,A requirement that should be satisfied by the function before it ends., +pré-condição,precondition,pré-condição,4,10,A requirement that should be satisfied by the caller before a function starts., +procedimento,void function,“função nula” ou procedimento,3,12,A function that always returns None., +programação funcional,program,programação funcional,1,7,A set of instructions that specifies a computation., +programação funcional,functional programming style,programação funcional,16,5,A style of program design in which the majority of functions are pure., +programação orientada a objetos,object-oriented programming,programação orientada a objetos,17,2,A style of programming in which data and the operations that manipulate it are organized into classes and methods., +prompt,prompt,“sinal de pronto”,1,6,Characters displayed by the interpreter to indicate that it is ready to take input from the user., +prototipar e ajustar,prototype and patch,prototipar e ajustar,16,1,"A development plan that involves writing a rough draft of a program, testing, and correcting errors as they are found.", +pseudo-aleatório,pseudorandom,pseudo-aleatório,13,2,"Pertaining to a sequence of numbers that appears to be random, but is generated by a deterministic program.", +quadrático,quadratic,quadrático,B,9,"An algorithm whose run time is proportional to :math:`n^2`, where :math:`n` is a measure of problem size.", +reatribuição,reassignment,reatribuição,7,1,Assigning a new value to a variable that already exists., +recursão,recursion,recursão,5,13,The process of calling the function that is currently executing., +recursão infinita,infinite recursion,recursão infinita,5,15,"A recursion that doesn’t have a base case, or never reaches it. Eventually, an infinite recursion causes a runtime error.", +redução a um problema resolvido,reduction to a previously solved problem,redução a um problema resolvido,9,2,A way of solving a problem by expressing it as an instance of a previously solved problem., +reduzir,reduce,reduzir,10,6,A processing pattern that traverses a sequence and accumulates the elements into a single result., +refatoração,refactoring,refatoração,4,7,The process of modifying a working program to improve function interfaces and other qualities of the code., +referência,reference,referência,10,12,The association between a variable and its value., +relação É-UM,IS-A relationship,relação É-UM,18,8,A relationship between a child class and its parent class., +relação TEM-UM,HAS-A relationship,relação TEM-UM,18,9,A relationship between two classes where instances of one class contain references to instances of the other., +reunir,gather,reunir,12,3,The operation of assembling a variable-length argument tuple., +script,script,-,2,12,A program stored in a file., +semântica,semantics,semântica,2,18,The meaning of a program., +sequência de formatação,sequence,sequência de formatação,8,2,An ordered collection of values where each value is identified by an integer index., +sequência de formatação,format sequence,sequência de formatação,14,4,"A sequence of characters in a format string, like %d, that specifies how a value should be formatted.", +shell,shell,-,14,13,A program that allows users to type commands and then executes them by starting other programs., +singleton,singleton,-,11,14,A list (or other sequence) with a single element., +sintaxe,syntax,sintaxe,1,18,The rules that govern the structure of a program., +sobrecarga de operadores,operator overloading,sobrecarga de operadores,17,6,Changing the behavior of an operator like + so it works with a programmer-defined type., +sobrepor,override,sobrescrever,13,4,To replace a default value with an argument., +solução de problemas,problem solving,solução de problemas,1,1,"The process of formulating a problem, finding a solution, and expressing it.", +string,string,“cadeia de caracteres”,1,14,A type that represents sequences of characters., +string de formatação,format string,string de formatação,14,3,"A string, used with the format operator, that contains format sequences.", +string vazia,empty string,string vazia,8,6,"A string with no characters and length 0, represented by two quotation marks.", +sujeito,subject,sujeito,17,4,The object a method is invoked on., +tabela de hash,hashtable,tabela de espalhamento,11,8,The algorithm used to implement Python dictionaries., +tabela de hash,hashtable,tabela de espalhamento,B,11,A data structure that represents a collection of key-value pairs and performs search in constant time., +termo dominante,leading term,"termo dominante, termo de maior expoente",B,4,"In a polynomial, the term with the highest exponent.", +teste de desempenho,benchmarking,teste de desempenho,13,5,The process of choosing between data structures by implementing alternatives and testing them on a sample of the possible inputs., +tipo,type,tipo,1,11,"A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str).", +token,token,“símbolo”,1,17,"One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language.", +traceback,traceback,,3,22,"A list of the functions that are executing, printed when an exception occurs.", +tupla,tuple,tupla,12,1,An immutable sequence of elements., +valor,value,valor,1,10,"One of the basic units of data, like a number or string, that a program manipulates.", +valor,value,valor,11,6,An object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word “value”., +valor default,default value,valor default,13,3,The value given to an optional parameter if no argument is provided., +valor devolvido,return value,valor devolvido,3,10,"The result of a function. If a function call is used as an expression, the return value is the value of the expression.", +variável,variable,variável,2,1,A name that refers to a value., +variável global,global variable,variável global,11,17,A variable defined outside a function. Global variables can be accessed from any function., +variável local,local variable,variável local,3,9,A variable defined inside a function. A local variable can only be used inside its function., +variável temporária,temporary variable,variável temporária,6,1,A variable used to store an intermediate value in a complex calculation., diff --git a/tools/glossary.ods b/tools/glossary.ods deleted file mode 100644 index 72712c6eef658591da89063e3ab75a8b7b5ba5fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53817 zcmZ^qQ;;Y@m#y2jZQC|Z+qP}nw%w;~+wRl0ZQIuEf9B4^Jj_E@R#a5vLq_erE5Eh2 zyc9493IG5E0Kg@buULpRXCxf}0Kk97?;`*k3mX$>4|@{>dwXjOBLim(J6n2JTVpyq z11Ae7Iy-w4TVp#T7aJ2>XF4Z)M-u~MCvy`MXZioN=GN8n_k$+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.py @@ -12,7 +12,7 @@ RST_PATH = '../book/' GLOSSARY_DATA_PATH = './glossary.csv' -FIELDS = 'term us_term br_term chapter order definition'.split() +FIELDS = 'term us_term br_term chapter order us_definition br_definition'.split() GLOSSARY_HEAD = '''\ Glossário Consolidado @@ -79,9 +79,10 @@ def main(): out_file.write(GLOSSARY_HEAD) for entry in sorted(master_glossary, key=master_order): short_chapter = entry.chapter.lstrip('0') + definition = entry.br_definition.strip() or entry.us_definition.strip() out_file.write('{} :ref:`[{}] `\n {}\n\n' .format(formatted_head(entry), short_chapter, - entry.chapter, entry.definition)) + entry.chapter, definition)) for chapter_id, entries_qty in expected_entries: chapter_glob = os.path.join(RST_PATH, chapter_id+'*.rst') @@ -91,7 +92,8 @@ def main(): glossary = chapter_glossaries[chapter_id] with open(out_path, 'wt', encoding='utf-8') as out_file: for entry in sorted(glossary, key=operator.attrgetter('order')): - out_file.write('{}\n {}\n\n'.format(formatted_head(entry), entry.definition)) + definition = entry.br_definition.strip() or entry.us_definition.strip() + out_file.write('{}\n {}\n\n'.format(formatted_head(entry), definition)) print() From 975d13f5503e10fc436973df6fd5baa05eed9037 Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Mon, 30 Nov 2015 18:20:23 -0200 Subject: [PATCH 15/28] split glossary.csv files to smaller files in data/ --- .gitignore | 1 + data/a.csv | 20 ++++++++++++++++++++ data/b.csv | 7 +++++++ data/c.csv | 28 ++++++++++++++++++++++++++++ data/d.csv | 23 +++++++++++++++++++++++ data/e-f.csv | 26 ++++++++++++++++++++++++++ data/g-i.csv | 26 ++++++++++++++++++++++++++ data/l-m.csv | 23 +++++++++++++++++++++++ data/n-o.csv | 23 +++++++++++++++++++++++ data/p-q.csv | 23 +++++++++++++++++++++++ data/r-s.csv | 27 +++++++++++++++++++++++++++ data/t-v.csv | 17 +++++++++++++++++ tools/gloss_stats.py | 34 ++++++++++++++++++++++++++++++++++ 13 files changed, 278 insertions(+) create mode 100644 data/a.csv create mode 100644 data/b.csv create mode 100644 data/c.csv create mode 100644 data/d.csv create mode 100644 data/e-f.csv create mode 100644 data/g-i.csv create mode 100644 data/l-m.csv create mode 100644 data/n-o.csv create mode 100644 data/p-q.csv create mode 100644 data/r-s.csv create mode 100644 data/t-v.csv create mode 100644 tools/gloss_stats.py diff --git a/.gitignore b/.gitignore index f24cd99..d81016d 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ pip-log.txt #Mr Developer .mr.developer.cfg +.DS_Store diff --git a/data/a.csv b/data/a.csv new file mode 100644 index 0000000..6988c30 --- /dev/null +++ b/data/a.csv @@ -0,0 +1,20 @@ +ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION +acumulador,accumulator,acumulador,10,4,A variable used in a loop to add up or accumulate a result., +algoritmo,algorithm,algoritmo,7,8,A general process for solving a category of problems., +aliasing,aliasing,“apelidamento”,10,13,A circumstance where two or more variables refer to the same object., +analisar,parse,analisar,1,19,To examine a program and analyze the syntactic structure., +análise de algoritmos,analysis of algorithms,análise de algoritmos,B,1,A way to compare algorithms in terms of their run time and/or space requirements., +argumento,argument,argumento,3,8,A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function., +argumento nomeado,keyword argument,argumento nomeado,4,5,An argument that includes the name of the parameter as a “keyword”., +argumento opcional,optional argument,argumento opcional,8,12,A function or method argument that is not required., +argumento posicional,positional argument,argumento posicional,17,5,"An argument that does not include a parameter name, so it is not a keyword argument.", +arquivo-texto,text file,arquivo-texto,14,5,A sequence of characters stored in permanent storage like a hard drive., +"``assert``, instrução",``assert`` statement,instrução ``assert``,16,7,A statement that check a condition and raises an exception if it fails., +assinatura,interface,"assinatura, interface",4,6,"A description of how to use a function, including the name and descriptions of the arguments and return value.", +atribuição,assignment,atribuição,2,2,A statement that assigns a value to a variable., +atribuição combinada,augmented assignment,atribuição combinada,10,5,A statement that updates the value of a variable using an operator like ``+=``., +atributo,attribute,atributo,15,5,One of the named values associated with an object., +atributo de classe,class attribute,atributo de classe,18,2,An attribute associated with a class object. Class attributes are defined inside a class definition but outside any method., +atributo de instância,instance attribute,atributo de instância,18,3,An attribute associated with an instance of a class., +atualização,update,atualização,7,2,An assignment where the new value of the variable depends on the old., +avaliar,evaluate,avaliar,2,7,To simplify an expression by performing the operations in order to yield a single value., diff --git a/data/b.csv b/data/b.csv new file mode 100644 index 0000000..5749e38 --- /dev/null +++ b/data/b.csv @@ -0,0 +1,7 @@ +ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION +banco de dados,database,banco de dados,14,11,A file whose contents are organized like a dictionary with keys that correspond to values., +bug,bug,-,1,20,An error in a program., +busca,search,busca,8,9,A pattern of traversal that stops when it finds what it is looking for., +busca,lookup,"busca, pesquisa",11,11,A dictionary operation that takes a key and finds the corresponding value., +busca,search,busca,B,10,The problem of locating an element of a collection (like a list or dictionary) or determining that it is not present., +busca invertida,reverse lookup,busca invertida,11,12,A dictionary operation that takes a value and finds one or more keys that map to it., diff --git a/data/c.csv b/data/c.csv new file mode 100644 index 0000000..65a1e13 --- /dev/null +++ b/data/c.csv @@ -0,0 +1,28 @@ +ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION +cabeçalho,header,cabeçalho,3,4,The first line of a function definition., +caminho,path,caminho,14,7,A string that identifies a file., +caminho absoluto,absolute path,caminho absoluto,14,9,A path that starts from the topmost directory in the file system., +caminho relativo,relative path,caminho relativo,14,8,A path that starts from the current directory., +capturar,catch,capturar,14,10,To prevent an exception from terminating a program using the try and except statements., +cardinalidade,multiplicity,"cardinalidade, multiplicidadade",18,12,"A notation in a class diagram that shows, for a HAS-A relationship, how many references there are to instances of another class.", +caso base,base case,caso base,5,14,A conditional branch in a recursive function that does not make a recursive call., +caso especial,special case,caso especial,9,3,A test case that is atypical or non-obvious (and less likely to be handled correctly)., +chamada de função,function call,chamada de função,3,7,A statement that runs a function. It consists of the function name followed by an argument list in parentheses., +chave,key,chave,11,5,An object that appears in a dictionary as the first part of a key-value pair., +classe,class,classe,15,1,A programmer-defined type. A class definition creates a new class object., +classe base,parent class,"classe base, superclasse",18,6,The class from which a child class inherits., +classe derivada,child class,"classe derivada, subclasse",18,7,A new class created by inheriting from an existing class; also called a “subclass”., +codificar,encode,codificar,18,1,To represent one set of values using another set of values by constructing a mapping between them., +código morto,dead code,código morto,6,2,"Part of a program that can never run, often because it appears after a return statement.", +código provisório,scaffolding,"“andaime”, código provisório",6,4,Code that is used during program development but is not part of the final version., +código provisório,slice,fatia,8,5,A part of a string specified by a range of indices., +comentário,comment,comentário,2,15,Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program., +composição,composition,composição,3,18,"Using an expression as part of a larger expression, or a statement as part of a larger statement.", +concatenar,concatenate,concatenar,2,14,To join two operands end-to-end., +condição,condition,condição,5,7,The boolean expression in a conditional statement that determines which branch runs., +condicional aninhado,nested conditional,condicional aninhado,5,11,A conditional statement that appears in one of the branches of another conditional statement., +condicional encadeado,chained conditional,condicional encadeado,5,10,A conditional statement with a series of alternative branches., +contador,counter,contador,8,10,"A variable used to count something, usually initialized to zero and then incremented.", +cópia profunda,deep copy,cópia profunda,15,8,"To copy the contents of an object as well as any embedded objects, and any objects embedded in them, and so on; implemented by the deepcopy function in the copy module.", +cópia rasa,shallow copy,cópia rasa,15,7,"To copy the contents of an object, including any references to embedded objects; implemented by the copy function in the copy module.", +corpo,body,corpo,3,5,The sequence of statements inside a function definition., diff --git a/data/d.csv b/data/d.csv new file mode 100644 index 0000000..fd8edc0 --- /dev/null +++ b/data/d.csv @@ -0,0 +1,23 @@ +ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION +declaração,declaration,declaração,11,20,A statement like global that tells the interpreter something about a variable., +decrementar,decrement,decrementar,7,5,An update that decreases the value of a variable., +definição de função,function definition,definição de função,3,2,"A statement that creates a new function, specifying its name, parameters, and the statements it contains.", +delimitador,delimiter,delimitador,10,14,A character or string used to indicate where a string should be split., +dependência,dependency,dependência,18,10,"A relationship between two classes where instances of one class use instances of the other class, but do not store them as attributes.", +depuração,debugging,depuração,1,21,The process of finding and correcting bugs., +depuração com patinho de borracha,rubber duck debugging,depuração com patinho de borracha,13,6,"Debugging by explaining your problem to an inanimate object such as a rubber duck. Articulating the problem can help you solve it, even if the rubber duck doesn’t know Python.", +desempacotamento de tupla,tuple assignment,desempacotamento de tupla,12,2,An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left., +desenvolvimento incremental,incremental development,desenvolvimento incremental,6,3,A program development plan intended to avoid debugging by adding and testing only a small amount of code at a time., +desenvolvimento planejado,designed development,desenvolvimento planejado,16,2,A development plan that involves high-level insight into the problem and more planning than incremental development or prototype development., +despacho por tipo,type-based dispatch,despacho por tipo,17,7,A programming pattern that checks the type of an operand and invokes different functions for different types., +desvio,branch,desvio,5,9,One of the alternative sequences of statements in a conditional statement., +determinístico,deterministic,determinístico,13,1,"Pertaining to a program that does the same thing each time it runs, given the same inputs.", +diagrama de chamadas,call graph,diagrama de chamadas,11,15,"A diagram that shows every frame created during the execution of a program, with an arrow from each caller to each callee.", +diagrama de classe,class diagram,diagrama de classe,18,11,A diagram that shows the classes in a program and the relationships between them., +diagrama de estado,state diagram,diagrama de estado,2,3,A graphical representation of a set of variables and the values they refer to., +diagrama de objetos,object diagram,diagrama de objetos,15,9,"A diagram that shows objects, their attributes, and the values of the attributes.", +diagrama de pilha,stack diagram,diagrama de pilha,3,20,"A graphical representation of a stack of functions, their variables, and the values they refer to.", +dicionário,dictionary,dicionário,11,2,A mapping from keys to their corresponding values., +diretório,directory,diretório,14,6,"A named collection of files, also called a folder.", +divisão pelo piso,floor division,divisão pelo piso,5,1,"An operator, denoted //, that divides two numbers and rounds down (toward zero) to an integer.", +docstring,docstring,-,4,9,A string that appears at the top of a function definition to document the function’s interface., diff --git a/data/e-f.csv b/data/e-f.csv new file mode 100644 index 0000000..20d46f5 --- /dev/null +++ b/data/e-f.csv @@ -0,0 +1,26 @@ +ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION +elemento,element,elemento,10,2,"One of the values in a list (or other sequence), also called items.", +encapsulamento,encapsulation,encapsulamento,4,3,The process of transforming a sequence of statements into a function definition., +encapsulamento de dados,data encapsulation,encapsulamento de dados,18,13,A program development plan that involves a prototype using global variables and a final version that makes the global variables into instance attributes., +equivalente,equivalent,equivalente,10,10,Having the same value., +erro semântico,semantic error,erro semântico,2,19,An error in a program that makes it do something other than what the programmer intended., +erro sintático,syntax error,erro sintático,2,16,An error in a program that makes it impossible to parse (and therefore impossible to interpret)., +errro estrutural,shape error,errro estrutural,12,8,"An error caused because a value has the wrong shape; that is, the wrong type or size.", +estrutura de dados,data structure,estrutura de dados,12,7,"A collection of related values, often organized in lists, dictionaries, tuples, etc.", +exceção,exception,exceção,2,17,An error that is detected while the program is running., +executar,execute,executar,2,9,To run a statement and do what it says., +explodir,scatter,explodir,12,4,The operation of treating a sequence as a list of arguments., +expressão,expression,expressão,2,6,"A combination of variables, operators, and values that represents a single result.", +expressão booleana,boolean expression,expressão booleana,5,3,An expression whose value is either True or False., +expressão condicional,conditional expression,expressão condicional,19,1,"An expression that has one of two values, depending on a condition.", +expressão geradora,generator expression,expressão geradora,19,3,An expression with a for loop in parentheses that yields a generator object., +fachada,veneer,“verniz” ou fachada,18,4,A method or function that provides a different interface to another function without doing much computation., +factory,factory,fábrica,19,5,"A function, usually passed as a parameter, used to create objects.", +filtro,filter,filtro,10,8,A processing pattern that traverses a list and selects the elements that satisfy some criterion., +flag,flag,“indicador”,11,19,A boolean variable used to indicate whether a condition is true., +fluxo de execução,flow of execution,fluxo de execução,3,19,The order statements run in., +frame,frame,,3,21,A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function., +função,function,função,3,1,A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result., +função de hash,hash function,função de espalhamento,11,9,A function used by a hashtable to compute the location for a key., +função produtiva,fruitful function,função produtiva,3,11,A function that returns a value., +função pura,pure function,função pura,16,3,A function that does not modify any of the objects it receives as arguments. Most pure functions are fruitful., diff --git a/data/g-i.csv b/data/g-i.csv new file mode 100644 index 0000000..e1ff9b5 --- /dev/null +++ b/data/g-i.csv @@ -0,0 +1,26 @@ +ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION +generalização,generalization,generalização,4,4,The process of replacing something unnecessarily specific (like a number) with something appropriately general (like a variable or parameter)., +"``global``, declaração",``global`` statement,declaração ``global``,11,18,A statement that declares a variable name global., +guarda,guardian,guarda,6,5,A programming pattern that uses a conditional statement to check for and handle circumstances that might cause an error., +hashable,hashable,,11,10,"A type that has a hash function. Immutable types like integers, floats and strings are hashable; mutable types like lists and dictionaries are not.", +herança,inheritance,herança,18,5,The ability to define a new class that is a modified version of a previously defined class., +idêntico,identical,idêntico,10,11,Being the same object (which implies equivalence)., +implementação,implementation,implementação,11,7,A way of performing a computation., +"``import``, instrução",``import`` statement,instrução ``import``,3,15,A statement that reads a module file and creates a module object., +imutável,immutable,imutável,8,7,The property of a sequence whose items cannot be changed., +incrementar,increment,incrementar,7,4,An update that increases the value of a variable (often by one)., +índice,index,índice,8,4,"An integer value used to select an item in a sequence, such as a character in a string. In Python indices start from 0.", +inicialização,initialization,inicialização,7,3,An assignment that gives an initial value to a variable that will be updated., +instância,instance,instância,15,3,An object that belongs to a class., +instanciar,instantiate,instanciar,15,4,To create a new object., +instrução,statement,instrução,2,8,"A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements.", +instrução composta,compound statement,instrução composta,5,8,A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header., +instrução condicional,conditional statement,instrução condicional,5,6,A statement that controls the flow of execution depending on some condition., +inteiro,integer,inteiro,1,12,A type that represents whole numbers., +interpretador,interpreter,interpretador,1,5,A program that reads another program and executes it, +invariante,invariant,invariante,16,6,A condition that should always be true during the execution of a program., +invocação,invocation,invocação,8,11,A statement that calls a method., +item,item,item,8,3,One of the values in a sequence., +item,item,item,11,4,"In a dictionary, another name for a key-value pair.", +iteração,iteration,iteração,7,6,Repeated execution of a set of statements using either a recursive function call or a loop., +iterador,iterator,iterador,12,6,"An object that can iterate through a sequence, but which does not provide list operators and methods.", diff --git a/data/l-m.csv b/data/l-m.csv new file mode 100644 index 0000000..868060f --- /dev/null +++ b/data/l-m.csv @@ -0,0 +1,23 @@ +ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION +laço,loop,"laço, loop",4,2,A part of a program that can run repeatedly., +laço infinito,infinite loop,laço infinito,7,7,A loop in which the terminating condition is never satisfied., +linear,linear,linear,B,8,"An algorithm whose run time is proportional to problem size, at least for large problem sizes.", +linguagem de alto nível,high-level language,linguagem de alto nível,1,2,A programming language like Python that is designed to be easy for humans to read and write., +linguagem de baixo nível,low-level language,linguagem de baixo nível,1,3,A programming language that is designed to be easy for a computer to run; also called “machine language” or “assembly language”., +linguagem formal,formal language,linguagem formal,1,16,"Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages.", +linguagem natural,natural language,linguagem natural,1,15,Any one of the languages that people speak that evolved naturally., +linguagem orientada a objetos,object-oriented language,linguagem orientada a objetos,17,1,"A language that provides features, such as programmer-defined types and methods, that facilitate object-oriented programming.", +lista,list,lista,10,1,A sequence of values., +lista aninhada,nested list,lista aninhada,10,3,A list that is an element of another list., +listcomp,list comprehension,"“compreensão de lista”, listcomp",19,2,An expression with a for loop in square brackets that yields a new list., +map,map,"“mapear”, “de-para”",10,7,A processing pattern that traverses a sequence and performs an operation on each element., +mapeamento,mapping,mapeamento,11,1,A relationship in which each element of one set corresponds to an element of another set., +máquina-modelo,machine model,máquina-modelo,B,2,A simplified representation of a computer used to describe algorithms., +memo,memo,“lembrete”,11,16,A computed value stored to avoid unnecessary future computation., +método,method,método,4,1,A function that is associated with an object and called using dot notation., +método,method,método,17,3,A function that is defined inside a class definition and is invoked on instances of that class., +modificadora,modifier,modificadora,16,4,"A function that changes one or more of the objects it receives as arguments. Most modifiers are void; that is, they return None.", +modo de script,script mode,modo de script,2,11,A way of using the Python interpreter to read code from a script and run it., +modo interativo,interactive mode,modo interativo,2,10,A way of using the Python interpreter by typing code at the prompt., +módulo,module,módulo,3,14,A file that contains a collection of related functions and other definitions., +multiset,multiset,“multi-conjunto”,19,4,A mathematical entity that represents a mapping between the elements of a set and the number of times they appear., diff --git a/data/n-o.csv b/data/n-o.csv new file mode 100644 index 0000000..b27108c --- /dev/null +++ b/data/n-o.csv @@ -0,0 +1,23 @@ +ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION +``None``,``None``,-,3,13,A special value returned by void functions., +notação assintótica,Big-Oh notation,notação assintótica,B,7,"Notation for representing an order of growth; for example, :math:`O(n)` represents the set of functions that grow linearly.", +notação de ponto,dot notation,notação de ponto,3,17,The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name., +objeto,object,objeto,8,1,"Something a variable can refer to. For now, you can use “object” and “value” interchangeably.", +objeto,object,objeto,10,9,Something a variable can refer to. An object has a type and a value., +objeto “pipe”,pipe object,objeto “pipe”,14,14,"An object that represents a running program, allowing a Python program to run commands and read the results.", +objeto ``bytes``,``bytes`` object,objeto ``bytes``,14,12,An object similar to a string., +objeto ``zip``,``zip`` object,objeto ``zip``,12,5,The result of calling a built-in function zip; an object that iterates through a sequence of tuples., +objeto embutido,embedded object,objeto embutido,15,6,An object that is stored as an attribute of another object., +objeto-arquivo,file object,objeto-arquivo,9,1,A value that represents an open file., +objeto-classe,class object,objeto-classe,15,2,An object that contains information about a programmer-defined type. The class object can be used to create instances of the type., +objeto-função,function object,objeto-função,3,3,A value created by a function definition. The name of the function is a variable that refers to a function object., +objeto-módulo,module object,objeto-módulo,3,16,A value created by an import statement that provides access to the values defined in a module., +ocultação de informações,information hiding,ocultação de informações,17,9,"The principle that the interface provided by an object should not depend on its implementation, in particular the representation of its attributes.", +operador,operator,operador,1,9,"A special symbol that represents a simple computation like addition, multiplication, or string concatenation.", +operador de formatação,format operator,operador de formatação,14,2,"An operator, %, that takes a format string and a tuple and generates a string that includes the elements of the tuple formatted as specified by the format string.", +operador de módulo,modulus operator,operador de módulo,5,2,"An operator, denoted with a percent sign (%), that works on integers and returns the remainder when one number is divided by another.", +operador lógico,logical operator,operador lógico,5,5,"One of the operators that combines boolean expressions: and, or, and not.", +operador relacional,relational operator,operador relacional,5,4,"One of the operators that compares its operands: ==, !=, >, <, >=, and <=.", +operando,operand,operando,2,5,One of the values on which an operator operates., +ordem das operações,order of operations,ordem das operações,2,13,Rules governing the order in which expressions involving multiple operators and operands are evaluated., +ordem de crescimento,order of growth,ordem de crescimento,B,6,"A set of functions that all grow in a way considered equivalent for purposes of analysis of algorithms. For example, all functions that grow linearly belong to the same order of growth.", diff --git a/data/p-q.csv b/data/p-q.csv new file mode 100644 index 0000000..c453a54 --- /dev/null +++ b/data/p-q.csv @@ -0,0 +1,23 @@ +ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION +palavra-chave,keyword,palavra-chave,2,4,"A reserved word that is used to parse a program; you cannot use keywords like if, def, and while as variable names.", +par chave-valor,key-value pair,par chave-valor,11,3,The representation of the mapping from a key to a value., +parâmetro,parameter,parâmetro,3,6,A name used inside a function to refer to the value passed as an argument., +percorrer,traverse,percorrer,8,8,"To iterate through the items in a sequence, performing a similar operation on each.", +persistente,persistent,persistente,14,1,Pertaining to a program that runs indefinitely and keeps at least some of its data in permanent storage., +pior caso,worst case,pior caso,B,3,The input that makes a given algorithm run slowest (or require the most space., +plano de desenvolvimento,development plan,plano de desenvolvimento,4,8,A process for writing programs., +polimórfico,polymorphic,polimórfico,17,8,Pertaining to a function that can work with more than one type., +ponto de cruzamento,crossover point,ponto de cruzamento,B,5,The problem size where two algorithms require the same run time or space., +ponto-flutuante,floating-point,ponto-flutuante,1,13,A type that represents numbers with fractional parts., +portabilidade,portability,portabilidade,1,4,A property of a program that can run on more than one kind of computer., +pós-condição,postcondition,pós-condição,4,11,A requirement that should be satisfied by the function before it ends., +pré-condição,precondition,pré-condição,4,10,A requirement that should be satisfied by the caller before a function starts., +"``print``, instrução",``print`` statement,instrução ``print``,1,8,An instruction that causes the Python interpreter to display a value on the screen., +procedimento,void function,“função nula” ou procedimento,3,12,A function that always returns None., +programação funcional,program,programação funcional,1,7,A set of instructions that specifies a computation., +programação funcional,functional programming style,programação funcional,16,5,A style of program design in which the majority of functions are pure., +programação orientada a objetos,object-oriented programming,programação orientada a objetos,17,2,A style of programming in which data and the operations that manipulate it are organized into classes and methods., +prompt,prompt,“sinal de pronto”,1,6,Characters displayed by the interpreter to indicate that it is ready to take input from the user., +prototipar e ajustar,prototype and patch,prototipar e ajustar,16,1,"A development plan that involves writing a rough draft of a program, testing, and correcting errors as they are found.", +pseudo-aleatório,pseudorandom,pseudo-aleatório,13,2,"Pertaining to a sequence of numbers that appears to be random, but is generated by a deterministic program.", +quadrático,quadratic,quadrático,B,9,"An algorithm whose run time is proportional to :math:`n^2`, where :math:`n` is a measure of problem size.", diff --git a/data/r-s.csv b/data/r-s.csv new file mode 100644 index 0000000..da1f919 --- /dev/null +++ b/data/r-s.csv @@ -0,0 +1,27 @@ +ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION +"``raise``, instrução",``raise`` statement,instrução ``raise``,11,13,A statement that (deliberately) raises an exception., +reatribuição,reassignment,reatribuição,7,1,Assigning a new value to a variable that already exists., +recursão,recursion,recursão,5,13,The process of calling the function that is currently executing., +recursão infinita,infinite recursion,recursão infinita,5,15,"A recursion that doesn’t have a base case, or never reaches it. Eventually, an infinite recursion causes a runtime error.", +redução a um problema resolvido,reduction to a previously solved problem,redução a um problema resolvido,9,2,A way of solving a problem by expressing it as an instance of a previously solved problem., +reduzir,reduce,reduzir,10,6,A processing pattern that traverses a sequence and accumulates the elements into a single result., +refatoração,refactoring,refatoração,4,7,The process of modifying a working program to improve function interfaces and other qualities of the code., +referência,reference,referência,10,12,The association between a variable and its value., +relação É-UM,IS-A relationship,relação É-UM,18,8,A relationship between a child class and its parent class., +relação TEM-UM,HAS-A relationship,relação TEM-UM,18,9,A relationship between two classes where instances of one class contain references to instances of the other., +"``return``, instrução",``return`` statement,instrução ``return``,5,12,A statement that causes a function to end immediately and return to the caller., +reunir,gather,reunir,12,3,The operation of assembling a variable-length argument tuple., +script,script,-,2,12,A program stored in a file., +semântica,semantics,semântica,2,18,The meaning of a program., +sequência de formatação,sequence,sequência de formatação,8,2,An ordered collection of values where each value is identified by an integer index., +sequência de formatação,format sequence,sequência de formatação,14,4,"A sequence of characters in a format string, like %d, that specifies how a value should be formatted.", +shell,shell,-,14,13,A program that allows users to type commands and then executes them by starting other programs., +singleton,singleton,-,11,14,A list (or other sequence) with a single element., +sintaxe,syntax,sintaxe,1,18,The rules that govern the structure of a program., +sobrecarga de operadores,operator overloading,sobrecarga de operadores,17,6,Changing the behavior of an operator like + so it works with a programmer-defined type., +sobrepor,override,sobrescrever,13,4,To replace a default value with an argument., +solução de problemas,problem solving,solução de problemas,1,1,"The process of formulating a problem, finding a solution, and expressing it.", +string,string,“cadeia de caracteres”,1,14,A type that represents sequences of characters., +string de formatação,format string,string de formatação,14,3,"A string, used with the format operator, that contains format sequences.", +string vazia,empty string,string vazia,8,6,"A string with no characters and length 0, represented by two quotation marks.", +sujeito,subject,sujeito,17,4,The object a method is invoked on., diff --git a/data/t-v.csv b/data/t-v.csv new file mode 100644 index 0000000..cfe4b72 --- /dev/null +++ b/data/t-v.csv @@ -0,0 +1,17 @@ +ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION +tabela de hash,hashtable,tabela de espalhamento,11,8,The algorithm used to implement Python dictionaries., +tabela de hash,hashtable,tabela de espalhamento,B,11,A data structure that represents a collection of key-value pairs and performs search in constant time., +termo dominante,leading term,"termo dominante, termo de maior expoente",B,4,"In a polynomial, the term with the highest exponent.", +teste de desempenho,benchmarking,teste de desempenho,13,5,The process of choosing between data structures by implementing alternatives and testing them on a sample of the possible inputs., +tipo,type,tipo,1,11,"A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str).", +token,token,“símbolo”,1,17,"One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language.", +traceback,traceback,,3,22,"A list of the functions that are executing, printed when an exception occurs.", +tupla,tuple,tupla,12,1,An immutable sequence of elements., +valor,value,valor,1,10,"One of the basic units of data, like a number or string, that a program manipulates.", +valor,value,valor,11,6,An object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word “value”., +valor default,default value,valor default,13,3,The value given to an optional parameter if no argument is provided., +valor devolvido,return value,valor devolvido,3,10,"The result of a function. If a function call is used as an expression, the return value is the value of the expression.", +variável,variable,variável,2,1,A name that refers to a value., +variável global,global variable,variável global,11,17,A variable defined outside a function. Global variables can be accessed from any function., +variável local,local variable,variável local,3,9,A variable defined inside a function. A local variable can only be used inside its function., +variável temporária,temporary variable,variável temporária,6,1,A variable used to store an intermediate value in a complex calculation., diff --git a/tools/gloss_stats.py b/tools/gloss_stats.py new file mode 100644 index 0000000..a09bbf9 --- /dev/null +++ b/tools/gloss_stats.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python3 + +import csv +import unicodedata +import string +import collections + +GLOSSARY_DATA_PATH = './glossary.csv' +FIELDS = 'term us_term br_term chapter order us_definition br_definition'.split() + +GlossaryEntry = collections.namedtuple('GlossaryEntry', FIELDS) + +def asciize(txt): + """Return only ASCII letters from text""" + return ''.join(c for c in unicodedata.normalize('NFD', txt) + if c in string.ascii_lowercase) + +def count_glossary(): + counter = collections.Counter() + master_glossary = [] + with open(GLOSSARY_DATA_PATH) as csvfile: + reader = csv.DictReader(csvfile, FIELDS) + next(reader) # skip header line + for row in reader: + entry = GlossaryEntry(**row) + #print(entry) + normal_term = asciize(entry.term.casefold()) + counter[normal_term[0]] += 1 + return counter + +if __name__ == '__main__': + res = count_glossary().most_common() + for letter, count in sorted(res): + print(letter, count) From 61f8e14358afbeada253d952eb1bd04dddf70780 Mon Sep 17 00:00:00 2001 From: Caio Ariede Date: Mon, 30 Nov 2015 19:32:29 -0200 Subject: [PATCH 16/28] Glossary letter B --- tools/glossary.csv | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/glossary.csv b/tools/glossary.csv index ee04cb6..2b8475b 100644 --- a/tools/glossary.csv +++ b/tools/glossary.csv @@ -24,12 +24,12 @@ atributo de classe,class attribute,atributo de classe,18,2,An attribute associat atributo de instância,instance attribute,atributo de instância,18,3,An attribute associated with an instance of a class., atualização,update,atualização,7,2,An assignment where the new value of the variable depends on the old., avaliar,evaluate,avaliar,2,7,To simplify an expression by performing the operations in order to yield a single value., -banco de dados,database,banco de dados,14,11,A file whose contents are organized like a dictionary with keys that correspond to values., -bug,bug,-,1,20,An error in a program., -busca,search,busca,8,9,A pattern of traversal that stops when it finds what it is looking for., -busca,lookup,"busca, pesquisa",11,11,A dictionary operation that takes a key and finds the corresponding value., -busca,search,busca,B,10,The problem of locating an element of a collection (like a list or dictionary) or determining that it is not present., -busca invertida,reverse lookup,busca invertida,11,12,A dictionary operation that takes a value and finds one or more keys that map to it., +banco de dados,database,banco de dados,14,11,A file whose contents are organized like a dictionary with keys that correspond to values.,"Um arquivo onde seus conteúdos são organizados como um dicionário, com chaves que correspondem a valores." +bug,bug,-,1,20,An error in a program.,Erro em um programa. +busca,search,busca,8,9,A pattern of traversal that stops when it finds what it is looking for.,Um padrão de travessia que para quando encontra o que está procurando. +busca,lookup,"busca, pesquisa",11,11,A dictionary operation that takes a key and finds the corresponding value.,Uma operação de dicionário que recebe uma chave e procura o valor correspondente. +busca,search,busca,B,10,The problem of locating an element of a collection (like a list or dictionary) or determining that it is not present.,O problema de localizar um elemento em uma coleção (como uma lista ou dicionário) ou determinar se ele não está presente. +busca invertida,reverse lookup,busca invertida,11,12,A dictionary operation that takes a value and finds one or more keys that map to it.,Uma operação de dicionário que recebe um valor e procura por uma ou mais chaves que mapeiam até ele. cabeçalho,header,cabeçalho,3,4,The first line of a function definition., caminho,path,caminho,14,7,A string that identifies a file., caminho absoluto,absolute path,caminho absoluto,14,9,A path that starts from the topmost directory in the file system., From 506b4ed95b297529c803f2136f2691a47ebc9065 Mon Sep 17 00:00:00 2001 From: ermogenes Date: Tue, 1 Dec 2015 10:11:45 -0200 Subject: [PATCH 17/28] Glossary #D translated --- data/d.csv | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/data/d.csv b/data/d.csv index fd8edc0..45e4a96 100644 --- a/data/d.csv +++ b/data/d.csv @@ -1,23 +1,23 @@ -ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION -declaração,declaration,declaração,11,20,A statement like global that tells the interpreter something about a variable., -decrementar,decrement,decrementar,7,5,An update that decreases the value of a variable., -definição de função,function definition,definição de função,3,2,"A statement that creates a new function, specifying its name, parameters, and the statements it contains.", -delimitador,delimiter,delimitador,10,14,A character or string used to indicate where a string should be split., -dependência,dependency,dependência,18,10,"A relationship between two classes where instances of one class use instances of the other class, but do not store them as attributes.", -depuração,debugging,depuração,1,21,The process of finding and correcting bugs., -depuração com patinho de borracha,rubber duck debugging,depuração com patinho de borracha,13,6,"Debugging by explaining your problem to an inanimate object such as a rubber duck. Articulating the problem can help you solve it, even if the rubber duck doesn’t know Python.", -desempacotamento de tupla,tuple assignment,desempacotamento de tupla,12,2,An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left., -desenvolvimento incremental,incremental development,desenvolvimento incremental,6,3,A program development plan intended to avoid debugging by adding and testing only a small amount of code at a time., -desenvolvimento planejado,designed development,desenvolvimento planejado,16,2,A development plan that involves high-level insight into the problem and more planning than incremental development or prototype development., -despacho por tipo,type-based dispatch,despacho por tipo,17,7,A programming pattern that checks the type of an operand and invokes different functions for different types., -desvio,branch,desvio,5,9,One of the alternative sequences of statements in a conditional statement., -determinístico,deterministic,determinístico,13,1,"Pertaining to a program that does the same thing each time it runs, given the same inputs.", -diagrama de chamadas,call graph,diagrama de chamadas,11,15,"A diagram that shows every frame created during the execution of a program, with an arrow from each caller to each callee.", -diagrama de classe,class diagram,diagrama de classe,18,11,A diagram that shows the classes in a program and the relationships between them., -diagrama de estado,state diagram,diagrama de estado,2,3,A graphical representation of a set of variables and the values they refer to., -diagrama de objetos,object diagram,diagrama de objetos,15,9,"A diagram that shows objects, their attributes, and the values of the attributes.", -diagrama de pilha,stack diagram,diagrama de pilha,3,20,"A graphical representation of a stack of functions, their variables, and the values they refer to.", -dicionário,dictionary,dicionário,11,2,A mapping from keys to their corresponding values., -diretório,directory,diretório,14,6,"A named collection of files, also called a folder.", -divisão pelo piso,floor division,divisão pelo piso,5,1,"An operator, denoted //, that divides two numbers and rounds down (toward zero) to an integer.", -docstring,docstring,-,4,9,A string that appears at the top of a function definition to document the function’s interface., +ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION +declaração,declaration,declaração,11,20,A statement like global that tells the interpreter something about a variable.,Uma instrução como global que diz ao interpretador algo sobre uma variável. +decrementar,decrement,decrementar,7,5,An update that decreases the value of a variable.,Uma atualização que reduz o valor de uma variável. +definição de função,function definition,definição de função,3,2,"A statement that creates a new function, specifying its name, parameters, and the statements it contains.","Uma instrução que cria uma nova função especificando seu nome, parâmetros, e as instruções que contém." +delimitador,delimiter,delimitador,10,14,A character or string used to indicate where a string should be split.,Um caractere ou string que indica onde uma string deve ser dividida. +dependência,dependency,dependência,18,10,"A relationship between two classes where instances of one class use instances of the other class, but do not store them as attributes.",Um relacionamento entre duas classes onde instâncias de uma classe usam instâncias de outra classe sem armazená-las como atributos. +depuração,debugging,depuração,1,21,The process of finding and correcting bugs.,Processo de encontrar e corrigir bugs. +depuração com patinho de borracha,rubber duck debugging,depuração com patinho de borracha,13,6,"Debugging by explaining your problem to an inanimate object such as a rubber duck. Articulating the problem can help you solve it, even if the rubber duck doesn’t know Python.","Depuração explicando seu problema para um objeto inanimado como um patinho de borracha. Articular o problema pode ajudar a resolvê-lo, mesmo se o patinho de borracha não conheça Python." +desempacotamento de tupla,tuple assignment,desempacotamento de tupla,12,2,An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left.,Uma atribuição com uma sequencia no lado direito e uma tupla no esquerdo. O lado direito é avaliado e seus elementos atribuídos às variáveis a esquerda. +desenvolvimento incremental,incremental development,desenvolvimento incremental,6,3,A program development plan intended to avoid debugging by adding and testing only a small amount of code at a time., +desenvolvimento planejado,designed development,desenvolvimento planejado,16,2,A development plan that involves high-level insight into the problem and more planning than incremental development or prototype development.,Um plano de desenvolvimento que envolve alto nível de percepção do problema e mais planejamento que os desenvolvimentos incremental e por protótipo. +despacho por tipo,type-based dispatch,despacho por tipo,17,7,A programming pattern that checks the type of an operand and invokes different functions for different types.,Um padrão de programação que verifica o tipo de um operando e invoca diferentes funções para diferentes tipos. +desvio,branch,desvio,5,9,One of the alternative sequences of statements in a conditional statement.,Uma das sequencias de instruções alternativas em uma instrução condicional. +determinístico,deterministic,determinístico,13,1,"Pertaining to a program that does the same thing each time it runs, given the same inputs.","Diz-se de um programa que faz a mesma coisa a cada execução, dadas as mesmas entradas." +diagrama de chamadas,call graph,diagrama de chamadas,11,15,"A diagram that shows every frame created during the execution of a program, with an arrow from each caller to each callee.","Um diagrama que mostra todos os frames criados durante a execução de um programa, com uma seta de cada executor para cada executado." +diagrama de classe,class diagram,diagrama de classe,18,11,A diagram that shows the classes in a program and the relationships between them.,Um diagrama que mostra as classes em um programa e os relacionamentos entre elas. +diagrama de estado,state diagram,diagrama de estado,2,3,A graphical representation of a set of variables and the values they refer to.,Uma representação gráfica de um conjunto de variáveis e os valores a que se referem. +diagrama de objetos,object diagram,diagrama de objetos,15,9,"A diagram that shows objects, their attributes, and the values of the attributes.","Um diagrama que mostra objetos, seus atributos, e os valores dos atributos." +diagrama de pilha,stack diagram,diagrama de pilha,3,20,"A graphical representation of a stack of functions, their variables, and the values they refer to.","Uma representação gráfica de uma pilha de funções, suas variáveis, e os valores a que se referem." +dicionário,dictionary,dicionário,11,2,A mapping from keys to their corresponding values.,Um mapeamento de chaves aos seus valores correspondentes. +diretório,directory,diretório,14,6,"A named collection of files, also called a folder.","Uma coleção nomeada de arquivos, também conhecida como pasta." +divisão pelo piso,floor division,divisão pelo piso,5,1,"An operator, denoted //, that divides two numbers and rounds down (toward zero) to an integer.","Um operador, denotado //, que divide dois números e os arredonda para baixo (em direção ao zero) em um inteiro." +docstring,docstring,-,4,9,A string that appears at the top of a function definition to document the function’s interface.,Uma string no início de uma definição de função que documenta a assinatura da função. From ac947a5b1c5a699e0ff0492fa9f99c623807d3ad Mon Sep 17 00:00:00 2001 From: ermogenes Date: Tue, 1 Dec 2015 12:30:05 -0200 Subject: [PATCH 18/28] Glossary #N-O translated --- data/n-o.csv | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/data/n-o.csv b/data/n-o.csv index b27108c..9677ef8 100644 --- a/data/n-o.csv +++ b/data/n-o.csv @@ -1,23 +1,23 @@ -ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION -``None``,``None``,-,3,13,A special value returned by void functions., -notação assintótica,Big-Oh notation,notação assintótica,B,7,"Notation for representing an order of growth; for example, :math:`O(n)` represents the set of functions that grow linearly.", -notação de ponto,dot notation,notação de ponto,3,17,The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name., -objeto,object,objeto,8,1,"Something a variable can refer to. For now, you can use “object” and “value” interchangeably.", -objeto,object,objeto,10,9,Something a variable can refer to. An object has a type and a value., -objeto “pipe”,pipe object,objeto “pipe”,14,14,"An object that represents a running program, allowing a Python program to run commands and read the results.", -objeto ``bytes``,``bytes`` object,objeto ``bytes``,14,12,An object similar to a string., -objeto ``zip``,``zip`` object,objeto ``zip``,12,5,The result of calling a built-in function zip; an object that iterates through a sequence of tuples., -objeto embutido,embedded object,objeto embutido,15,6,An object that is stored as an attribute of another object., -objeto-arquivo,file object,objeto-arquivo,9,1,A value that represents an open file., -objeto-classe,class object,objeto-classe,15,2,An object that contains information about a programmer-defined type. The class object can be used to create instances of the type., -objeto-função,function object,objeto-função,3,3,A value created by a function definition. The name of the function is a variable that refers to a function object., -objeto-módulo,module object,objeto-módulo,3,16,A value created by an import statement that provides access to the values defined in a module., -ocultação de informações,information hiding,ocultação de informações,17,9,"The principle that the interface provided by an object should not depend on its implementation, in particular the representation of its attributes.", -operador,operator,operador,1,9,"A special symbol that represents a simple computation like addition, multiplication, or string concatenation.", -operador de formatação,format operator,operador de formatação,14,2,"An operator, %, that takes a format string and a tuple and generates a string that includes the elements of the tuple formatted as specified by the format string.", -operador de módulo,modulus operator,operador de módulo,5,2,"An operator, denoted with a percent sign (%), that works on integers and returns the remainder when one number is divided by another.", -operador lógico,logical operator,operador lógico,5,5,"One of the operators that combines boolean expressions: and, or, and not.", -operador relacional,relational operator,operador relacional,5,4,"One of the operators that compares its operands: ==, !=, >, <, >=, and <=.", -operando,operand,operando,2,5,One of the values on which an operator operates., -ordem das operações,order of operations,ordem das operações,2,13,Rules governing the order in which expressions involving multiple operators and operands are evaluated., -ordem de crescimento,order of growth,ordem de crescimento,B,6,"A set of functions that all grow in a way considered equivalent for purposes of analysis of algorithms. For example, all functions that grow linearly belong to the same order of growth.", +ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION +``None``,``None``,-,3,13,A special value returned by void functions.,Um valor especial retornado por procedimentos. +notação assintótica,Big-Oh notation,notação assintótica,B,7,"Notation for representing an order of growth; for example, :math:`O(n)` represents the set of functions that grow linearly.","Notação para representação de uma ordem de crescimento; por exemplo, :math:`O(n)` representa o conjunto de funções que crescem linearmente." +notação de ponto,dot notation,notação de ponto,3,17,The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name.,Sintaxe para chamada de uma função em outro módulo utilizando o nome do módulo seguido por um ponto e o nome da função. +objeto,object,objeto,8,1,"Something a variable can refer to. For now, you can use “object” and “value” interchangeably.","Algo a que uma variável possa se referir. Por enquanto, você pode usar “objeto” e “valor” sem distinção." +objeto,object,objeto,10,9,Something a variable can refer to. An object has a type and a value.,Algo a que uma variável possa se referir. Um objeto possui um tipo e um valor. +objeto “pipe”,pipe object,objeto “pipe”,14,14,"An object that represents a running program, allowing a Python program to run commands and read the results.","Um objeto que representa um programa em execução, permitindo que um programa Python execute programas e leia os resultados." +objeto ``bytes``,``bytes`` object,objeto ``bytes``,14,12,An object similar to a string.,Um objeto similar a uma string. +objeto ``zip``,``zip`` object,objeto ``zip``,12,5,The result of calling a built-in function zip; an object that iterates through a sequence of tuples.,O resultado da chamada de uma função nativa zip; um objeto que itera por uma sequencia de tuplas. +objeto embutido,embedded object,objeto embutido,15,6,An object that is stored as an attribute of another object.,Um objeto que é armazenado como um atributo de outro objeto. +objeto-arquivo,file object,objeto-arquivo,9,1,A value that represents an open file.,Um valor que representa um arquivo aberto. +objeto-classe,class object,objeto-classe,15,2,An object that contains information about a programmer-defined type. The class object can be used to create instances of the type.,Um objeto que contém informações sobre um tipo definido pelo programador. O objeto-classe pode ser utilizado para criar instâncias do tipo. +objeto-função,function object,objeto-função,3,3,A value created by a function definition. The name of the function is a variable that refers to a function object.,Um valor criado por uma definição de função. O nome da função é uma variável que referencia um objeto-função. +objeto-módulo,module object,objeto-módulo,3,16,A value created by an import statement that provides access to the values defined in a module.,Um valor criado por uma instrução import que dá acesso aos valores definidos em um módulo. +ocultação de informações,information hiding,ocultação de informações,17,9,"The principle that the interface provided by an object should not depend on its implementation, in particular the representation of its attributes.","Princípio em que a interface disponibilizada por um objeto não deve depender de sua implementação, em particular da representação de seus atributos." +operador,operator,operador,1,9,"A special symbol that represents a simple computation like addition, multiplication, or string concatenation.","Um símbolo especial que representa uma computação simples como adição, multiplicação ou concatenação de string." +operador de formatação,format operator,operador de formatação,14,2,"An operator, %, that takes a format string and a tuple and generates a string that includes the elements of the tuple formatted as specified by the format string.","Um operador, %, que recebe uma string de formatação e uma tupla e gera uma string que inclui os elementos da tupla formatados conforme especificado na string de formatação." +operador de módulo,modulus operator,operador de módulo,5,2,"An operator, denoted with a percent sign (%), that works on integers and returns the remainder when one number is divided by another.","Um operador, denotado por um sinal de porcentagem (%), que atua em inteiros e retorna o resto da divisão de um número por outro." +operador lógico,logical operator,operador lógico,5,5,"One of the operators that combines boolean expressions: and, or, and not.","Um dos operadores que combinam expressões booleanas: and, or e not." +operador relacional,relational operator,operador relacional,5,4,"One of the operators that compares its operands: ==, !=, >, <, >=, and <=.","Um dos operadores que comparam os operandos: ==, !=, >, <, >= e <=." +operando,operand,operando,2,5,One of the values on which an operator operates.,Um dos valores sobre os quais um operador opera. +ordem das operações,order of operations,ordem das operações,2,13,Rules governing the order in which expressions involving multiple operators and operands are evaluated.,Regras que determinam a ordem em que expressões envolvendo múltiplos operadores e operandos são avaliados. +ordem de crescimento,order of growth,ordem de crescimento,B,6,"A set of functions that all grow in a way considered equivalent for purposes of analysis of algorithms. For example, all functions that grow linearly belong to the same order of growth.","Um conjunto de funções que crescem de forma equivalente do ponto de vista da análise de algoritmos. Por exemplo, todas as funções que crescem linearmente pertencem à mesma ordem de crescimento." From c3c8405b200d15cf57c8f55c2d56c8ff441831c8 Mon Sep 17 00:00:00 2001 From: Andre Almar Date: Tue, 1 Dec 2015 15:33:48 -0200 Subject: [PATCH 19/28] p-q.csv glossary translated --- data/p-q.csv | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/data/p-q.csv b/data/p-q.csv index c453a54..1a867c8 100644 --- a/data/p-q.csv +++ b/data/p-q.csv @@ -1,23 +1,23 @@ ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION -palavra-chave,keyword,palavra-chave,2,4,"A reserved word that is used to parse a program; you cannot use keywords like if, def, and while as variable names.", -par chave-valor,key-value pair,par chave-valor,11,3,The representation of the mapping from a key to a value., -parâmetro,parameter,parâmetro,3,6,A name used inside a function to refer to the value passed as an argument., -percorrer,traverse,percorrer,8,8,"To iterate through the items in a sequence, performing a similar operation on each.", -persistente,persistent,persistente,14,1,Pertaining to a program that runs indefinitely and keeps at least some of its data in permanent storage., -pior caso,worst case,pior caso,B,3,The input that makes a given algorithm run slowest (or require the most space., -plano de desenvolvimento,development plan,plano de desenvolvimento,4,8,A process for writing programs., -polimórfico,polymorphic,polimórfico,17,8,Pertaining to a function that can work with more than one type., -ponto de cruzamento,crossover point,ponto de cruzamento,B,5,The problem size where two algorithms require the same run time or space., -ponto-flutuante,floating-point,ponto-flutuante,1,13,A type that represents numbers with fractional parts., -portabilidade,portability,portabilidade,1,4,A property of a program that can run on more than one kind of computer., -pós-condição,postcondition,pós-condição,4,11,A requirement that should be satisfied by the function before it ends., -pré-condição,precondition,pré-condição,4,10,A requirement that should be satisfied by the caller before a function starts., -"``print``, instrução",``print`` statement,instrução ``print``,1,8,An instruction that causes the Python interpreter to display a value on the screen., -procedimento,void function,“função nula” ou procedimento,3,12,A function that always returns None., -programação funcional,program,programação funcional,1,7,A set of instructions that specifies a computation., -programação funcional,functional programming style,programação funcional,16,5,A style of program design in which the majority of functions are pure., -programação orientada a objetos,object-oriented programming,programação orientada a objetos,17,2,A style of programming in which data and the operations that manipulate it are organized into classes and methods., -prompt,prompt,“sinal de pronto”,1,6,Characters displayed by the interpreter to indicate that it is ready to take input from the user., -prototipar e ajustar,prototype and patch,prototipar e ajustar,16,1,"A development plan that involves writing a rough draft of a program, testing, and correcting errors as they are found.", -pseudo-aleatório,pseudorandom,pseudo-aleatório,13,2,"Pertaining to a sequence of numbers that appears to be random, but is generated by a deterministic program.", -quadrático,quadratic,quadrático,B,9,"An algorithm whose run time is proportional to :math:`n^2`, where :math:`n` is a measure of problem size.", +palavra-chave,keyword,palavra-chave,2,4,"A reserved word that is used to parse a program; you cannot use keywords like if, def, and while as variable names.","Uma palavra reservada que é usada para analisar um programa; você não pode usar palavras-chave como por exemplo if, def, e while como nomes de variáveis.", +par chave-valor,key-value pair,par chave-valor,11,3,The representation of the mapping from a key to a value.,A representação do mapeamento a partir de uma chave para um determinado valor. +parâmetro,parameter,parâmetro,3,6,A name used inside a function to refer to the value passed as an argument.,Um nome usado dentro de uma função para se referir a um valor passado como um argumento. +percorrer,traverse,percorrer,8,8,"To iterate through the items in a sequence, performing a similar operation on each.",Percorrer os items em uma sequência, realizando uma operação similar em cada item. +persistente,persistent,persistente,14,1,Pertaining to a program that runs indefinitely and keeps at least some of its data in permanent storage.,Refere-se a um programa que é executado indefinidamente e mantém ao menos alguns dos seus dados em armazenamento permanente. +pior caso,worst case,pior caso,B,3,The input that makes a given algorithm run slowest (or require the most space.,Uma entrada que faz com que um determinado algoritmo execute de maneira mais lenta (ou exige mais espaço). +plano de desenvolvimento,development plan,plano de desenvolvimento,4,8,A process for writing programs.,Processo para escrever programas. +polimórfico,polymorphic,polimórfico,17,8,Pertaining to a function that can work with more than one type.,Refere-se a uma função que pode lidar com mais de um tipo. +ponto de cruzamento,crossover point,ponto de cruzamento,B,5,The problem size where two algorithms require the same run time or space.,Um problema que ocorre quando dois algoritmos requerem o mesmo tempo de execução ou espaço. +ponto-flutuante,floating-point,ponto-flutuante,1,13,A type that represents numbers with fractional parts.,Um tipo que representa números em partes fracionadas. +portabilidade,portability,portabilidade,1,4,A property of a program that can run on more than one kind of computer.,Propriedade de um programa que pode ser executado em mais de um tipo de computador. +pós-condição,postcondition,pós-condição,4,11,A requirement that should be satisfied by the function before it ends.,Requisito que deve ser satisfeito pela função antes que esta termine. +pré-condição,precondition,pré-condição,4,10,A requirement that should be satisfied by the caller before a function starts.,Um requisito que deve ser satisfeito por quem a chamou, antes desta função iniciar. +"``print``, instrução",``print`` statement,instrução ``print``,1,8,An instruction that causes the Python interpreter to display a value on the screen.,Uma instrução que faz com que o interpretador Python mostre um determinado valor na tela. +procedimento,void function,“função nula” ou procedimento,3,12,A function that always returns None.,Uma função que sempre retorna vazio +programação funcional,program,programação funcional,1,7,A set of instructions that specifies a computation.,Um conjunto de instruções que especifica um cálculo. +programação funcional,functional programming style,programação funcional,16,5,A style of program design in which the majority of functions are pure.,Um estilo de programação em que a maioria das funções são puras. +programação orientada a objetos,object-oriented programming,programação orientada a objetos,17,2,A style of programming in which data and the operations that manipulate it are organized into classes and methods.,Um estilo de programação em que dados e as operações que os manipulam são organizados em classes e métodos. +prompt,prompt,“sinal de pronto”,1,6,Characters displayed by the interpreter to indicate that it is ready to take input from the user.,Caracteres exibidos pelo interpretador para indicar que ele está pronto para receber a entrada do usuário. +prototipar e ajustar,prototype and patch,prototipar e ajustar,16,1,"A development plan that involves writing a rough draft of a program, testing, and correcting errors as they are found.",Um plano de desenvolvimento que envolve escrever um esboço de um programa, testar, e corrigir os erros assim que eles forem encontrados. +pseudo-aleatório,pseudorandom,pseudo-aleatório,13,2,"Pertaining to a sequence of numbers that appears to be random, but is generated by a deterministic program.",Uma sequência de números que parecem ser aleatórios, mas na verdade são gerados por uma programa com sequência determinística. +quadrático,quadratic,quadrático,B,9,"An algorithm whose run time is proportional to :math:`n^2`, where :math:`n` is a measure of problem size.",Um algoritmo cujo tempo de execução é proporcional a: mat: `n^2`, aonde mat:`n`, é uma medida de tamanho do problema. From 4e53107e216a686ab087b5e8110127eeb57eef2e Mon Sep 17 00:00:00 2001 From: Andre Almar Date: Tue, 1 Dec 2015 17:30:41 -0200 Subject: [PATCH 20/28] l-m.csv translated --- data/l-m.csv | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/data/l-m.csv b/data/l-m.csv index 868060f..2c1bded 100644 --- a/data/l-m.csv +++ b/data/l-m.csv @@ -1,23 +1,23 @@ ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION -laço,loop,"laço, loop",4,2,A part of a program that can run repeatedly., -laço infinito,infinite loop,laço infinito,7,7,A loop in which the terminating condition is never satisfied., -linear,linear,linear,B,8,"An algorithm whose run time is proportional to problem size, at least for large problem sizes.", -linguagem de alto nível,high-level language,linguagem de alto nível,1,2,A programming language like Python that is designed to be easy for humans to read and write., -linguagem de baixo nível,low-level language,linguagem de baixo nível,1,3,A programming language that is designed to be easy for a computer to run; also called “machine language” or “assembly language”., -linguagem formal,formal language,linguagem formal,1,16,"Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages.", -linguagem natural,natural language,linguagem natural,1,15,Any one of the languages that people speak that evolved naturally., -linguagem orientada a objetos,object-oriented language,linguagem orientada a objetos,17,1,"A language that provides features, such as programmer-defined types and methods, that facilitate object-oriented programming.", -lista,list,lista,10,1,A sequence of values., -lista aninhada,nested list,lista aninhada,10,3,A list that is an element of another list., -listcomp,list comprehension,"“compreensão de lista”, listcomp",19,2,An expression with a for loop in square brackets that yields a new list., -map,map,"“mapear”, “de-para”",10,7,A processing pattern that traverses a sequence and performs an operation on each element., -mapeamento,mapping,mapeamento,11,1,A relationship in which each element of one set corresponds to an element of another set., -máquina-modelo,machine model,máquina-modelo,B,2,A simplified representation of a computer used to describe algorithms., -memo,memo,“lembrete”,11,16,A computed value stored to avoid unnecessary future computation., -método,method,método,4,1,A function that is associated with an object and called using dot notation., -método,method,método,17,3,A function that is defined inside a class definition and is invoked on instances of that class., -modificadora,modifier,modificadora,16,4,"A function that changes one or more of the objects it receives as arguments. Most modifiers are void; that is, they return None.", -modo de script,script mode,modo de script,2,11,A way of using the Python interpreter to read code from a script and run it., -modo interativo,interactive mode,modo interativo,2,10,A way of using the Python interpreter by typing code at the prompt., -módulo,module,módulo,3,14,A file that contains a collection of related functions and other definitions., -multiset,multiset,“multi-conjunto”,19,4,A mathematical entity that represents a mapping between the elements of a set and the number of times they appear., +laço,loop,"laço, loop",4,2,A part of a program that can run repeatedly.,Parte de um programa que pode ser executada repetidamente. +laço infinito,infinite loop,laço infinito,7,7,A loop in which the terminating condition is never satisfied.,Um laço cuja sua condição de término nunca é satisfeita. +linear,linear,linear,B,8,"An algorithm whose run time is proportional to problem size, at least for large problem sizes.",Um algoritmo cujo tempo de execução é proporcional ao tamanho do problema, pelo menos para os problemas de tamanhos grandes. +linguagem de alto nível,high-level language,linguagem de alto nível,1,2,A programming language like Python that is designed to be easy for humans to read and write.,Linguagem de programação, como a linguagem Python, que é projetada para ser facilmente entendida por humanos. +linguagem de baixo nível,low-level language,linguagem de baixo nível,1,3,A programming language that is designed to be easy for a computer to run; also called “machine language” or “assembly language”.,Uma linguagem de programação que é projetada para ser fácilmente executada por um computador; também conhecida como "linguagem de máquina" ou "linguagem de assembly". +linguagem formal,formal language,linguagem formal,1,16,"Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages.",Qualquer linguagem que as pessoas desenvolveram para propósitos específicos, como representar idéias matemáticas ou programas de computador; todas as linguagens de programação são linguagens formais. +linguagem natural,natural language,linguagem natural,1,15,Any one of the languages that people speak that evolved naturally.,Qualquer língua que as pessoas falam e que evoluíram naturalmente com o passar do tempo. +linguagem orientada a objetos,object-oriented language,linguagem orientada a objetos,17,1,"A language that provides features, such as programmer-defined types and methods, that facilitate object-oriented programming.",Uma linguagem que fornece recursos como tipos e métodos e que facilita a programação orientada a objetos. +lista,list,lista,10,1,A sequence of values.,Sequência de valores. +lista aninhada,nested list,lista aninhada,10,3,A list that is an element of another list.,Uma lista que é um elemento de uma outra lista. +listcomp,list comprehension,"“compreensão de lista”, listcomp",19,2,An expression with a for loop in square brackets that yields a new list.,Uma expressão com um laço for entre colchetes que produz uma nova lista. +map,map,"“mapear”, “de-para”",10,7,A processing pattern that traverses a sequence and performs an operation on each element.,Um padrão de processamento que percorre uma sequência e executa uma operação em cada elemento. +mapeamento,mapping,mapeamento,11,1,A relationship in which each element of one set corresponds to an element of another set.,Um relacionamento aonde cada elemento de um conjunto corresponde a um elemento de outro conjunto. +máquina-modelo,machine model,máquina-modelo,B,2,A simplified representation of a computer used to describe algorithms.,Uma representação simplificada de um computador usado para descrever algoritmos. +memo,memo,“lembrete”,11,16,A computed value stored to avoid unnecessary future computation.,Um valor calculado que é armazenado para evitar cálculo computacional desnecessário no futuro. +método,method,método,4,1,A function that is associated with an object and called using dot notation.,Função que é associada com um objeto e é chamada usando notação de ponto. +método,method,método,17,3,A function that is defined inside a class definition and is invoked on instances of that class.,Função que é definida dentro de uma definição de classe e é invocada em instâncias desta classe. +modificadora,modifier,modificadora,16,4,"A function that changes one or more of the objects it receives as arguments. Most modifiers are void; that is, they return None.",Uma função que modifica um ou mais objetos que recebe como argumento. A maioria dos modificadores são vazios; isto é, eles retornam vazio. +modo de script,script mode,modo de script,2,11,A way of using the Python interpreter to read code from a script and run it.,Uma maneira de usar o interpretador Python para ler código de um script e executá-lo. +modo interativo,interactive mode,modo interativo,2,10,A way of using the Python interpreter by typing code at the prompt.,Uma maneira de usar o interpretador Python digitando o código no prompt de comando. +módulo,module,módulo,3,14,A file that contains a collection of related functions and other definitions.,Um arquivo que contém uma coleção de funções relacionadas e outras definiçòes. +multiset,multiset,“multi-conjunto”,19,4,A mathematical entity that represents a mapping between the elements of a set and the number of times they appear.,Uma entidade matemática que representa um mapeamento entre os elementos de um conjunto e o número de vezes que eles aparecem. From 7d080f5a4e30e318354e4cd7d6c22a4b152179ed Mon Sep 17 00:00:00 2001 From: Caio Ariede Date: Tue, 1 Dec 2015 18:09:30 -0200 Subject: [PATCH 21/28] move contents already translated to data/b.csv --- data/b.csv | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/b.csv b/data/b.csv index 5749e38..ac547ac 100644 --- a/data/b.csv +++ b/data/b.csv @@ -1,7 +1,7 @@ ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION -banco de dados,database,banco de dados,14,11,A file whose contents are organized like a dictionary with keys that correspond to values., -bug,bug,-,1,20,An error in a program., -busca,search,busca,8,9,A pattern of traversal that stops when it finds what it is looking for., -busca,lookup,"busca, pesquisa",11,11,A dictionary operation that takes a key and finds the corresponding value., -busca,search,busca,B,10,The problem of locating an element of a collection (like a list or dictionary) or determining that it is not present., -busca invertida,reverse lookup,busca invertida,11,12,A dictionary operation that takes a value and finds one or more keys that map to it., +banco de dados,database,banco de dados,14,11,A file whose contents are organized like a dictionary with keys that correspond to values.,"Um arquivo onde seus conteúdos são organizados como um dicionário, com chaves que correspondem a valores." +bug,bug,-,1,20,An error in a program.,Erro em um programa. +busca,search,busca,8,9,A pattern of traversal that stops when it finds what it is looking for.,Um padrão de travessia que para quando encontra o que está procurando. +busca,lookup,"busca, pesquisa",11,11,A dictionary operation that takes a key and finds the corresponding value.,Uma operação de dicionário que recebe uma chave e procura o valor correspondente. +busca,search,busca,B,10,The problem of locating an element of a collection (like a list or dictionary) or determining that it is not present.,O problema de localizar um elemento em uma coleção (como uma lista ou dicionário) ou determinar se ele não está presente. +busca invertida,reverse lookup,busca invertida,11,12,A dictionary operation that takes a value and finds one or more keys that map to it.,Uma operação de dicionário que recebe um valor e procura por uma ou mais chaves que mapeiam até ele. From 02c954c787a51d6984fad7653f2b925fae24a2db Mon Sep 17 00:00:00 2001 From: "Clayton A. Alves" Date: Tue, 1 Dec 2015 22:24:08 -0300 Subject: [PATCH 22/28] t-v.csv translated --- data/t-v.csv | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/data/t-v.csv b/data/t-v.csv index cfe4b72..54ada2d 100644 --- a/data/t-v.csv +++ b/data/t-v.csv @@ -1,17 +1,17 @@ ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION -tabela de hash,hashtable,tabela de espalhamento,11,8,The algorithm used to implement Python dictionaries., -tabela de hash,hashtable,tabela de espalhamento,B,11,A data structure that represents a collection of key-value pairs and performs search in constant time., -termo dominante,leading term,"termo dominante, termo de maior expoente",B,4,"In a polynomial, the term with the highest exponent.", -teste de desempenho,benchmarking,teste de desempenho,13,5,The process of choosing between data structures by implementing alternatives and testing them on a sample of the possible inputs., -tipo,type,tipo,1,11,"A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str).", -token,token,“símbolo”,1,17,"One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language.", -traceback,traceback,,3,22,"A list of the functions that are executing, printed when an exception occurs.", -tupla,tuple,tupla,12,1,An immutable sequence of elements., -valor,value,valor,1,10,"One of the basic units of data, like a number or string, that a program manipulates.", -valor,value,valor,11,6,An object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word “value”., -valor default,default value,valor default,13,3,The value given to an optional parameter if no argument is provided., -valor devolvido,return value,valor devolvido,3,10,"The result of a function. If a function call is used as an expression, the return value is the value of the expression.", -variável,variable,variável,2,1,A name that refers to a value., -variável global,global variable,variável global,11,17,A variable defined outside a function. Global variables can be accessed from any function., -variável local,local variable,variável local,3,9,A variable defined inside a function. A local variable can only be used inside its function., -variável temporária,temporary variable,variável temporária,6,1,A variable used to store an intermediate value in a complex calculation., +tabela de hash,hashtable,tabela de espalhamento,11,8,The algorithm used to implement Python dictionaries.,Algoritmo utilizado para implementar dicionários Python. +tabela de hash,hashtable,tabela de espalhamento,B,11,A data structure that represents a collection of key-value pairs and performs search in constant time.,Uma estrutura de dados que representa uma coleção de pares chave-valor e permite realizar busca em tempo constante. +termo dominante,leading term,"termo dominante, termo de maior expoente",B,4,"In a polynomial, the term with the highest exponent.",Termo com o maior expoente em um polinômio. +teste de desempenho,benchmarking,teste de desempenho,13,5,The process of choosing between data structures by implementing alternatives and testing them on a sample of the possible inputs.,Processo de escolher entre estruturas de dados, implementando alternativas e as testando com amostras de possíveis entradas. +tipo,type,tipo,1,11,"A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str).",Categoria de valores. Os tipos que vimos até agora são inteiro (tipo int), números de ponto flutuante (tipo float) e strings (tipo str). +token,token,“símbolo”,1,17,"One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language.",Um dos elementos básicos da estrutura sintática de um programa, análogo a uma palavra em uma linguagem natural. +traceback,traceback,,3,22,"A list of the functions that are executing, printed when an exception occurs.",Lista das funções em execução, impressos quando uma exceção ocorre. +tupla,tuple,tupla,12,1,An immutable sequence of elements.,Uma sequência imutável de elementos. +valor,value,valor,1,10,"One of the basic units of data, like a number or string, that a program manipulates.",Uma das unidades básicas de dados, como um número ou uma string, que um programa pode manipular. +valor,value,valor,11,6,An object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word “value”.,Um objeto que aparece em um dicionário como a segunda parte de um par chave-valor. É mais específico que o uso anterior da palavra valor. +valor default,default value,valor default,13,3,The value given to an optional parameter if no argument is provided.,Valor dado a um parâmetro opcional se nenhum argumento for fornecido. +valor devolvido,return value,valor devolvido,3,10,"The result of a function. If a function call is used as an expression, the return value is the value of the expression.",Resultado de uma função. Se uma chamada de função for usada como uma expressão, o valor de retorno é o valor da expressão. +variável,variable,variável,2,1,A name that refers to a value.,Um nome que faz referencia a um valor. +variável global,global variable,variável global,11,17,A variable defined outside a function. Global variables can be accessed from any function.,Uma variável definida fora de uma função. Variáveis globais podem ser acessadas por qualquer função. +variável local,local variable,variável local,3,9,A variable defined inside a function. A local variable can only be used inside its function.,Uma variável definida dentro de uma função. Uma variável local só pode ser utilizada dentro da função onde foi definida. +variável temporária,temporary variable,variável temporária,6,1,A variable used to store an intermediate value in a complex calculation.,Uma variável utilizada para armazenar um valor intermediário em um cálculo complexo. From 0e3b4fae16f74f0ba0016e5b8f7f172c5a380022 Mon Sep 17 00:00:00 2001 From: Andre Almar Date: Wed, 2 Dec 2015 11:42:49 -0200 Subject: [PATCH 23/28] t-v.csv fixed typos --- data/t-v.csv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/t-v.csv b/data/t-v.csv index 54ada2d..f058467 100644 --- a/data/t-v.csv +++ b/data/t-v.csv @@ -4,14 +4,14 @@ tabela de hash,hashtable,tabela de espalhamento,B,11,A data structure that repre termo dominante,leading term,"termo dominante, termo de maior expoente",B,4,"In a polynomial, the term with the highest exponent.",Termo com o maior expoente em um polinômio. teste de desempenho,benchmarking,teste de desempenho,13,5,The process of choosing between data structures by implementing alternatives and testing them on a sample of the possible inputs.,Processo de escolher entre estruturas de dados, implementando alternativas e as testando com amostras de possíveis entradas. tipo,type,tipo,1,11,"A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str).",Categoria de valores. Os tipos que vimos até agora são inteiro (tipo int), números de ponto flutuante (tipo float) e strings (tipo str). -token,token,“símbolo”,1,17,"One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language.",Um dos elementos básicos da estrutura sintática de um programa, análogo a uma palavra em uma linguagem natural. -traceback,traceback,,3,22,"A list of the functions that are executing, printed when an exception occurs.",Lista das funções em execução, impressos quando uma exceção ocorre. +token,token,“símbolo”,1,17,"One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language.",Um dos elementos básicos da estrutura sintática de um programa, análogo à uma palavra em uma linguagem natural. +traceback,traceback,,3,22,"A list of the functions that are executing, printed when an exception occurs.",Lista das funções em execução que são impressas quando uma exceção ocorre. tupla,tuple,tupla,12,1,An immutable sequence of elements.,Uma sequência imutável de elementos. valor,value,valor,1,10,"One of the basic units of data, like a number or string, that a program manipulates.",Uma das unidades básicas de dados, como um número ou uma string, que um programa pode manipular. valor,value,valor,11,6,An object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word “value”.,Um objeto que aparece em um dicionário como a segunda parte de um par chave-valor. É mais específico que o uso anterior da palavra valor. valor default,default value,valor default,13,3,The value given to an optional parameter if no argument is provided.,Valor dado a um parâmetro opcional se nenhum argumento for fornecido. valor devolvido,return value,valor devolvido,3,10,"The result of a function. If a function call is used as an expression, the return value is the value of the expression.",Resultado de uma função. Se uma chamada de função for usada como uma expressão, o valor de retorno é o valor da expressão. -variável,variable,variável,2,1,A name that refers to a value.,Um nome que faz referencia a um valor. +variável,variable,variável,2,1,A name that refers to a value.,Um nome que faz referência a um valor. variável global,global variable,variável global,11,17,A variable defined outside a function. Global variables can be accessed from any function.,Uma variável definida fora de uma função. Variáveis globais podem ser acessadas por qualquer função. variável local,local variable,variável local,3,9,A variable defined inside a function. A local variable can only be used inside its function.,Uma variável definida dentro de uma função. Uma variável local só pode ser utilizada dentro da função onde foi definida. variável temporária,temporary variable,variável temporária,6,1,A variable used to store an intermediate value in a complex calculation.,Uma variável utilizada para armazenar um valor intermediário em um cálculo complexo. From c7f03e7a667c344b2ef4ccfef176e5b993029898 Mon Sep 17 00:00:00 2001 From: Patrick Mazulo Date: Mon, 7 Dec 2015 15:37:27 -0300 Subject: [PATCH 24/28] Translated Glossary C --- data/c.csv | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/data/c.csv b/data/c.csv index 65a1e13..773e60c 100644 --- a/data/c.csv +++ b/data/c.csv @@ -1,28 +1,28 @@ ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION -cabeçalho,header,cabeçalho,3,4,The first line of a function definition., -caminho,path,caminho,14,7,A string that identifies a file., -caminho absoluto,absolute path,caminho absoluto,14,9,A path that starts from the topmost directory in the file system., -caminho relativo,relative path,caminho relativo,14,8,A path that starts from the current directory., -capturar,catch,capturar,14,10,To prevent an exception from terminating a program using the try and except statements., -cardinalidade,multiplicity,"cardinalidade, multiplicidadade",18,12,"A notation in a class diagram that shows, for a HAS-A relationship, how many references there are to instances of another class.", -caso base,base case,caso base,5,14,A conditional branch in a recursive function that does not make a recursive call., -caso especial,special case,caso especial,9,3,A test case that is atypical or non-obvious (and less likely to be handled correctly)., -chamada de função,function call,chamada de função,3,7,A statement that runs a function. It consists of the function name followed by an argument list in parentheses., -chave,key,chave,11,5,An object that appears in a dictionary as the first part of a key-value pair., -classe,class,classe,15,1,A programmer-defined type. A class definition creates a new class object., -classe base,parent class,"classe base, superclasse",18,6,The class from which a child class inherits., -classe derivada,child class,"classe derivada, subclasse",18,7,A new class created by inheriting from an existing class; also called a “subclass”., -codificar,encode,codificar,18,1,To represent one set of values using another set of values by constructing a mapping between them., -código morto,dead code,código morto,6,2,"Part of a program that can never run, often because it appears after a return statement.", -código provisório,scaffolding,"“andaime”, código provisório",6,4,Code that is used during program development but is not part of the final version., -código provisório,slice,fatia,8,5,A part of a string specified by a range of indices., -comentário,comment,comentário,2,15,Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program., -composição,composition,composição,3,18,"Using an expression as part of a larger expression, or a statement as part of a larger statement.", -concatenar,concatenate,concatenar,2,14,To join two operands end-to-end., -condição,condition,condição,5,7,The boolean expression in a conditional statement that determines which branch runs., -condicional aninhado,nested conditional,condicional aninhado,5,11,A conditional statement that appears in one of the branches of another conditional statement., -condicional encadeado,chained conditional,condicional encadeado,5,10,A conditional statement with a series of alternative branches., -contador,counter,contador,8,10,"A variable used to count something, usually initialized to zero and then incremented.", -cópia profunda,deep copy,cópia profunda,15,8,"To copy the contents of an object as well as any embedded objects, and any objects embedded in them, and so on; implemented by the deepcopy function in the copy module.", -cópia rasa,shallow copy,cópia rasa,15,7,"To copy the contents of an object, including any references to embedded objects; implemented by the copy function in the copy module.", -corpo,body,corpo,3,5,The sequence of statements inside a function definition., +cabeçalho,header,cabeçalho,3,4,The first line of a function definition.,A primeira linha da definição da função. +caminho,path,caminho,14,7,A string that identifies a file.,Uma string que identifica um arquivo. +caminho absoluto,absolute path,caminho absoluto,14,9,A path that starts from the topmost directory in the file system.,Um caminho que começa do diretório de nível mais elevado no sistema de arquivos. +caminho relativo,relative path,caminho relativo,14,8,A path that starts from the current directory.,Um caminho que começa do diretório atual. +capturar,catch,capturar,14,10,To prevent an exception from terminating a program using the try and except statements.,Para prevenir uma exceção de terminar um programa usando as declarações try e except. +cardinalidade,multiplicity,"cardinalidade, multiplicidadade",18,12,"A notation in a class diagram that shows, for a HAS-A relationship, how many references there are to instances of another class.","Uma notação em um diagrama de classe que mostra, através de uma relação TEM-A, quantas referências existem para instâncias de outras classes." +caso base,base case,caso base,5,14,A conditional branch in a recursive function that does not make a recursive call.,Uma ramificação condicional em uma função recursiva que não faz uma chamada recursiva. +caso especial,special case,caso especial,9,3,A test case that is atypical or non-obvious (and less likely to be handled correctly).,Um caso de teste que é atípico e nem óbvio (e menos susceptível de ser processado corretamente. +chamada de função,function call,chamada de função,3,7,A statement that runs a function. It consists of the function name followed by an argument list in parentheses.,Um comando que executa uma função. Ele consiste do nome da função seguido por uma lista de argumentos entre parentêses. +chave,key,chave,11,5,An object that appears in a dictionary as the first part of a key-value pair.,Um objeto que aparece em um dicionário como a primeira parte de um par chave-valor. +classe,class,classe,15,1,A programmer-defined type. A class definition creates a new class object.,Um tipo definido pelo programador. Uma definição de classe cria um novo objeto de classe. +classe base,parent class,"classe base, superclasse",18,6,The class from which a child class inherits.,A classe do qual uma classe filha herda. +classe derivada,child class,"classe derivada, subclasse",18,7,"A new class created by inheriting from an existing class, also called a “subclass”.","Uma nova classe criada ao herdar de outra classe existente, também chamada de subclasse." +codificar,encode,codificar,18,1,To represent one set of values using another set of values by constructing a mapping between them.,Representar um conjunto de valores usando um outro conjunto de valores ao construir um mapeamento entre eles. +código morto,dead code,código morto,6,2,"Part of a program that can never run, often because it appears after a return statement.","Parte de um programa que nunca é executado, em geral por aparecer após um comando “return”." +código provisório,scaffolding,"“andaime”, código provisório",6,4,Code that is used during program development but is not part of the final version.,Código que é usado durante o desenvolvimento do programa mas não é parte da versão final. +código provisório,slice,fatia,8,5,A part of a string specified by a range of indices.,A parte de uma string especificada pelo intervalo de índices. +comentário,comment,comentário,2,15,Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program.,Informação em um programa que é destinada para outros programadores (ou qualquer um que ler o código fonte) e não efeito na execução do programa. +composição,composition,composição,3,18,"Using an expression as part of a larger expression, or a statement as part of a larger statement.","Usar uma expressão como parte de outra expressão maior, ou uma declaração como parte de uma declaração maior." +concatenar,concatenate,concatenar,2,14,To join two operands end-to-end.,Para juntar dois operando de ponta a ponta. +condição,condition,condição,5,7,The boolean expression in a conditional statement that determines which branch runs.,Uma expressão booleana em um comando condicional que determina a ramificação a ser executada. +condicional aninhado,nested conditional,condicional aninhado,5,11,A conditional statement that appears in one of the branches of another conditional statement.,"Uma estrutura de programa dentro de outra, tal como um comando condicional dentro de uma ramificação de um outro comando condicional." +condicional encadeado,chained conditional,condicional encadeado,5,10,A conditional statement with a series of alternative branches.,Uma ramificação condicional com mais do que dois fluxos de execução possíveis. +contador,counter,contador,8,10,"A variable used to count something, usually initialized to zero and then incremented.","Uma variável usada para contar algo, em geral inicializada com zero e incrementada no corpo de um laço." +cópia profunda,deep copy,cópia profunda,15,8,"To copy the contents of an object as well as any embedded objects, and any objects embedded in them, and so on; implemented by the deepcopy function in the copy module.","Para copiar o conteúdo de um objeto, bem como quaisquer objetos incorporados, e dos objetos embutidos neles, e assim por diante; implementado pela função “deepcopy” do módulo “copy”." +cópia rasa,shallow copy,cópia rasa,15,7,"To copy the contents of an object, including any references to embedded objects; implemented by the copy function in the copy module.","Para copiar o conteúdo de um objeto, incluindo quaisquer referências a objetos embutidos; implementada pela função “copy” no módulo “copy”." +corpo,body,corpo,3,5,The sequence of statements inside a function definition.,A sequência de comandos dentro de uma definição de função. From da24130ed1d4ee91516b2e6016a76cad7fb3988d Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Mon, 7 Dec 2015 18:20:50 -0200 Subject: [PATCH 25/28] trabalhando na integracao dos glossarios separados --- book/C-glossary.rst | 696 --------------------------------------- book/glossary/10.txt | 42 --- book/glossary/11.txt | 60 ---- book/glossary/12.txt | 24 -- book/glossary/13.txt | 18 - book/glossary/14.txt | 42 --- book/glossary/15.txt | 27 -- book/glossary/16.txt | 21 -- book/glossary/17.txt | 27 -- book/glossary/18.txt | 39 --- book/glossary/19.txt | 15 - book/glossary/B.txt | 33 -- tools/join_glossary.py | 7 + tools/split_glossary.py | 33 +- tools/split_glossary0.py | 111 +++++++ 15 files changed, 141 insertions(+), 1054 deletions(-) create mode 100755 tools/split_glossary0.py diff --git a/book/C-glossary.rst b/book/C-glossary.rst index 626b135..5c03365 100644 --- a/book/C-glossary.rst +++ b/book/C-glossary.rst @@ -9,699 +9,3 @@ Note que alguns termos aparecem em mais de um capítulo, às vezes com definições diferentes, de acordo com o contexto. -acumulador (*accumulator*) :ref:`[10] ` - A variable used in a loop to add up or accumulate a result. - -algoritmo (*algorithm*) :ref:`[7] ` - A general process for solving a category of problems. - -*aliasing* (“apelidamento”) :ref:`[10] ` - A circumstance where two or more variables refer to the same object. - -analisar (*parse*) :ref:`[1] ` - To examine a program and analyze the syntactic structure. - -análise de algoritmos (*analysis of algorithms*) :ref:`[B] ` - A way to compare algorithms in terms of their run time and/or space requirements. - -argumento nomeado (*keyword argument*) :ref:`[4] ` - An argument that includes the name of the parameter as a “keyword”. - -argumento opcional (*optional argument*) :ref:`[8] ` - A function or method argument that is not required. - -argumento posicional (*positional argument*) :ref:`[17] ` - An argument that does not include a parameter name, so it is not a keyword argument. - -argumento (*argument*) :ref:`[3] ` - A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function. - -arquivo-texto (*text file*) :ref:`[14] ` - A sequence of characters stored in permanent storage like a hard drive. - -``assert``, instrução (``assert`` *statement*) :ref:`[16] ` - A statement that check a condition and raises an exception if it fails. - -assinatura (*interface*) :ref:`[4] ` - A description of how to use a function, including the name and descriptions of the arguments and return value. - -atribuição combinada (*augmented assignment*) :ref:`[10] ` - A statement that updates the value of a variable using an operator like ``+=``. - -atribuição (*assignment*) :ref:`[2] ` - A statement that assigns a value to a variable. - -atributo de classe (*class attribute*) :ref:`[18] ` - An attribute associated with a class object. Class attributes are defined inside a class definition but outside any method. - -atributo de instância (*instance attribute*) :ref:`[18] ` - An attribute associated with an instance of a class. - -atributo (*attribute*) :ref:`[15] ` - One of the named values associated with an object. - -atualização (*update*) :ref:`[7] ` - An assignment where the new value of the variable depends on the old. - -avaliar (*evaluate*) :ref:`[2] ` - To simplify an expression by performing the operations in order to yield a single value. - -banco de dados (*database*) :ref:`[14] ` - A file whose contents are organized like a dictionary with keys that correspond to values. - -*bug* :ref:`[1] ` - An error in a program. - -busca invertida (*reverse lookup*) :ref:`[11] ` - A dictionary operation that takes a value and finds one or more keys that map to it. - -busca (*lookup*) :ref:`[11] ` - A dictionary operation that takes a key and finds the corresponding value. - -busca (*search*) :ref:`[8] ` - A pattern of traversal that stops when it finds what it is looking for. - -busca (*search*) :ref:`[B] ` - The problem of locating an element of a collection (like a list or dictionary) or determining that it is not present. - -cabeçalho (*header*) :ref:`[3] ` - The first line of a function definition. - -caminho absoluto (*absolute path*) :ref:`[14] ` - A path that starts from the topmost directory in the file system. - -caminho relativo (*relative path*) :ref:`[14] ` - A path that starts from the current directory. - -caminho (*path*) :ref:`[14] ` - A string that identifies a file. - -capturar (*catch*) :ref:`[14] ` - To prevent an exception from terminating a program using the try and except statements. - -cardinalidade (*multiplicity*) :ref:`[18] ` - A notation in a class diagram that shows, for a HAS-A relationship, how many references there are to instances of another class. - -caso base (*base case*) :ref:`[5] ` - A conditional branch in a recursive function that does not make a recursive call. - -caso especial (*special case*) :ref:`[9] ` - A test case that is atypical or non-obvious (and less likely to be handled correctly). - -chamada de função (*function call*) :ref:`[3] ` - A statement that runs a function. It consists of the function name followed by an argument list in parentheses. - -chave (*key*) :ref:`[11] ` - An object that appears in a dictionary as the first part of a key-value pair. - -classe base (*parent class*) :ref:`[18] ` - The class from which a child class inherits. - -classe derivada (*child class*) :ref:`[18] ` - A new class created by inheriting from an existing class; also called a “subclass”. - -classe (*class*) :ref:`[15] ` - A programmer-defined type. A class definition creates a new class object. - -codificar (*encode*) :ref:`[18] ` - To represent one set of values using another set of values by constructing a mapping between them. - -código morto (*dead code*) :ref:`[6] ` - Part of a program that can never run, often because it appears after a return statement. - -código provisório (*scaffolding*) :ref:`[6] ` - Code that is used during program development but is not part of the final version. - -código provisório (*slice*) :ref:`[8] ` - A part of a string specified by a range of indices. - -comentário (*comment*) :ref:`[2] ` - Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program. - -composição (*composition*) :ref:`[3] ` - Using an expression as part of a larger expression, or a statement as part of a larger statement. - -concatenar (*concatenate*) :ref:`[2] ` - To join two operands end-to-end. - -condição (*condition*) :ref:`[5] ` - The boolean expression in a conditional statement that determines which branch runs. - -condicional aninhado (*nested conditional*) :ref:`[5] ` - A conditional statement that appears in one of the branches of another conditional statement. - -condicional encadeado (*chained conditional*) :ref:`[5] ` - A conditional statement with a series of alternative branches. - -contador (*counter*) :ref:`[8] ` - A variable used to count something, usually initialized to zero and then incremented. - -cópia profunda (*deep copy*) :ref:`[15] ` - To copy the contents of an object as well as any embedded objects, and any objects embedded in them, and so on; implemented by the deepcopy function in the copy module. - -cópia rasa (*shallow copy*) :ref:`[15] ` - To copy the contents of an object, including any references to embedded objects; implemented by the copy function in the copy module. - -corpo (*body*) :ref:`[3] ` - The sequence of statements inside a function definition. - -declaração (*declaration*) :ref:`[11] ` - A statement like global that tells the interpreter something about a variable. - -decrementar (*decrement*) :ref:`[7] ` - An update that decreases the value of a variable. - -definição de função (*function definition*) :ref:`[3] ` - A statement that creates a new function, specifying its name, parameters, and the statements it contains. - -delimitador (*delimiter*) :ref:`[10] ` - A character or string used to indicate where a string should be split. - -dependência (*dependency*) :ref:`[18] ` - A relationship between two classes where instances of one class use instances of the other class, but do not store them as attributes. - -depuração com patinho de borracha (*rubber duck debugging*) :ref:`[13] ` - Debugging by explaining your problem to an inanimate object such as a rubber duck. Articulating the problem can help you solve it, even if the rubber duck doesn’t know Python. - -depuração (*debugging*) :ref:`[1] ` - The process of finding and correcting bugs. - -desempacotamento de tupla (*tuple assignment*) :ref:`[12] ` - An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left. - -desenvolvimento incremental (*incremental development*) :ref:`[6] ` - A program development plan intended to avoid debugging by adding and testing only a small amount of code at a time. - -desenvolvimento planejado (*designed development*) :ref:`[16] ` - A development plan that involves high-level insight into the problem and more planning than incremental development or prototype development. - -despacho por tipo (*type-based dispatch*) :ref:`[17] ` - A programming pattern that checks the type of an operand and invokes different functions for different types. - -desvio (*branch*) :ref:`[5] ` - One of the alternative sequences of statements in a conditional statement. - -determinístico (*deterministic*) :ref:`[13] ` - Pertaining to a program that does the same thing each time it runs, given the same inputs. - -diagrama de chamadas (*call graph*) :ref:`[11] ` - A diagram that shows every frame created during the execution of a program, with an arrow from each caller to each callee. - -diagrama de classe (*class diagram*) :ref:`[18] ` - A diagram that shows the classes in a program and the relationships between them. - -diagrama de estado (*state diagram*) :ref:`[2] ` - A graphical representation of a set of variables and the values they refer to. - -diagrama de objetos (*object diagram*) :ref:`[15] ` - A diagram that shows objects, their attributes, and the values of the attributes. - -diagrama de pilha (*stack diagram*) :ref:`[3] ` - A graphical representation of a stack of functions, their variables, and the values they refer to. - -dicionário (*dictionary*) :ref:`[11] ` - A mapping from keys to their corresponding values. - -diretório (*directory*) :ref:`[14] ` - A named collection of files, also called a folder. - -divisão pelo piso (*floor division*) :ref:`[5] ` - An operator, denoted //, that divides two numbers and rounds down (toward zero) to an integer. - -*docstring* :ref:`[4] ` - A string that appears at the top of a function definition to document the function’s interface. - -elemento (*element*) :ref:`[10] ` - One of the values in a list (or other sequence), also called items. - -encapsulamento de dados (*data encapsulation*) :ref:`[18] ` - A program development plan that involves a prototype using global variables and a final version that makes the global variables into instance attributes. - -encapsulamento (*encapsulation*) :ref:`[4] ` - The process of transforming a sequence of statements into a function definition. - -equivalente (*equivalent*) :ref:`[10] ` - Having the same value. - -erro semântico (*semantic error*) :ref:`[2] ` - An error in a program that makes it do something other than what the programmer intended. - -erro sintático (*syntax error*) :ref:`[2] ` - An error in a program that makes it impossible to parse (and therefore impossible to interpret). - -errro estrutural (*shape error*) :ref:`[12] ` - An error caused because a value has the wrong shape; that is, the wrong type or size. - -estrutura de dados (*data structure*) :ref:`[12] ` - A collection of related values, often organized in lists, dictionaries, tuples, etc. - -exceção (*exception*) :ref:`[2] ` - An error that is detected while the program is running. - -executar (*execute*) :ref:`[2] ` - To run a statement and do what it says. - -explodir (*scatter*) :ref:`[12] ` - The operation of treating a sequence as a list of arguments. - -expressão booleana (*boolean expression*) :ref:`[5] ` - An expression whose value is either True or False. - -expressão condicional (*conditional expression*) :ref:`[19] ` - An expression that has one of two values, depending on a condition. - -expressão geradora (*generator expression*) :ref:`[19] ` - An expression with a for loop in parentheses that yields a generator object. - -expressão (*expression*) :ref:`[2] ` - A combination of variables, operators, and values that represents a single result. - -fachada (*veneer*) :ref:`[18] ` - A method or function that provides a different interface to another function without doing much computation. - -*factory* (fábrica) :ref:`[19] ` - A function, usually passed as a parameter, used to create objects. - -filtro (*filter*) :ref:`[10] ` - A processing pattern that traverses a list and selects the elements that satisfy some criterion. - -*flag* (“indicador”) :ref:`[11] ` - A boolean variable used to indicate whether a condition is true. - -fluxo de execução (*flow of execution*) :ref:`[3] ` - The order statements run in. - -*frame* () :ref:`[3] ` - A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function. - -função de hash (*hash function*) :ref:`[11] ` - A function used by a hashtable to compute the location for a key. - -função produtiva (*fruitful function*) :ref:`[3] ` - A function that returns a value. - -função pura (*pure function*) :ref:`[16] ` - A function that does not modify any of the objects it receives as arguments. Most pure functions are fruitful. - -função (*function*) :ref:`[3] ` - A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result. - -generalização (*generalization*) :ref:`[4] ` - The process of replacing something unnecessarily specific (like a number) with something appropriately general (like a variable or parameter). - -``global``, declaração (``global`` *statement*) :ref:`[11] ` - A statement that declares a variable name global. - -guarda (*guardian*) :ref:`[6] ` - A programming pattern that uses a conditional statement to check for and handle circumstances that might cause an error. - -*hashable* () :ref:`[11] ` - A type that has a hash function. Immutable types like integers, floats and strings are hashable; mutable types like lists and dictionaries are not. - -herança (*inheritance*) :ref:`[18] ` - The ability to define a new class that is a modified version of a previously defined class. - -idêntico (*identical*) :ref:`[10] ` - Being the same object (which implies equivalence). - -implementação (*implementation*) :ref:`[11] ` - A way of performing a computation. - -``import``, instrução (``import`` *statement*) :ref:`[3] ` - A statement that reads a module file and creates a module object. - -imutável (*immutable*) :ref:`[8] ` - The property of a sequence whose items cannot be changed. - -incrementar (*increment*) :ref:`[7] ` - An update that increases the value of a variable (often by one). - -índice (*index*) :ref:`[8] ` - An integer value used to select an item in a sequence, such as a character in a string. In Python indices start from 0. - -inicialização (*initialization*) :ref:`[7] ` - An assignment that gives an initial value to a variable that will be updated. - -instanciar (*instantiate*) :ref:`[15] ` - To create a new object. - -instância (*instance*) :ref:`[15] ` - An object that belongs to a class. - -instrução composta (*compound statement*) :ref:`[5] ` - A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header. - -instrução condicional (*conditional statement*) :ref:`[5] ` - A statement that controls the flow of execution depending on some condition. - -instrução (*statement*) :ref:`[2] ` - A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements. - -inteiro (*integer*) :ref:`[1] ` - A type that represents whole numbers. - -interpretador (*interpreter*) :ref:`[1] ` - A program that reads another program and executes it - -invariante (*invariant*) :ref:`[16] ` - A condition that should always be true during the execution of a program. - -invocação (*invocation*) :ref:`[8] ` - A statement that calls a method. - -*item* (item) :ref:`[11] ` - In a dictionary, another name for a key-value pair. - -*item* (item) :ref:`[8] ` - One of the values in a sequence. - -iteração (*iteration*) :ref:`[7] ` - Repeated execution of a set of statements using either a recursive function call or a loop. - -iterador (*iterator*) :ref:`[12] ` - An object that can iterate through a sequence, but which does not provide list operators and methods. - -laço infinito (*infinite loop*) :ref:`[7] ` - A loop in which the terminating condition is never satisfied. - -laço (*loop*) :ref:`[4] ` - A part of a program that can run repeatedly. - -*linear* (linear) :ref:`[B] ` - An algorithm whose run time is proportional to problem size, at least for large problem sizes. - -linguagem de alto nível (*high-level language*) :ref:`[1] ` - A programming language like Python that is designed to be easy for humans to read and write. - -linguagem de baixo nível (*low-level language*) :ref:`[1] ` - A programming language that is designed to be easy for a computer to run; also called “machine language” or “assembly language”. - -linguagem formal (*formal language*) :ref:`[1] ` - Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages. - -linguagem natural (*natural language*) :ref:`[1] ` - Any one of the languages that people speak that evolved naturally. - -linguagem orientada a objetos (*object-oriented language*) :ref:`[17] ` - A language that provides features, such as programmer-defined types and methods, that facilitate object-oriented programming. - -lista aninhada (*nested list*) :ref:`[10] ` - A list that is an element of another list. - -lista (*list*) :ref:`[10] ` - A sequence of values. - -listcomp (*list comprehension*) :ref:`[19] ` - An expression with a for loop in square brackets that yields a new list. - -mapeamento (*mapping*) :ref:`[11] ` - A relationship in which each element of one set corresponds to an element of another set. - -*map* (“mapear”, “de-para”) :ref:`[10] ` - A processing pattern that traverses a sequence and performs an operation on each element. - -máquina-modelo (*machine model*) :ref:`[B] ` - A simplified representation of a computer used to describe algorithms. - -*memo* (“lembrete”) :ref:`[11] ` - A computed value stored to avoid unnecessary future computation. - -método (*method*) :ref:`[17] ` - A function that is defined inside a class definition and is invoked on instances of that class. - -método (*method*) :ref:`[4] ` - A function that is associated with an object and called using dot notation. - -modificadora (*modifier*) :ref:`[16] ` - A function that changes one or more of the objects it receives as arguments. Most modifiers are void; that is, they return None. - -modo de script (*script mode*) :ref:`[2] ` - A way of using the Python interpreter to read code from a script and run it. - -modo interativo (*interactive mode*) :ref:`[2] ` - A way of using the Python interpreter by typing code at the prompt. - -módulo (*module*) :ref:`[3] ` - A file that contains a collection of related functions and other definitions. - -*multiset* (“multi-conjunto”) :ref:`[19] ` - A mathematical entity that represents a mapping between the elements of a set and the number of times they appear. - -``None`` :ref:`[3] ` - A special value returned by void functions. - -notação assintótica (*Big-Oh notation*) :ref:`[B] ` - Notation for representing an order of growth; for example, :math:`O(n)` represents the set of functions that grow linearly. - -notação de ponto (*dot notation*) :ref:`[3] ` - The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name. - -objeto-arquivo (*file object*) :ref:`[9] ` - A value that represents an open file. - -objeto ``bytes`` (``bytes`` *object*) :ref:`[14] ` - An object similar to a string. - -objeto-classe (*class object*) :ref:`[15] ` - An object that contains information about a programmer-defined type. The class object can be used to create instances of the type. - -objeto embutido (*embedded object*) :ref:`[15] ` - An object that is stored as an attribute of another object. - -objeto-função (*function object*) :ref:`[3] ` - A value created by a function definition. The name of the function is a variable that refers to a function object. - -objeto-módulo (*module object*) :ref:`[3] ` - A value created by an import statement that provides access to the values defined in a module. - -objeto “pipe” (*pipe object*) :ref:`[14] ` - An object that represents a running program, allowing a Python program to run commands and read the results. - -objeto ``zip`` (``zip`` *object*) :ref:`[12] ` - The result of calling a built-in function zip; an object that iterates through a sequence of tuples. - -objeto (*object*) :ref:`[10] ` - Something a variable can refer to. An object has a type and a value. - -objeto (*object*) :ref:`[8] ` - Something a variable can refer to. For now, you can use “object” and “value” interchangeably. - -ocultação de informações (*information hiding*) :ref:`[17] ` - The principle that the interface provided by an object should not depend on its implementation, in particular the representation of its attributes. - -operador de formatação (*format operator*) :ref:`[14] ` - An operator, %, that takes a format string and a tuple and generates a string that includes the elements of the tuple formatted as specified by the format string. - -operador de módulo (*modulus operator*) :ref:`[5] ` - An operator, denoted with a percent sign (%), that works on integers and returns the remainder when one number is divided by another. - -operador lógico (*logical operator*) :ref:`[5] ` - One of the operators that combines boolean expressions: and, or, and not. - -operador relacional (*relational operator*) :ref:`[5] ` - One of the operators that compares its operands: ==, !=, >, <, >=, and <=. - -operador (*operator*) :ref:`[1] ` - A special symbol that represents a simple computation like addition, multiplication, or string concatenation. - -operando (*operand*) :ref:`[2] ` - One of the values on which an operator operates. - -ordem das operações (*order of operations*) :ref:`[2] ` - Rules governing the order in which expressions involving multiple operators and operands are evaluated. - -ordem de crescimento (*order of growth*) :ref:`[B] ` - A set of functions that all grow in a way considered equivalent for purposes of analysis of algorithms. For example, all functions that grow linearly belong to the same order of growth. - -palavra-chave (*keyword*) :ref:`[2] ` - A reserved word that is used to parse a program; you cannot use keywords like if, def, and while as variable names. - -parâmetro (*parameter*) :ref:`[3] ` - A name used inside a function to refer to the value passed as an argument. - -par chave-valor (*key-value pair*) :ref:`[11] ` - The representation of the mapping from a key to a value. - -percorrer (*traverse*) :ref:`[8] ` - To iterate through the items in a sequence, performing a similar operation on each. - -persistente (*persistent*) :ref:`[14] ` - Pertaining to a program that runs indefinitely and keeps at least some of its data in permanent storage. - -pior caso (*worst case*) :ref:`[B] ` - The input that makes a given algorithm run slowest (or require the most space. - -plano de desenvolvimento (*development plan*) :ref:`[4] ` - A process for writing programs. - -polimórfico (*polymorphic*) :ref:`[17] ` - Pertaining to a function that can work with more than one type. - -ponto de cruzamento (*crossover point*) :ref:`[B] ` - The problem size where two algorithms require the same run time or space. - -ponto-flutuante (*floating-point*) :ref:`[1] ` - A type that represents numbers with fractional parts. - -portabilidade (*portability*) :ref:`[1] ` - A property of a program that can run on more than one kind of computer. - -pós-condição (*postcondition*) :ref:`[4] ` - A requirement that should be satisfied by the function before it ends. - -pré-condição (*precondition*) :ref:`[4] ` - A requirement that should be satisfied by the caller before a function starts. - -``print``, instrução (``print`` *statement*) :ref:`[1] ` - An instruction that causes the Python interpreter to display a value on the screen. - -procedimento (*void function*) :ref:`[3] ` - A function that always returns None. - -programação funcional (*program*) :ref:`[1] ` - A set of instructions that specifies a computation. - -programação funcional (*functional programming style*) :ref:`[16] ` - A style of program design in which the majority of functions are pure. - -programação orientada a objetos (*object-oriented programming*) :ref:`[17] ` - A style of programming in which data and the operations that manipulate it are organized into classes and methods. - -*prompt* (“sinal de pronto”) :ref:`[1] ` - Characters displayed by the interpreter to indicate that it is ready to take input from the user. - -prototipar e ajustar (*prototype and patch*) :ref:`[16] ` - A development plan that involves writing a rough draft of a program, testing, and correcting errors as they are found. - -pseudo-aleatório (*pseudorandom*) :ref:`[13] ` - Pertaining to a sequence of numbers that appears to be random, but is generated by a deterministic program. - -quadrático (*quadratic*) :ref:`[B] ` - An algorithm whose run time is proportional to :math:`n^2`, where :math:`n` is a measure of problem size. - -``raise``, instrução (``raise`` *statement*) :ref:`[11] ` - A statement that (deliberately) raises an exception. - -reatribuição (*reassignment*) :ref:`[7] ` - Assigning a new value to a variable that already exists. - -recursão infinita (*infinite recursion*) :ref:`[5] ` - A recursion that doesn’t have a base case, or never reaches it. Eventually, an infinite recursion causes a runtime error. - -recursão (*recursion*) :ref:`[5] ` - The process of calling the function that is currently executing. - -redução a um problema resolvido (*reduction to a previously solved problem*) :ref:`[9] ` - A way of solving a problem by expressing it as an instance of a previously solved problem. - -reduzir (*reduce*) :ref:`[10] ` - A processing pattern that traverses a sequence and accumulates the elements into a single result. - -refatoração (*refactoring*) :ref:`[4] ` - The process of modifying a working program to improve function interfaces and other qualities of the code. - -referência (*reference*) :ref:`[10] ` - The association between a variable and its value. - -relação É-UM (*IS-A relationship*) :ref:`[18] ` - A relationship between a child class and its parent class. - -relação TEM-UM (*HAS-A relationship*) :ref:`[18] ` - A relationship between two classes where instances of one class contain references to instances of the other. - -``return``, instrução (``return`` *statement*) :ref:`[5] ` - A statement that causes a function to end immediately and return to the caller. - -reunir (*gather*) :ref:`[12] ` - The operation of assembling a variable-length argument tuple. - -*script* :ref:`[2] ` - A program stored in a file. - -semântica (*semantics*) :ref:`[2] ` - The meaning of a program. - -sequência de formatação (*format sequence*) :ref:`[14] ` - A sequence of characters in a format string, like %d, that specifies how a value should be formatted. - -sequência de formatação (*sequence*) :ref:`[8] ` - An ordered collection of values where each value is identified by an integer index. - -*shell* :ref:`[14] ` - A program that allows users to type commands and then executes them by starting other programs. - -*singleton* :ref:`[11] ` - A list (or other sequence) with a single element. - -sintaxe (*syntax*) :ref:`[1] ` - The rules that govern the structure of a program. - -sobrecarga de operadores (*operator overloading*) :ref:`[17] ` - Changing the behavior of an operator like + so it works with a programmer-defined type. - -sobrepor (*override*) :ref:`[13] ` - To replace a default value with an argument. - -solução de problemas (*problem solving*) :ref:`[1] ` - The process of formulating a problem, finding a solution, and expressing it. - -string de formatação (*format string*) :ref:`[14] ` - A string, used with the format operator, that contains format sequences. - -string vazia (*empty string*) :ref:`[8] ` - A string with no characters and length 0, represented by two quotation marks. - -*string* (“cadeia de caracteres”) :ref:`[1] ` - A type that represents sequences of characters. - -sujeito (*subject*) :ref:`[17] ` - The object a method is invoked on. - -tabela de hash (*hashtable*) :ref:`[11] ` - The algorithm used to implement Python dictionaries. - -tabela de hash (*hashtable*) :ref:`[B] ` - A data structure that represents a collection of key-value pairs and performs search in constant time. - -termo dominante (*leading term*) :ref:`[B] ` - In a polynomial, the term with the highest exponent. - -teste de desempenho (*benchmarking*) :ref:`[13] ` - The process of choosing between data structures by implementing alternatives and testing them on a sample of the possible inputs. - -tipo (*type*) :ref:`[1] ` - A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str). - -*token* (“símbolo”) :ref:`[1] ` - One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language. - -*traceback* () :ref:`[3] ` - A list of the functions that are executing, printed when an exception occurs. - -tupla (*tuple*) :ref:`[12] ` - An immutable sequence of elements. - -valor default (*default value*) :ref:`[13] ` - The value given to an optional parameter if no argument is provided. - -valor devolvido (*return value*) :ref:`[3] ` - The result of a function. If a function call is used as an expression, the return value is the value of the expression. - -valor (*value*) :ref:`[1] ` - One of the basic units of data, like a number or string, that a program manipulates. - -valor (*value*) :ref:`[11] ` - An object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word “value”. - -variável global (*global variable*) :ref:`[11] ` - A variable defined outside a function. Global variables can be accessed from any function. - -variável local (*local variable*) :ref:`[3] ` - A variable defined inside a function. A local variable can only be used inside its function. - -variável temporária (*temporary variable*) :ref:`[6] ` - A variable used to store an intermediate value in a complex calculation. - -variável (*variable*) :ref:`[2] ` - A name that refers to a value. - diff --git a/book/glossary/10.txt b/book/glossary/10.txt index 3466f07..e69de29 100644 --- a/book/glossary/10.txt +++ b/book/glossary/10.txt @@ -1,42 +0,0 @@ -lista (*list*) - A sequence of values. - -elemento (*element*) - One of the values in a list (or other sequence), also called items. - -lista aninhada (*nested list*) - A list that is an element of another list. - -acumulador (*accumulator*) - A variable used in a loop to add up or accumulate a result. - -atribuição combinada (*augmented assignment*) - A statement that updates the value of a variable using an operator like ``+=``. - -reduzir (*reduce*) - A processing pattern that traverses a sequence and accumulates the elements into a single result. - -*map* (“mapear”, “de-para”) - A processing pattern that traverses a sequence and performs an operation on each element. - -filtro (*filter*) - A processing pattern that traverses a list and selects the elements that satisfy some criterion. - -objeto (*object*) - Something a variable can refer to. An object has a type and a value. - -equivalente (*equivalent*) - Having the same value. - -idêntico (*identical*) - Being the same object (which implies equivalence). - -referência (*reference*) - The association between a variable and its value. - -*aliasing* (“apelidamento”) - A circumstance where two or more variables refer to the same object. - -delimitador (*delimiter*) - A character or string used to indicate where a string should be split. - diff --git a/book/glossary/11.txt b/book/glossary/11.txt index a8bb4aa..e69de29 100644 --- a/book/glossary/11.txt +++ b/book/glossary/11.txt @@ -1,60 +0,0 @@ -mapeamento (*mapping*) - A relationship in which each element of one set corresponds to an element of another set. - -dicionário (*dictionary*) - A mapping from keys to their corresponding values. - -par chave-valor (*key-value pair*) - The representation of the mapping from a key to a value. - -*item* (item) - In a dictionary, another name for a key-value pair. - -chave (*key*) - An object that appears in a dictionary as the first part of a key-value pair. - -valor (*value*) - An object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word “value”. - -implementação (*implementation*) - A way of performing a computation. - -tabela de hash (*hashtable*) - The algorithm used to implement Python dictionaries. - -função de hash (*hash function*) - A function used by a hashtable to compute the location for a key. - -*hashable* () - A type that has a hash function. Immutable types like integers, floats and strings are hashable; mutable types like lists and dictionaries are not. - -busca (*lookup*) - A dictionary operation that takes a key and finds the corresponding value. - -busca invertida (*reverse lookup*) - A dictionary operation that takes a value and finds one or more keys that map to it. - -``raise``, instrução (``raise`` *statement*) - A statement that (deliberately) raises an exception. - -*singleton* - A list (or other sequence) with a single element. - -diagrama de chamadas (*call graph*) - A diagram that shows every frame created during the execution of a program, with an arrow from each caller to each callee. - -*memo* (“lembrete”) - A computed value stored to avoid unnecessary future computation. - -variável global (*global variable*) - A variable defined outside a function. Global variables can be accessed from any function. - -``global``, declaração (``global`` *statement*) - A statement that declares a variable name global. - -*flag* (“indicador”) - A boolean variable used to indicate whether a condition is true. - -declaração (*declaration*) - A statement like global that tells the interpreter something about a variable. - diff --git a/book/glossary/12.txt b/book/glossary/12.txt index b930883..e69de29 100644 --- a/book/glossary/12.txt +++ b/book/glossary/12.txt @@ -1,24 +0,0 @@ -tupla (*tuple*) - An immutable sequence of elements. - -desempacotamento de tupla (*tuple assignment*) - An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left. - -reunir (*gather*) - The operation of assembling a variable-length argument tuple. - -explodir (*scatter*) - The operation of treating a sequence as a list of arguments. - -objeto ``zip`` (``zip`` *object*) - The result of calling a built-in function zip; an object that iterates through a sequence of tuples. - -iterador (*iterator*) - An object that can iterate through a sequence, but which does not provide list operators and methods. - -estrutura de dados (*data structure*) - A collection of related values, often organized in lists, dictionaries, tuples, etc. - -errro estrutural (*shape error*) - An error caused because a value has the wrong shape; that is, the wrong type or size. - diff --git a/book/glossary/13.txt b/book/glossary/13.txt index 96263c5..e69de29 100644 --- a/book/glossary/13.txt +++ b/book/glossary/13.txt @@ -1,18 +0,0 @@ -determinístico (*deterministic*) - Pertaining to a program that does the same thing each time it runs, given the same inputs. - -pseudo-aleatório (*pseudorandom*) - Pertaining to a sequence of numbers that appears to be random, but is generated by a deterministic program. - -valor default (*default value*) - The value given to an optional parameter if no argument is provided. - -sobrepor (*override*) - To replace a default value with an argument. - -teste de desempenho (*benchmarking*) - The process of choosing between data structures by implementing alternatives and testing them on a sample of the possible inputs. - -depuração com patinho de borracha (*rubber duck debugging*) - Debugging by explaining your problem to an inanimate object such as a rubber duck. Articulating the problem can help you solve it, even if the rubber duck doesn’t know Python. - diff --git a/book/glossary/14.txt b/book/glossary/14.txt index 36ce9e8..e69de29 100644 --- a/book/glossary/14.txt +++ b/book/glossary/14.txt @@ -1,42 +0,0 @@ -persistente (*persistent*) - Pertaining to a program that runs indefinitely and keeps at least some of its data in permanent storage. - -operador de formatação (*format operator*) - An operator, %, that takes a format string and a tuple and generates a string that includes the elements of the tuple formatted as specified by the format string. - -string de formatação (*format string*) - A string, used with the format operator, that contains format sequences. - -sequência de formatação (*format sequence*) - A sequence of characters in a format string, like %d, that specifies how a value should be formatted. - -arquivo-texto (*text file*) - A sequence of characters stored in permanent storage like a hard drive. - -diretório (*directory*) - A named collection of files, also called a folder. - -caminho (*path*) - A string that identifies a file. - -caminho relativo (*relative path*) - A path that starts from the current directory. - -caminho absoluto (*absolute path*) - A path that starts from the topmost directory in the file system. - -capturar (*catch*) - To prevent an exception from terminating a program using the try and except statements. - -banco de dados (*database*) - A file whose contents are organized like a dictionary with keys that correspond to values. - -objeto ``bytes`` (``bytes`` *object*) - An object similar to a string. - -*shell* - A program that allows users to type commands and then executes them by starting other programs. - -objeto “pipe” (*pipe object*) - An object that represents a running program, allowing a Python program to run commands and read the results. - diff --git a/book/glossary/15.txt b/book/glossary/15.txt index cbb48b0..e69de29 100644 --- a/book/glossary/15.txt +++ b/book/glossary/15.txt @@ -1,27 +0,0 @@ -classe (*class*) - A programmer-defined type. A class definition creates a new class object. - -objeto-classe (*class object*) - An object that contains information about a programmer-defined type. The class object can be used to create instances of the type. - -instância (*instance*) - An object that belongs to a class. - -instanciar (*instantiate*) - To create a new object. - -atributo (*attribute*) - One of the named values associated with an object. - -objeto embutido (*embedded object*) - An object that is stored as an attribute of another object. - -cópia rasa (*shallow copy*) - To copy the contents of an object, including any references to embedded objects; implemented by the copy function in the copy module. - -cópia profunda (*deep copy*) - To copy the contents of an object as well as any embedded objects, and any objects embedded in them, and so on; implemented by the deepcopy function in the copy module. - -diagrama de objetos (*object diagram*) - A diagram that shows objects, their attributes, and the values of the attributes. - diff --git a/book/glossary/16.txt b/book/glossary/16.txt index be92caa..e69de29 100644 --- a/book/glossary/16.txt +++ b/book/glossary/16.txt @@ -1,21 +0,0 @@ -prototipar e ajustar (*prototype and patch*) - A development plan that involves writing a rough draft of a program, testing, and correcting errors as they are found. - -desenvolvimento planejado (*designed development*) - A development plan that involves high-level insight into the problem and more planning than incremental development or prototype development. - -função pura (*pure function*) - A function that does not modify any of the objects it receives as arguments. Most pure functions are fruitful. - -modificadora (*modifier*) - A function that changes one or more of the objects it receives as arguments. Most modifiers are void; that is, they return None. - -programação funcional (*functional programming style*) - A style of program design in which the majority of functions are pure. - -invariante (*invariant*) - A condition that should always be true during the execution of a program. - -``assert``, instrução (``assert`` *statement*) - A statement that check a condition and raises an exception if it fails. - diff --git a/book/glossary/17.txt b/book/glossary/17.txt index 4108dbf..e69de29 100644 --- a/book/glossary/17.txt +++ b/book/glossary/17.txt @@ -1,27 +0,0 @@ -linguagem orientada a objetos (*object-oriented language*) - A language that provides features, such as programmer-defined types and methods, that facilitate object-oriented programming. - -programação orientada a objetos (*object-oriented programming*) - A style of programming in which data and the operations that manipulate it are organized into classes and methods. - -método (*method*) - A function that is defined inside a class definition and is invoked on instances of that class. - -sujeito (*subject*) - The object a method is invoked on. - -argumento posicional (*positional argument*) - An argument that does not include a parameter name, so it is not a keyword argument. - -sobrecarga de operadores (*operator overloading*) - Changing the behavior of an operator like + so it works with a programmer-defined type. - -despacho por tipo (*type-based dispatch*) - A programming pattern that checks the type of an operand and invokes different functions for different types. - -polimórfico (*polymorphic*) - Pertaining to a function that can work with more than one type. - -ocultação de informações (*information hiding*) - The principle that the interface provided by an object should not depend on its implementation, in particular the representation of its attributes. - diff --git a/book/glossary/18.txt b/book/glossary/18.txt index 8dd4086..e69de29 100644 --- a/book/glossary/18.txt +++ b/book/glossary/18.txt @@ -1,39 +0,0 @@ -codificar (*encode*) - To represent one set of values using another set of values by constructing a mapping between them. - -atributo de classe (*class attribute*) - An attribute associated with a class object. Class attributes are defined inside a class definition but outside any method. - -atributo de instância (*instance attribute*) - An attribute associated with an instance of a class. - -fachada (*veneer*) - A method or function that provides a different interface to another function without doing much computation. - -herança (*inheritance*) - The ability to define a new class that is a modified version of a previously defined class. - -classe base (*parent class*) - The class from which a child class inherits. - -classe derivada (*child class*) - A new class created by inheriting from an existing class; also called a “subclass”. - -relação É-UM (*IS-A relationship*) - A relationship between a child class and its parent class. - -relação TEM-UM (*HAS-A relationship*) - A relationship between two classes where instances of one class contain references to instances of the other. - -dependência (*dependency*) - A relationship between two classes where instances of one class use instances of the other class, but do not store them as attributes. - -diagrama de classe (*class diagram*) - A diagram that shows the classes in a program and the relationships between them. - -cardinalidade (*multiplicity*) - A notation in a class diagram that shows, for a HAS-A relationship, how many references there are to instances of another class. - -encapsulamento de dados (*data encapsulation*) - A program development plan that involves a prototype using global variables and a final version that makes the global variables into instance attributes. - diff --git a/book/glossary/19.txt b/book/glossary/19.txt index 3d271a4..e69de29 100644 --- a/book/glossary/19.txt +++ b/book/glossary/19.txt @@ -1,15 +0,0 @@ -expressão condicional (*conditional expression*) - An expression that has one of two values, depending on a condition. - -listcomp (*list comprehension*) - An expression with a for loop in square brackets that yields a new list. - -expressão geradora (*generator expression*) - An expression with a for loop in parentheses that yields a generator object. - -*multiset* (“multi-conjunto”) - A mathematical entity that represents a mapping between the elements of a set and the number of times they appear. - -*factory* (fábrica) - A function, usually passed as a parameter, used to create objects. - diff --git a/book/glossary/B.txt b/book/glossary/B.txt index c4fd032..e69de29 100644 --- a/book/glossary/B.txt +++ b/book/glossary/B.txt @@ -1,33 +0,0 @@ -análise de algoritmos (*analysis of algorithms*) - A way to compare algorithms in terms of their run time and/or space requirements. - -máquina-modelo (*machine model*) - A simplified representation of a computer used to describe algorithms. - -pior caso (*worst case*) - The input that makes a given algorithm run slowest (or require the most space. - -termo dominante (*leading term*) - In a polynomial, the term with the highest exponent. - -ponto de cruzamento (*crossover point*) - The problem size where two algorithms require the same run time or space. - -ordem de crescimento (*order of growth*) - A set of functions that all grow in a way considered equivalent for purposes of analysis of algorithms. For example, all functions that grow linearly belong to the same order of growth. - -notação assintótica (*Big-Oh notation*) - Notation for representing an order of growth; for example, :math:`O(n)` represents the set of functions that grow linearly. - -*linear* (linear) - An algorithm whose run time is proportional to problem size, at least for large problem sizes. - -quadrático (*quadratic*) - An algorithm whose run time is proportional to :math:`n^2`, where :math:`n` is a measure of problem size. - -busca (*search*) - The problem of locating an element of a collection (like a list or dictionary) or determining that it is not present. - -tabela de hash (*hashtable*) - A data structure that represents a collection of key-value pairs and performs search in constant time. - diff --git a/tools/join_glossary.py b/tools/join_glossary.py index d927b32..7ae432a 100644 --- a/tools/join_glossary.py +++ b/tools/join_glossary.py @@ -1,3 +1,10 @@ +#!/usr/bin/env python3 + +""" +Extract glossary entries from chapters 1-19 and appendix B and create +a consolidated glossary text file delimited by '|' (pipe characters). +""" + import glob import re import os diff --git a/tools/split_glossary.py b/tools/split_glossary.py index 734d0c9..cbceb33 100755 --- a/tools/split_glossary.py +++ b/tools/split_glossary.py @@ -1,5 +1,10 @@ #!/usr/bin/env python3 +""" +Generate consolidated RST glossary file and chapter include files from +the CSV glossary files. +""" + import glob import os import csv @@ -11,7 +16,7 @@ from join_glossary import expected_entries RST_PATH = '../book/' -GLOSSARY_DATA_PATH = './glossary.csv' +GLOSSARY_DATA_PATH = '../data' FIELDS = 'term us_term br_term chapter order us_definition br_definition'.split() GLOSSARY_HEAD = '''\ @@ -34,6 +39,7 @@ def asciize(txt): return ''.join(c for c in unicodedata.normalize('NFD', txt) if c in string.ascii_lowercase) + def master_order(entry): return asciize(entry.term.casefold()) + '|' + entry.chapter @@ -41,15 +47,19 @@ def master_order(entry): def read_glossary(): master_glossary = [] glossaries = collections.defaultdict(list) - with open(GLOSSARY_DATA_PATH) as csvfile: - reader = csv.DictReader(csvfile, FIELDS) - next(reader) # skip header line - for row in reader: - row['order'] = int(row['order']) - entry = GlossaryEntry(**row) - #print(entry) - glossaries[row['chapter']].append(entry) - master_glossary.append(entry) + paths = glob.glob(os.path.join(GLOSSARY_DATA_PATH, '*.csv')) + + for nome_arq in paths: + with open(nome_arq) as csvfile: + reader = csv.DictReader(csvfile, FIELDS) + next(reader) # skip header line + for row in reader: + row['order'] = int(row['order']) + import pdb; pdb.set_trace() + entry = GlossaryEntry(**row) + #print(entry) + glossaries[row['chapter']].append(entry) + master_glossary.append(entry) return master_glossary, glossaries @@ -69,6 +79,7 @@ def formatted_head(entry): head = '{} ({})'.format(us_term, entry.br_term) return head + def main(): master_glossary, chapter_glossaries = read_glossary() @@ -90,8 +101,10 @@ def main(): assert len(found) == 1, 'found: {}'.format(len(found)) out_path = os.path.join(RST_PATH, 'glossary', chapter_id+'.txt') glossary = chapter_glossaries[chapter_id] + print(out_path) with open(out_path, 'wt', encoding='utf-8') as out_file: for entry in sorted(glossary, key=operator.attrgetter('order')): + print('\t', entry) definition = entry.br_definition.strip() or entry.us_definition.strip() out_file.write('{}\n {}\n\n'.format(formatted_head(entry), definition)) diff --git a/tools/split_glossary0.py b/tools/split_glossary0.py new file mode 100755 index 0000000..8e0cc97 --- /dev/null +++ b/tools/split_glossary0.py @@ -0,0 +1,111 @@ +#!/usr/bin/env python3 + +""" +Generate consolidated RST glossary file and chapter include files from +consolidated CSV glossary file. + +THIS SCRIPT IS NO LONGER USED, SEE ``split_glossary.py`` +""" + +import glob +import os +import csv +import collections +import operator +import unicodedata +import string + +from join_glossary import expected_entries + +RST_PATH = '../book/' +GLOSSARY_DATA_PATH = './glossary.csv' +FIELDS = 'term us_term br_term chapter order us_definition br_definition'.split() + +GLOSSARY_HEAD = '''\ +Glossário Consolidado +===================== + +Este glossário é a união de todos os glossários dos capítulos. +Cada entrada está vinculada ao capítulo onde ela aparece, por exemplo: +*bug* :ref:`[1] `. + +Note que alguns termos aparecem em mais de um capítulo, às vezes +com definições diferentes, de acordo com o contexto. +\n\n''' + +GlossaryEntry = collections.namedtuple('GlossaryEntry', FIELDS) + + +def asciize(txt): + """Return only ASCII letters from text""" + return ''.join(c for c in unicodedata.normalize('NFD', txt) + if c in string.ascii_lowercase) + +def master_order(entry): + return asciize(entry.term.casefold()) + '|' + entry.chapter + + +def read_glossary(): + master_glossary = [] + glossaries = collections.defaultdict(list) + with open(GLOSSARY_DATA_PATH) as csvfile: + reader = csv.DictReader(csvfile, FIELDS) + next(reader) # skip header line + for row in reader: + row['order'] = int(row['order']) + entry = GlossaryEntry(**row) + #print(entry) + glossaries[row['chapter']].append(entry) + master_glossary.append(entry) + return master_glossary, glossaries + + +def formatted_head(entry): + us_term = entry.us_term + if '``' in us_term: + if us_term != '``None``': + symbol, noun = us_term.split() + us_term = '{} *{}*'.format(symbol, noun) + else: + us_term = '*{}*'.format(us_term) + if entry.br_term == '-': # no BR term + head = us_term + elif entry.term != entry.us_term: # adopted BR term + head = '{} ({})'.format(entry.term, us_term) + else: # adopted US term + head = '{} ({})'.format(us_term, entry.br_term) + return head + +def main(): + master_glossary, chapter_glossaries = read_glossary() + + link_fmt = ':ref:`[1] `' + + out_path = os.path.join(RST_PATH, 'C-glossary.rst') + with open(out_path, 'wt', encoding='utf-8') as out_file: + out_file.write(GLOSSARY_HEAD) + for entry in sorted(master_glossary, key=master_order): + short_chapter = entry.chapter.lstrip('0') + definition = entry.br_definition.strip() or entry.us_definition.strip() + out_file.write('{} :ref:`[{}] `\n {}\n\n' + .format(formatted_head(entry), short_chapter, + entry.chapter, definition)) + + for chapter_id, entries_qty in expected_entries: + chapter_glob = os.path.join(RST_PATH, chapter_id+'*.rst') + found = glob.glob(chapter_glob) + assert len(found) == 1, 'found: {}'.format(len(found)) + out_path = os.path.join(RST_PATH, 'glossary', chapter_id+'.txt') + glossary = chapter_glossaries[chapter_id] + with open(out_path, 'wt', encoding='utf-8') as out_file: + for entry in sorted(glossary, key=operator.attrgetter('order')): + definition = entry.br_definition.strip() or entry.us_definition.strip() + out_file.write('{}\n {}\n\n'.format(formatted_head(entry), definition)) + + print() + +if __name__ == '__main__': + main() + + + From 7c3d89a079dcbbe40e426dd28f8416340fa11736 Mon Sep 17 00:00:00 2001 From: marcelo-ramires Date: Fri, 11 Dec 2015 12:25:31 -0200 Subject: [PATCH 26/28] Adding translation of A.CSV done by Michel Rodrigues, reviewed. --- data/a.csv | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/data/a.csv b/data/a.csv index 6988c30..fa71303 100644 --- a/data/a.csv +++ b/data/a.csv @@ -1,20 +1,20 @@ ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION -acumulador,accumulator,acumulador,10,4,A variable used in a loop to add up or accumulate a result., -algoritmo,algorithm,algoritmo,7,8,A general process for solving a category of problems., -aliasing,aliasing,“apelidamento”,10,13,A circumstance where two or more variables refer to the same object., -analisar,parse,analisar,1,19,To examine a program and analyze the syntactic structure., -análise de algoritmos,analysis of algorithms,análise de algoritmos,B,1,A way to compare algorithms in terms of their run time and/or space requirements., -argumento,argument,argumento,3,8,A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function., -argumento nomeado,keyword argument,argumento nomeado,4,5,An argument that includes the name of the parameter as a “keyword”., -argumento opcional,optional argument,argumento opcional,8,12,A function or method argument that is not required., -argumento posicional,positional argument,argumento posicional,17,5,"An argument that does not include a parameter name, so it is not a keyword argument.", -arquivo-texto,text file,arquivo-texto,14,5,A sequence of characters stored in permanent storage like a hard drive., -"``assert``, instrução",``assert`` statement,instrução ``assert``,16,7,A statement that check a condition and raises an exception if it fails., -assinatura,interface,"assinatura, interface",4,6,"A description of how to use a function, including the name and descriptions of the arguments and return value.", -atribuição,assignment,atribuição,2,2,A statement that assigns a value to a variable., -atribuição combinada,augmented assignment,atribuição combinada,10,5,A statement that updates the value of a variable using an operator like ``+=``., -atributo,attribute,atributo,15,5,One of the named values associated with an object., -atributo de classe,class attribute,atributo de classe,18,2,An attribute associated with a class object. Class attributes are defined inside a class definition but outside any method., -atributo de instância,instance attribute,atributo de instância,18,3,An attribute associated with an instance of a class., -atualização,update,atualização,7,2,An assignment where the new value of the variable depends on the old., -avaliar,evaluate,avaliar,2,7,To simplify an expression by performing the operations in order to yield a single value., +acumulador,accumulator,acumulador,10,4,A variable used in a loop to add up or accumulate a result.,Uma variável usada em um laço para somar ou acumular um resultado. +algoritmo,algorithm,algoritmo,7,8,A general process for solving a category of problems.,Um processo geral para solucionar uma certa categoria de problema. +aliasing,aliasing,“apelidamento”,10,13,A circumstance where two or more variables refer to the same object.,Uma circunstância em que duas ou mais variáveis se referem ao mesmo objeto. +analisar,parse,analisar,1,19,To examine a program and analyze the syntactic structure.,Examinar um programa e analisar sua estrutura sintática. +análise de algoritmos,analysis of algorithms,análise de algoritmos,B,1,A way to compare algorithms in terms of their run time and/or space requirements.,Uma forma de comparar algoritmos em termos do seu tempo de execução e/ou requisitos de espaço. +argumento,argument,argumento,3,8,A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function.,Valor fornecido a uma função quando ela é chamada. Este valor é atribuído ao parâmetro correspondente na função. +argumento nomeado,keyword argument,argumento nomeado,4,5,An argument that includes the name of the parameter as a “keyword”.,Um argumento que inclui o nome do parâmetro como uma palavra-chave. +argumento opcional,optional argument,argumento opcional,8,12,A function or method argument that is not required.,Argumento que não é obrigatório para uma função ou método. +argumento posicional,positional argument,argumento posicional,17,5,"An argument that does not include a parameter name, so it is not a keyword argument.","Argumento que não inclui o nome do parâmetro, então não é um argumento nomeado." +arquivo-texto,text file,arquivo-texto,14,5,A sequence of characters stored in permanent storage like a hard drive.,"Sequência de caracteres armazenado em armazenamento permanente, como um disco rígido." +"``assert``, instrução",``assert`` statement,instrução ``assert``,16,7,A statement that checks a condition and raises an exception if it fails.,Uma instrução que checa uma condição e levanta uma exceção se ela falhar. +assinatura,interface,"assinatura, interface",4,6,"A description of how to use a function, including the name and descriptions of the arguments and return value.","Uma descrição de como usar uma função, incluindo o nome da função, descrição dos argumentos e os valores que ela retorna." +atribuição,assignment,atribuição,2,2,A statement that assigns a value to a variable.,Uma instrução que atribui um valor a uma variável. +atribuição combinada,augmented assignment,atribuição combinada,10,5,A statement that updates the value of a variable using an operator like ``+=``.,"Uma instrução que atualiza o valor de uma variável usando um operador, como um “+=”." +atributo,attribute,atributo,15,5,One of the named values associated with an object.,Um dos valores nomeados associados a um objeto. +atributo de classe,class attribute,atributo de classe,18,2,An attribute associated with a class object. Class attributes are defined inside a class definition but outside any method.,"Um atributo associado com uma classe objeto. Atributos de classe são definidos dentro de uma definição de classe, mas fora de qualquer método." +atributo de instância,instance attribute,atributo de instância,18,3,An attribute associated with an instance of a class.,Um atributo associado com uma instância de uma classe. +atualização,update,atualização,7,2,An assignment where the new value of the variable depends on the old.,Uma atribuição em que o novo valor da variável depende da antiga. +avaliar,evaluate,avaliar,2,7,To simplify an expression by performing the operations in order to yield a single value.,"Simplificar uma expressão através da realização de operações, para obter um valor único." \ No newline at end of file From 508fe428e30b7e9aca7b30927aaa591c22ff4c48 Mon Sep 17 00:00:00 2001 From: Patrick Mazulo Date: Mon, 14 Dec 2015 23:34:23 -0300 Subject: [PATCH 27/28] Translated glossary E-F --- data/e-f.csv | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/data/e-f.csv b/data/e-f.csv index 20d46f5..04a7dac 100644 --- a/data/e-f.csv +++ b/data/e-f.csv @@ -1,26 +1,26 @@ ADOPTED TERM,EN-US TERM,PT-BR TERM,CHAPTER,ORDER,EN-US DEFINITION,PT-BR DEFINITION -elemento,element,elemento,10,2,"One of the values in a list (or other sequence), also called items.", -encapsulamento,encapsulation,encapsulamento,4,3,The process of transforming a sequence of statements into a function definition., -encapsulamento de dados,data encapsulation,encapsulamento de dados,18,13,A program development plan that involves a prototype using global variables and a final version that makes the global variables into instance attributes., -equivalente,equivalent,equivalente,10,10,Having the same value., -erro semântico,semantic error,erro semântico,2,19,An error in a program that makes it do something other than what the programmer intended., -erro sintático,syntax error,erro sintático,2,16,An error in a program that makes it impossible to parse (and therefore impossible to interpret)., -errro estrutural,shape error,errro estrutural,12,8,"An error caused because a value has the wrong shape; that is, the wrong type or size.", -estrutura de dados,data structure,estrutura de dados,12,7,"A collection of related values, often organized in lists, dictionaries, tuples, etc.", -exceção,exception,exceção,2,17,An error that is detected while the program is running., -executar,execute,executar,2,9,To run a statement and do what it says., -explodir,scatter,explodir,12,4,The operation of treating a sequence as a list of arguments., -expressão,expression,expressão,2,6,"A combination of variables, operators, and values that represents a single result.", -expressão booleana,boolean expression,expressão booleana,5,3,An expression whose value is either True or False., -expressão condicional,conditional expression,expressão condicional,19,1,"An expression that has one of two values, depending on a condition.", -expressão geradora,generator expression,expressão geradora,19,3,An expression with a for loop in parentheses that yields a generator object., -fachada,veneer,“verniz” ou fachada,18,4,A method or function that provides a different interface to another function without doing much computation., -factory,factory,fábrica,19,5,"A function, usually passed as a parameter, used to create objects.", -filtro,filter,filtro,10,8,A processing pattern that traverses a list and selects the elements that satisfy some criterion., -flag,flag,“indicador”,11,19,A boolean variable used to indicate whether a condition is true., -fluxo de execução,flow of execution,fluxo de execução,3,19,The order statements run in., -frame,frame,,3,21,A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function., -função,function,função,3,1,A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result., -função de hash,hash function,função de espalhamento,11,9,A function used by a hashtable to compute the location for a key., -função produtiva,fruitful function,função produtiva,3,11,A function that returns a value., -função pura,pure function,função pura,16,3,A function that does not modify any of the objects it receives as arguments. Most pure functions are fruitful., +elemento,element,elemento,10,2,"One of the values in a list (or other sequence), also called items.",Um dos valores em uma lista (ou outra sequência). O operador colchetes seleciona elementos de uma lista. +encapsulamento,encapsulation,encapsulamento,4,3,The process of transforming a sequence of statements into a function definition.,O processo de transformar uma sequência de instruções em uma definição de função. +encapsulamento de dados,data encapsulation,encapsulamento de dados,18,13,A program development plan that involves a prototype using global variables and a final version that makes the global variables into instance attributes.,Plano de desenvolvimento de programa que envolve um protótipo usando variáveis globais e uma versão final que torna as variáveis globais em atributos de instância. +equivalente,equivalent,equivalente,10,10,Having the same value.,Tem o mesmo valor. +erro semântico,semantic error,erro semântico,2,19,An error in a program that makes it do something other than what the programmer intended.,Um erro no programa que faz que ele faça algo diferente do que o programador pretendia. +erro sintático,syntax error,erro sintático,2,16,An error in a program that makes it impossible to parse (and therefore impossible to interpret).,"Um erro em um programa que o torna impossível de analisar (e portanto, impossível de interpretar)." +errro estrutural,shape error,errro estrutural,12,8,"An error caused because a value has the wrong shape; that is, the wrong type or size.","Um erro causado porquê um valor tem um formato inadequado; isto é, o tipo ou tamanho errado." +estrutura de dados,data structure,estrutura de dados,12,7,"A collection of related values, often organized in lists, dictionaries, tuples, etc.","Uma coleção de valores relacionados, geralmente organizados em listas, dicionários, tuplas, etc." +exceção,exception,exceção,2,17,An error that is detected while the program is running.,Um erro que é detectado enquanto o programa está executando. +executar,execute,executar,2,9,To run a statement and do what it says.,Executar uma declaração e fazer o que ela pede. +explodir,scatter,explodir,12,4,The operation of treating a sequence as a list of arguments.,A operação de tratar uma sequência como uma lista de argumentos. +expressão,expression,expressão,2,6,"A combination of variables, operators, and values that represents a single result.",Uma combinação de operadores e operandos (variáveis e valores) que tem valor simples como resultado. +expressão booleana,boolean expression,expressão booleana,5,3,An expression whose value is either True or False.,Uma expressão que é ou verdadeira ou falsa. +expressão condicional,conditional expression,expressão condicional,19,1,"An expression that has one of two values, depending on a condition.","Uma expressão que tem um de dois valores, dependendo de uma condição." +expressão geradora,generator expression,expressão geradora,19,3,An expression with a for loop in parentheses that yields a generator object.,Uma expressão com um loop for em parênteses que produz um objeto gerador. +fachada,veneer,“verniz” ou fachada,18,4,A method or function that provides a different interface to another function without doing much computation.,Um método ou função que fornece uma interface diferente para outra função sem fazer muita cálculo. +factory,factory,fábrica,19,5,"A function, usually passed as a parameter, used to create objects.","Uma função, normalmente passada como um parâmetro, usada para criar objetos." +filtro,filter,filtro,10,8,A processing pattern that traverses a list and selects the elements that satisfy some criterion.,Um padrão de processamento que percorre uma lista e seleciona os elementos que satisfazem algum critério. +flag,flag,“indicador”,11,19,A boolean variable used to indicate whether a condition is true.,Uma váriável do tipo boolean usada para indicar se uma condição é verdadeira. +fluxo de execução,flow of execution,fluxo de execução,3,19,The order statements run in.,A ordem em que comandos são executados durante a execução de um programa. +frame,frame,,3,21,A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function.,Uma caixa em um diagrama da pilha que representa uma chamada de função. Ela contém as variáveis locais e os parâmetros da função. +função,function,função,3,1,A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result.,Uma sequên ia de comandos com um nome que executa operações úteis. Funções podem ou não ter parâmetros e podem ou não produzir um resultado. +função de hash,hash function,função de espalhamento,11,9,A function used by a hashtable to compute the location for a key.,Uma função de uma tabela de hash utilizada para calcular a localização de uma chave. +função produtiva,fruitful function,função produtiva,3,11,A function that returns a value.,Uma função que retorna um valor ao invés de None. +função pura,pure function,função pura,16,3,A function that does not modify any of the objects it receives as arguments. Most pure functions are fruitful.,Uma função que não produz efeitos colaterais. Funções puras apenas alteram os estado (variáveis) das funções que a chamam através de valores de retorno. From bee70251661845b5bbad49098b23343f112ba4d0 Mon Sep 17 00:00:00 2001 From: Patrick Mazulo Date: Tue, 15 Dec 2015 00:06:23 -0300 Subject: [PATCH 28/28] Correct some typos --- data/e-f.csv | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/e-f.csv b/data/e-f.csv index 04a7dac..6373367 100644 --- a/data/e-f.csv +++ b/data/e-f.csv @@ -3,14 +3,14 @@ elemento,element,elemento,10,2,"One of the values in a list (or other sequence), encapsulamento,encapsulation,encapsulamento,4,3,The process of transforming a sequence of statements into a function definition.,O processo de transformar uma sequência de instruções em uma definição de função. encapsulamento de dados,data encapsulation,encapsulamento de dados,18,13,A program development plan that involves a prototype using global variables and a final version that makes the global variables into instance attributes.,Plano de desenvolvimento de programa que envolve um protótipo usando variáveis globais e uma versão final que torna as variáveis globais em atributos de instância. equivalente,equivalent,equivalente,10,10,Having the same value.,Tem o mesmo valor. -erro semântico,semantic error,erro semântico,2,19,An error in a program that makes it do something other than what the programmer intended.,Um erro no programa que faz que ele faça algo diferente do que o programador pretendia. +erro semântico,semantic error,erro semântico,2,19,An error in a program that makes it do something other than what the programmer intended.,Um erro no programa que faz com que ele faça algo diferente do que o programador pretendia. erro sintático,syntax error,erro sintático,2,16,An error in a program that makes it impossible to parse (and therefore impossible to interpret).,"Um erro em um programa que o torna impossível de analisar (e portanto, impossível de interpretar)." -errro estrutural,shape error,errro estrutural,12,8,"An error caused because a value has the wrong shape; that is, the wrong type or size.","Um erro causado porquê um valor tem um formato inadequado; isto é, o tipo ou tamanho errado." +erro estrutural,shape error,erro estrutural,12,8,"An error caused because a value has the wrong shape; that is, the wrong type or size.","Um erro causado porquê um valor tem um formato inadequado; isto é, o tipo ou tamanho errado." estrutura de dados,data structure,estrutura de dados,12,7,"A collection of related values, often organized in lists, dictionaries, tuples, etc.","Uma coleção de valores relacionados, geralmente organizados em listas, dicionários, tuplas, etc." exceção,exception,exceção,2,17,An error that is detected while the program is running.,Um erro que é detectado enquanto o programa está executando. executar,execute,executar,2,9,To run a statement and do what it says.,Executar uma declaração e fazer o que ela pede. explodir,scatter,explodir,12,4,The operation of treating a sequence as a list of arguments.,A operação de tratar uma sequência como uma lista de argumentos. -expressão,expression,expressão,2,6,"A combination of variables, operators, and values that represents a single result.",Uma combinação de operadores e operandos (variáveis e valores) que tem valor simples como resultado. +expressão,expression,expressão,2,6,"A combination of variables, operators, and values that represents a single result.",Uma combinação de operadores e operandos (variáveis e valores) que têm valor simples como resultado. expressão booleana,boolean expression,expressão booleana,5,3,An expression whose value is either True or False.,Uma expressão que é ou verdadeira ou falsa. expressão condicional,conditional expression,expressão condicional,19,1,"An expression that has one of two values, depending on a condition.","Uma expressão que tem um de dois valores, dependendo de uma condição." expressão geradora,generator expression,expressão geradora,19,3,An expression with a for loop in parentheses that yields a generator object.,Uma expressão com um loop for em parênteses que produz um objeto gerador. @@ -20,7 +20,7 @@ filtro,filter,filtro,10,8,A processing pattern that traverses a list and selects flag,flag,“indicador”,11,19,A boolean variable used to indicate whether a condition is true.,Uma váriável do tipo boolean usada para indicar se uma condição é verdadeira. fluxo de execução,flow of execution,fluxo de execução,3,19,The order statements run in.,A ordem em que comandos são executados durante a execução de um programa. frame,frame,,3,21,A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function.,Uma caixa em um diagrama da pilha que representa uma chamada de função. Ela contém as variáveis locais e os parâmetros da função. -função,function,função,3,1,A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result.,Uma sequên ia de comandos com um nome que executa operações úteis. Funções podem ou não ter parâmetros e podem ou não produzir um resultado. +função,function,função,3,1,A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result.,Uma sequência de comandos com um nome que executa operações úteis. Funções podem ou não ter parâmetros e podem ou não produzir um resultado. função de hash,hash function,função de espalhamento,11,9,A function used by a hashtable to compute the location for a key.,Uma função de uma tabela de hash utilizada para calcular a localização de uma chave. função produtiva,fruitful function,função produtiva,3,11,A function that returns a value.,Uma função que retorna um valor ao invés de None. função pura,pure function,função pura,16,3,A function that does not modify any of the objects it receives as arguments. Most pure functions are fruitful.,Uma função que não produz efeitos colaterais. Funções puras apenas alteram os estado (variáveis) das funções que a chamam através de valores de retorno.