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

Eric V. Smith report at bugs.python.org
Wed May 16 12:02:42 EDT 2018


Eric V. Smith <eric at trueblade.com> added the comment:

The behavior used to be that we'd raise an error if you tried to overwrite a dunder method. Then we decided that the existence of a dunder method meant you didn't want it overwritten, so now we don't need to explicitly set a flag to False in that case.

However, we did not go back and see which of the flags still make sense. I can't think of a reason why anyone would use the `init` parameter to @dataclass.

It's a little late in the 3.7 release cycle to remove it, so maybe we can decide to deprecate it in 3.8? Although if there's clearly no reason for it to exist, I could be talked in to removing it.

We should probably go through every flag and decide about it individually.

----------

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


More information about the Python-bugs-list mailing list