2 ms·
There is one: >>> C2 = attr.make_class("C2", ["a", "b"]) >>> C2("foo", "bar") C2(a='foo', b='bar')
by StavrosK 10y ago
There is one:
>>> C2 = attr.make_class("C2", ["a", "b"])
>>> C2("foo", "bar")
C2(a='foo', b='bar')
- xapata 10y agoSimpleNamespace is good for that. https://docs.python.org/3/library/types.html#types.SimpleNamespace https://docs.python.org/3/library/types.html#types.SimpleNam...