Message378176
It is not actually much of a difference;
$ cat t.py
def func(
arg: typing.Callable[
[int, str],
str # test
]
):
pass
import typing
print("Annotations: ", func.__annotations__)
print("get_type_hints: ", typing.get_type_hints(func))
$ ./python t.py
Annotations: {'arg': 'typing.Callable[[int,str],str]'}
get_type_hints: {'arg': typing.Callable[[int, str], str]}
$ ./python
>>> foo: (List[List[List[int, str, bytes]], List[(int, str)]])
>>> __annotations__
{'foo': 'List[List[List[int,str,bytes]],List[(int,str)]]'} |
|
Date |
User |
Action |
Args |
2020-10-07 19:42:28 | BTaskaya | set | recipients:
+ BTaskaya, gvanrossum, lukasz.langa, lys.nikolaou, pablogsal |
2020-10-07 19:42:28 | BTaskaya | set | messageid: <1602099748.05.0.299700437279.issue41967@roundup.psfhosted.org> |
2020-10-07 19:42:28 | BTaskaya | link | issue41967 messages |
2020-10-07 19:42:28 | BTaskaya | create | |
|