Please enable JavaScript.
Coggle requires JavaScript to display documents.
Fluent Python (The Python Data Model (Special methods (Iterator,…
Fluent Python
Special methods
-
-
-
-
-
-
-
Managed contexts (i.e., with blocks)
Special methods are very powerful beasts -- by just implementing len() and getitem(), your class becomes iterable, support slicing, etc
-
-
-
-
-
- Design Patterns with First-Class Functions
- Function Decorators and Closures
- Object References, Mutability, and Recycling
-
- Sequence Hacking, Hashing, and Slicing
- Interfaces: From Protocols to ABCs
- Inheritance: For Good or For Worse
- Operator Overloading: Doing It Right
- Iterables, Iterators, and Generators
- Context Managers and else Blocks
-
-
-
- Dynamic Attributes and Properties
-
-