metaprogram example mixed usage modes - modules and preset value name collisions name mangling name resolution - named tuples - namespace declarations namespace dictionaries about - __dict__ attribute slots and - namespace package model about file precedence in - nesting semantics - usage examples - namespaces about assigning names - attribute names and classes and __dict__ attribute files generating inheritance and instances and legb rule and - minimizing namespace pollution modules and - nested classes and - nesting scope and naming conventions and rules classes legb rule - - scope and for variables - _x name prefix __ne__ method nesting blocks of code - classes - control flows decorators - def statement dictionaries index exception handlers - for statement - functions - lambda expressions lists loops - - mathematical operations namespace packages namespaces string formatting try/except/finally statement tuples netbeans ide __new__ method new-style classes about - attribute tools changes in - class tools - extensions to - mro and multiple inheritance in properties - slots - next built-in function - __next__ method about file iterators and generator functions and iterable objects and - user defined iterables and none object nonlocal statement about - boundary cases coding functions enclosing scope and - state retention options - version considerations - normal versus chained comparisons - notimplemented object notimplementederror exception numbers about - bitwise operations - booleans (see booleansbuilt-in tools -