OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | __init__ (self, factory, takes_self=False) |
def | __getstate__ (self) |
def | __setstate__ (self, state) |
Data Fields | |
factory | |
takes_self | |
Stores a factory callable. If passed as the default value to `attr.ib`, the factory is used to generate a new value. :param callable factory: A callable that takes either none or exactly one mandatory positional argument depending on *takes_self*. :param bool takes_self: Pass the partially initialized instance that is being initialized as a positional argument. .. versionadded:: 17.1.0 *takes_self*
def __init__ | ( | self, | |
factory, | |||
takes_self = False |
|||
) |
`Factory` is part of the default machinery so if we want a default value here, we have to implement it ourselves.
def __getstate__ | ( | self | ) |
Play nice with pickle.
def __setstate__ | ( | self, | |
state | |||
) |
Play nice with pickle.
factory |
takes_self |