Message403692
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} |
|
Date |
User |
Action |
Args |
2021-10-11 22:05:54 | rhettinger | set | recipients:
+ rhettinger, gvanrossum, levkivskyi |
2021-10-11 22:05:54 | rhettinger | set | messageid: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org> |
2021-10-11 22:05:54 | rhettinger | link | issue45438 messages |
2021-10-11 22:05:54 | rhettinger | create | |
|