This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients JelleZijlstra, barry, eric.smith, gvanrossum, kj, larry, lukasz.langa, methane, xtreak
Date 2021-04-22.11:33:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> 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.
Date User Action Args
2021-04-22 11:33:38eric.smithsetrecipients: + eric.smith, gvanrossum, barry, larry, methane, lukasz.langa, JelleZijlstra, xtreak, kj
2021-04-22 11:33:38eric.smithsetmessageid: <>
2021-04-22 11:33:38eric.smithlinkissue43817 messages
2021-04-22 11:33:38eric.smithcreate