12.07.2015 Views

Is Python a

Is Python a

Is Python a

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ArithmeticError (built-in exception), 609assert statement, 203, 575, 595–596trapping constraints, 595AssertionError, 595assigned names, 312, 372assignment statements, 202, 217–227augmented, 219forms, 218multiple-target, 219properties, 217sequence, 218–222advanced patterns, 220tuple- and list-unpacking, 218assignments, 401augmented, 223–225advantages, 224shared references, 225classifying names, 506–508inside class statements, 466multiple-target, 222shared references, 222passing arguments by, 330associative arrays, 160attribute names, 313attribute references, 313catching, 498attribute tree construction, 487AttributeError exception, 499attributes, 387–389, 630class, 487changing, 559–560defs, 483instances, 487names, 506pseudoprivate, 543–545why use, 544references, 483augmented assignments, 219, 223–225advantages, 224shared references, 225automatic extensions on Windows, 40automatic memory management, 14Bbackquotes expression, 136_ _bases_ _ attribute, 509behavior (objects), 466bitwise operator, 96bitwise shift, numbers, 103blank lines, 239block boundaries, 239, 240block rule special case, 209bool data type, 109Boolean operatorsnumbers, 103Booleans, 87, 109, 246bound instance method objects, 534bound methods, 536break statement, 202, 250_ _builtin_ _ module, 106, 312, 314built-in typesclasses derived from, 546extending, 539–543by embedding, 540by subclassing, 540–543why use, 66built-ins, 312, 630_ _dict_ _ attribute, 508_ _import_ _ function, 394, 439_ _main_ _ module, 434_ _name_ _ attribute, 428abs function, 106any function, 264apply function, 350–351AttributeError exception, 499chr function, 355converting types manually, 98dict constructor call, 270dictionaries (see dictionaries)dir function, 49, 73, 279docstrings (see docstrings)enumerate function, 271eval, 27eval function, 338exec, 27execfile('module.py') function, 50False name, 109files (see files)filter function, 356int function, 105, 212iter function, 262, 362len function, 70, 300list function, 119, 175, 264lists (see lists)long integers, 104map function, 260, 263, 269, 352–353,366mathematical functions, 95NotImplementedError exception, 490number literals, 95number tools, 106object types, 14open function, 85, 300operator module, 354682 | Index

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!