Download Source Package python-extclass:
A lightweight mechanism, named "ExtensionClass", has been developed for making Python extension types more class-like. Classes can be developed in an extension language, such as C or C++, and these classes can be treated like other Python classes:
- They can be sub-classed in Python, - They provide access to method documentation strings, and - They can be used to directly create new instances.
An example class shows how extension classes are implemented and how they differ from extension types.
Extension classes provide additional extensions to class and instance semantics, including:
- A protocol for accessing subobjects "in the context of" their containers. This is used to implement custom method types and environmental acquisition. - A protocol for overriding method call semantics. This is used to implement "synchronized" classes and could be used to implement argument type checking. - A protocol for class initialization that supports execution of a special '__class_init__' method after a class has been initialized.
Extension classes illustrate how the Python class mechanism can be extended and may provide a basis for improved or specialized class models.
|
|
|
| Architecture | Package Size | Installed Size | Files |
|---|---|---|---|
| amd64 | 106.6 kB | 404 kB | [list of files] |
| armel | 96.8 kB | 372 kB | [list of files] |
| hppa | 111.9 kB | 424 kB | [list of files] |
| i386 | 94.6 kB | 316 kB | [list of files] |
| ia64 | 125.9 kB | 560 kB | [list of files] |
| mips | 98.5 kB | 412 kB | [list of files] |
| mipsel | 95.7 kB | 412 kB | [list of files] |
| powerpc | 113.0 kB | 452 kB | [list of files] |
| s390 | 102.7 kB | 396 kB | [list of files] |
| sparc | 100.3 kB | 384 kB | [list of files] |