Rafe KettlerCopyright © 2012 Rafe Kettler
A PDF version of this guide can be obtained from my site or Github.
The magic methods guide has
a git repository at http://www.github.com/RafeKettler/magicmethods.
Any issues can be reported there, along with comments, (or even contributions!).
- Construction and Initialization
- Making Operators Work on Custom Classes
- Representing your Classes
- Controlling Attribute Access
- Making Custom Sequences
- Abstract Base Classes
- Callable Objects
- Context Managers
- Building Descriptor Objects
- Pickling your Objects
- Appendix 1: How to Call Magic Methods
- Appendix 2: Changes in Python 3