Author rhettinger
Recipients gvanrossum, levkivskyi, rhettinger
Date 2021-10-11.22:05:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
In-reply-to
Content
In the example below, __annotations__ is correct but not the corresponding Signature object.

-----------------------------------------------------------------------

from typing import List

def f(s: List[float]) -> None: pass

def g(s: list[float]) -> None: pass

>>> inspect.signature(f)
<Signature (s: List[float]) -> None>

>>> inspect.signature(g)
<Signature (s: list) -> None>

g.__annotations__
{'s': list[float], 'return': None}
History
Date User Action Args
2021-10-11 22:05:54rhettingersetrecipients: + rhettinger, gvanrossum, levkivskyi
2021-10-11 22:05:54rhettingersetmessageid: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
2021-10-11 22:05:54rhettingerlinkissue45438 messages
2021-10-11 22:05:54rhettingercreate