Home | Trees | Indices | Help |
|
---|
|
object --+ | type --+ | AutoNodeType
A metaclass for AutoNodes..
The idea here is to define children in a class definition and make sure they are actually present.
AutoNodes are supposed to be immutable; the are defined during construction. Currently, nothing keeps you from changing them afterwards, but that may change.
The classes' constructor is defined to accept all attributes as arguments (you probably want to use keyword arguments here). It is the constructor that sets up the attributes, so AutoNodes must not have an __init__ method. However, they may define a method _setupNode that is called just before the artificial constructor returns.
To define the attributes of the class, add _a_<attname> attributes giving a default to the class. The default should normally be either None for 1:1 or 1:0 relations or an empty tuple for 1:n relations. The defaults must return a repr that constructs them, since we create a source fragment.
Instance Methods | |||
the object's type |
|
||
Inherited from Inherited from |
Properties | |
Inherited from Inherited from |
Method Details |
x.__init__(...) initializes x; see help(type(x)) for signature
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |