First page Back Continue Last page Summary Graphics
Classes and objects
Special methods correspond to type slots
- Override default behavior
- __cmp__() to tp_compare
- __getattr__() / __setattr__()
Python classes can inherit from C-defined types
- Experimental in Python 2.2
Metaclass extends type
- Overrides default class behavior
- Defines class methods
Notes: