[issue33539] Remove `init` flag from @dataclass?

Barry A. Warsaw report at bugs.python.org
Wed May 16 17:12:55 EDT 2018


Barry A. Warsaw <barry at python.org> added the comment:

On May 16, 2018, at 16:48, Eric V. Smith <report at bugs.python.org> wrote:

> Do you really want to add a __init__ to each of the 500 classes?

Well, of course *I* do, but I’m weird like that.

> That is, the base class could legitimately being doing something with the derived class fields, and you might want to move all of the logic in to a base class.

Yeah, I can see the points.  I think if these are use cases we want to support, maybe we should describe them in the documentation as justifications for the keyword arguments.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33539>
_______________________________________


More information about the Python-bugs-list mailing list