Message370188
From now on, should typing.get_type_hints automatically resolve arguments too? An example would be this;
import typing
T = typing.TypeVar("T")
class Loop(typing.Generic[T]):
subloop: typing.Final["Loop[int]"]
print(typing.get_type_hints(Loop))
>>> {'subloop': typing.Final[__main__.Loop[int]]}
If we run the same code under future annotations
>>> {'subloop': typing.Final[ForwardRef('Loop[int]')]} |
|
Date |
User |
Action |
Args |
2020-05-28 10:51:15 | BTaskaya | set | recipients:
+ BTaskaya, gvanrossum, barry, brett.cannon, vstinner, eric.smith, lukasz.langa, levkivskyi |
2020-05-28 10:51:15 | BTaskaya | set | messageid: <1590663075.23.0.995014572805.issue38605@roundup.psfhosted.org> |
2020-05-28 10:51:15 | BTaskaya | link | issue38605 messages |
2020-05-28 10:51:15 | BTaskaya | create | |
|