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 cjw296, gvanrossum, levkivskyi
Date 2020-09-27.19:59:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This cannot be helped (unless we were to add an ugly sys._getframe() call to get_type_hints(), which I don't want to do). The solution is to pass `localns=locals()`, e.g.

get_type_hints(foo, None, locals())


get_type_hints(foo, localns=locals())
Date User Action Args
2020-09-27 19:59:08gvanrossumsetrecipients: + gvanrossum, cjw296, levkivskyi
2020-09-27 19:59:08gvanrossumsetmessageid: <>
2020-09-27 19:59:08gvanrossumlinkissue41872 messages
2020-09-27 19:59:08gvanrossumcreate