This code snippet demonstrates how KwargsPower
can take any number of **kwargs
and it will store them as instance variables.
>>> class KwargsPower:
... def __init__(self, *args, **kwargs):
... for k, v in kwargs.items():
... self.__setattr__(k, v)
>>> kp = KwargsPower(a=1, b=2, c=3)
>>> kp.__dict__
{'a': 1, 'b': 2, 'c': 3}