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 Zac Hatfield-Dodds
Recipients BTaskaya, Zac Hatfield-Dodds, gvanrossum, kj
Date 2021-01-23.13:45:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1611409535.64.0.0663219661728.issue43006@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2021-01-23 13:45:35Zac Hatfield-Doddssetrecipients: + Zac Hatfield-Dodds, gvanrossum, BTaskaya, kj
2021-01-23 13:45:35Zac Hatfield-Doddssetmessageid: <1611409535.64.0.0663219661728.issue43006@roundup.psfhosted.org>
2021-01-23 13:45:35Zac Hatfield-Doddslinkissue43006 messages
2021-01-23 13:45:35Zac Hatfield-Doddscreate