Module providing "late-binding" for type specifiers
This is a generically useful utility module, it is
provided here just because this is where it is used
- Find the class(es) specified by specifier
Allows you to pass a type specifier, one of:
string -> fully-qualified string specifying an importable class
tuple/list -> list of specifiers
class/other -> a class or other type (untouched)
and get back either a single class, or a tuple of
This allows you to specify types like so:
in many places within the basicproperty and wxoo packages
for use as a sequence of classes without getting messed up
by mutual-import problems.
Note: the only time you get back a single class (as opposed to
a tuple with a single class as it's only item) is when you
specify a string or class as the root specifier.
- flatten(inlist, type=<type 'type'>, ltype=(<type 'list'>, <type 'tuple'>), maxint=2147483647)
- Flatten out a list, code developed by myself and modified by Tim Peters, then by me again :)
- Import a class by name
||__file__ = r'p:\properties\basictypes\latebind.pyc'|
__name__ = 'basictypes.latebind'