Homepage: http://gotools.sourceforge.net (see sgflib.py)
Copyright (C) 2000 David John Goodger (mailto:email@example.com). typelib.py comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it and/or modify it under certain conditions; see the source code for details.
This library implements abstract superclasses to emulate Python's built-in data types. This is useful when you want a class which acts like a built-in type, but with added/modified behaviour (methods) and/or data (attributes).
Implemented types are: String, Tuple, List, Dictionary, Integer, Long, Float, Complex (along with their abstract superclasses).
All methods, including special overloading methods, are implemented for each type-emulation class. Instance data is stored internally in the data attribute (i.e., self.data). The type the class is emulating is stored in the class attribute self.TYPE (as given by the built-in type(class)). The SuperClass.__init__() method uses two class-specific methods to instantiate objects: _reset() and _convert().
See "sgflib.py" (at module's homepage, see above) for examples of use. The Node class is of particular interest: a modified Dictionary which is ordered and allows for offset-indexed retrieval.
Hosted by SourceForge.net