25 Apr
2017
25 Apr
'17
4:04 a.m.
On Mon, Apr 24, 2017 at 6:08 PM, Erik
Hi. I suspect that this may have been discussed to death at some point in the past, but I've done some searching and I didn't come up with much. Apologies if I'm rehashing an old argument ;)
I often find myself writing __init__ methods of the form:
def __init__(self, foo, bar, baz, spam, ham): self.foo = foo self.bar = bar self.baz = baz self.spam = spam self.ham = ham
This isn't a direct response, but you might be interested in the attrs library: https://attrs.readthedocs.io/en/stable/examples.html -n -- Nathaniel J. Smith -- https://vorpus.org