Learning Python - Mark Lutz [602]
delegation using, OOP and Delegation: “Wrapper” Objects
delegation-based managers, Delegation-Based Managers Revisited
example, A First Example
interception of built-in attributes, Intercepting Built-in Operation Attributes
loops, avoiding in interception methods, Avoiding loops in attribute interception methods
__getattribute__, compared to, __getattr__ and __getattribute__ Compared
__getattribute__ method, __getattribute__ and Descriptors, Inserting Code to Run on Attribute Access, __getattr__ and __getattribute__, Delegation-Based Managers Revisited, Avoiding loops in attribute interception methods, A First Example, Computed Attributes, __getattr__ and __getattribute__ Compared, Intercepting Built-in Operation Attributes, Delegation-Based Managers Revisited
computed attributes, Computed Attributes
delegation-based managers, Delegation-Based Managers Revisited
example, A First Example
interception of built-in operation attributes, Intercepting Built-in Operation Attributes
loops, avoiding in attribute interception, Avoiding loops in attribute interception methods
__getattr__, compared to, __getattr__ and __getattribute__ Compared
__getitem__ method, Indexing and Slicing: __getitem__ and __setitem__, Index Iteration: __getitem__, Membership: __contains__, __iter__, and __getitem__
index iteration, Index Iteration: __getitem__
membership, Membership: __contains__, __iter__, and __getitem__
__gt__ method, Comparisons: __lt__, __gt__, and Others
__iadd__ method, Right-Side and In-Place Addition: __radd__ and __iadd__
__init__.py files, Package __init__.py Files
__init__ method, Classes Can Intercept Python Operators, Coding Constructors, Constructors and Expressions: __init__ and __sub__
__iter__ method, Iterator Objects: __iter__ and __next__, User-Defined Iterators, Membership: __contains__, __iter__, and __getitem__
design purpose, User-Defined Iterators
membership, Membership: __contains__, __iter__, and __getitem__
__len__ method, Boolean Tests: __bool__ and __len__
__lt__ method, Comparisons: __lt__, __gt__, and Others
__main__ attribute, Mixed Usage Modes: __name__ and __main__
__name__ attribute of modules and, Mixed Usage Modes: __name__ and __main__
__main__ module, Scope Rules
__metaclass__ variable (Python 2.6), Declaring Metaclasses
__name__ attribute, Mixed Usage Modes: __name__ and __main__, Unit Tests with __name__, Using Command-Line Arguments with __name__, Using Code Two Ways
command-line arguments with, Using Command-Line Arguments with __name__
unit tests, Unit Tests with __name__
__ne__ method, Comparisons: __lt__, __gt__, and Others
__next__ method, The Iteration Protocol: File Iterators, Iterator Objects: __iter__ and __next__
__radd__ method, Right-Side and In-Place Addition: __radd__ and __iadd__
__repr__ method, String Representation: __repr__ and __str__, Custom Print Displays
custom exception display using, Custom Print Displays
__set__ method, Common Operator Overloading Methods, Read-only descriptors
__setattr__ method, Attribute Reference: __getattr__ and __setattr__, Inserting Code to Run on Attribute Access, __getattr__ and __getattribute__
__setitem__ method, Intercepting Slices
__slots__ attribute, Listing attributes per object in class trees, Instance Slots, How Properties and Descriptors Relate, Using __dict__ and __slots__
descriptors and, How Properties and Descriptors Relate
__dict__ attribute and, Using __dict__ and __slots__
__str__ method, A Third Example, Providing Print Displays, String Representation: __repr__ and __str__, Custom Print Displays
custom exception display using, Custom Print Displays
overload method for printing objects, Providing Print Displays
__sub__ method, Constructors and Expressions: __init__ and __sub__
A
abs function, Other Built-in Numeric Tools
absolute imports, Relative Import Basics
abstract superclasses, Abstract Superclasses, Python 2.6 and 3.0 Abstract Superclasses, Python 2.6 and 3.0 Abstract Superclasses, Stream Processors Revisited
example,