Page 19 - think python 2
P. 19

Contents xix
 14.6 Databases...................................... 141 14.7 Pickling....................................... 142 14.8 Pipes ........................................ 142 14.9 Writingmodules.................................. 143 14.10 Debugging..................................... 144 14.11 Glossary ...................................... 145 14.12 Exercises ...................................... 145
15 Classes and objects 147
15.1 Programmer-definedtypes............................ 147 15.2 Attributes ..................................... 148 15.3 Rectangles ..................................... 149 15.4 Instancesasreturnvalues ............................ 150 15.5 Objectsaremutable................................ 151 15.6 Copying ...................................... 151 15.7 Debugging..................................... 152 15.8 Glossary ...................................... 153 15.9 Exercises ...................................... 154
16 Classes and functions 155
16.1 Time......................................... 155 16.2 Purefunctions................................... 156 16.3 Modifiers...................................... 157 16.4 Prototypingversusplanning........................... 158 16.5 Debugging..................................... 159 16.6 Glossary ...................................... 160 16.7 Exercises ...................................... 160
17 Classes and methods 161
17.1 Object-orientedfeatures ............................. 161 17.2 Printingobjects .................................. 162 17.3 Anotherexample ................................. 163



























































































   17   18   19   20   21