simplelogincmd.database.models.LenientInit¶
- class LenientInit¶
Bases:
objectMixin class that provides a lenient model object constructor
Usually, the model object constructor raises :exc:TypeError when it receives invalid keyword arguments. This lenient constructor simply ensures that no invalid keyword arguments are given to the default constructor, and returns any invalid arguments back to the caller for processing.
Subclasses can have __init__ methods like this:
def __init__(self, **kwargs): extra_kwargs = self._lenient_init(**kwargs) # Do something with the rest of the keyword args.
Methods