BoundFactory

This will bind the attribute to whatever is given by factory_class. This factory should be a callable with the signature factory_class(added_class, attr_name, *args, **kw).

The factory will be reinvoked (and the attribute rebound) for every subclassing.


Attributes

a clone_for_subclass

True

a __unpackargs__

()

a __addtoclass__

<bound class method BoundFactory.__addtoclass__>

a factory_class

None

a singleton

<bound class method BoundFactory.singleton>

a __mutableattributes__

()

a __restrict_attributes__

None

a declarative_count

2

Methods

f __subclasshook__(...) ...

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

f __format__(...) ...

default object formatter

f __sizeof__(...) ...

__sizeof__() -> int size of object in memory, in bytes

f __classinit__(cls, new_attrs) ...

f __instanceinit__(self, new_attrs) ...

f set_object(cls, added_class, attr_name, obj) ...

f __init__(self, *args, **kw) ...

f make_object(cls, added_class, attr_name, *args, **kw) ...

f __call__(self, *args, **kw) ...

See the source for more information.