PlasmaCalcs.dimensions.behavior.MetaBehaviorHaver

class PlasmaCalcs.dimensions.behavior.MetaBehaviorHaver(*args, **kw)

Bases: type

metaclass for BehaviorHaver. adds cls_behavior_attrs to the class namespace;
use cls_behavior_attrs.register(new_attr) to register a new attr as a behavior attr.
Note that __prepare__ gets called before class definition begins, and fills class namespace,
then __init__ gets called after class definition ends. For example:
class MySubclass(metaclass=MetaBehaviorHaver):
# <– __prepare__ runs here. Roughly: locals().update(__prepare__())
pass # or, define other functions, variables, etc, as desired.
# <– __init__ runs here. Roughly: MetaBehaviorHaver.__init__(MySubclass)
__init__(*args, **kw)
initialize cls (with metaclass=MetaBehaviorHaver)

Methods

__init__(*args, **kw)

mro()

mro()
Return a type’s method resolution order.