Top "Python-attrs" questions

Use for questions about the third-party Python library for data classes

Setting default/empty attributes for user classes in __init__

I have a decent level of programming, and get much value from the community here. However I have never had …

python class instance instance-variables python-attrs
How do I avoid the "self.x = x; self.y = y; self.z = z" pattern in __init__?

I see patterns like def __init__(self, x, y, z): ... self.x = x self.y = y self.z = z ... quite …

python python-2.7 python-decorators namedtuple python-attrs