Zac Hatfield-Dodds <zac.hatfield.do...@gmail.com> added the comment:
And I promise this is the last one: import inspect import typing def f(): A = typing.TypeVar("A") def same_type_args(a: A, b: A): assert type(a) == type(b) print(inspect.signature(same_type_args)) print(typing.get_type_hints(same_type_args)) f() $ python3 t.py (a: ~A, b: ~A) {'a': ~A, 'b': ~A} $ python3.10 t.py (a: 'A', b: 'A') Traceback (most recent call last): ... NameError: name 'A' is not defined My apologies to everyone involved here; I'm looking forward to postponed annotation evaluation, appreciate all your work on this, and regret that I have such bizzare bugs to report <3 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43006> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com