atom.subclass module
- class atom.subclass.ForwardSubclass(resolve)[source]
Bases:
Subclass
A Subclass which delays resolving the type definition.
The first time the value is accessed or modified, the type will be resolved and the forward subclass will behave identically to a normal subclass.
- default(owner)[source]
Called to retrieve the default value.
This is called the first time the default value is retrieved for the member. It resolves the type and updates the internal default handler to behave like a normal Subclass member.
- resolve
- class atom.subclass.Subclass(kind, default=None)[source]
Bases:
Member
A value which allows objects subtypes of a given type.
Values will be tested using the PyObject_IsSubclass C API call. This call is equivalent to issubclass(value, kind) and all the same rules apply.
A Subclass member cannot be set to None.