by mixmastamyk · 9y ago · 0 comments
def __init__(self, foo)
self.foo = foo
There is an attrs package and new proposal (https://github.com/ericvsmith/dataclasses/blob/master/pep-xx...) to remedy that. class Foo:
bar = 42
def __init__(self, **kwargs):
self.__dict__.update(**kwargs)
But I agree that's not a super robust solution