[New-bugs-announce] [issue42904] get_type_hints does not provide localns for classes

Paul Bryan report at bugs.python.org
Tue Jan 12 00:00:15 EST 2021


New submission from Paul Bryan <pbryan at anode.ca>:

According to PEP 563:

> The get_type_hints() function automatically resolves the correct value of globalns for functions and classes. It also automatically provides the correct localns for classes.

This statement about providing correct localns for classes does not appear to be true.

Guido suggested this should be treated as a bug.

----------
components: Library (Lib)
messages: 384885
nosy: gvanrossum, pbryan
priority: normal
severity: normal
status: open
title: get_type_hints does not provide localns for classes
type: behavior
versions: Python 3.10

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


More information about the New-bugs-announce mailing list