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 gvanrossum
Recipients Prometheus3375, gvanrossum
Date 2021-01-05.18:41:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1609872061.76.0.147698277604.issue42829@roundup.psfhosted.org>
In-reply-to
Content
If you want this to work you have to pass the namespace where B is defined as locals to get_type_hint(). The recommended approach is to make B a global class; where that is not possible (as in your second example) you should chose a different name.

We're not going to guess additional namespaces to add to the lookup, so I will close this as won't fix.

PS. For short code snippets like your examples, I prefer pasting the code inline.
History
Date User Action Args
2021-01-05 18:41:01gvanrossumsetrecipients: + gvanrossum, Prometheus3375
2021-01-05 18:41:01gvanrossumsetmessageid: <1609872061.76.0.147698277604.issue42829@roundup.psfhosted.org>
2021-01-05 18:41:01gvanrossumlinkissue42829 messages
2021-01-05 18:41:01gvanrossumcreate