Eric V. Smith <e...@trueblade.com> added the comment:
> To be honest, I've never been really sure if the idea of PEP 563 stringized > annotations are supposed to be a hidden implementation detail, or a > first-class concept that the user (and the standard library) is expected to > deal with. This is an excellent question. My assumption with dataclasses has been that it's something the user is expected to deal with. It's a user-visible change, that all users of __annotations__ are going to have to deal with. I understood PEP 573 as saying: if you don't want to see a stringized annotation, call typing.get_type_hints() yourself. My assumption is that neither @dataclass nor anybody else is going to do that for you. However, not everyone agreed. See for example issue 39442. I do think that wherever we end up with __annotations__ in 3.11, we should be explicit about answering your question. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43817> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com