[issue32505] dataclasses: make field() with no annotation an error

Eric V. Smith report at bugs.python.org
Wed Mar 21 17:53:39 EDT 2018


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

I'm not sure this is worth preventing. I can certainly make it an error, but since dataclasses ignores anything without a type annotation, I don't think it's a big deal. Basically I'd have to look through all class attributes that are of type Field but aren't in the class's __annotations__.

I cannot find the original conversation that caused me to open this issue. If anyone feels strongly that this case should be an error, let me know.

----------

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


More information about the Python-bugs-list mailing list