Hi all.
I tried asking this on IRC channel, but ended up with no answear. Simple example:
from typing import Dict, Callable
CmdFun = Callable[ ... , int ]
CmdFull = Dict[ str, CmdFun ]
Gives error:
pauli@HPauli-U1604 ~ % python3 /tmp/silly.py
Traceback (most recent call last):
File "/tmp/silly.py", line 5, in <module>
CmdFull = Dict[ str, CmdFun ]
File "/usr/lib/python3.5/typing.py", line 1025, in __getitem__
tvars = _type_vars(params)
File "/usr/lib/python3.5/typing.py", line 284, in _type_vars
_get_type_vars(types, tvars)
File "/usr/lib/python3.5/typing.py", line 279, in _get_type_vars
t._get_type_vars(tvars)
File "/usr/lib/python3.5/typing.py", line 786, in _get_type_vars
_get_type_vars(self.__args__, tvars)
File "/usr/lib/python3.5/typing.py", line 277, in _get_type_vars
for t in types:
TypeError: 'ellipsis' object is not iterable
The python intrepretter is the one shipped with ubuntu16.04 currently: Python 3.5.2
Based on the documentation i think this should be valid statement. The similar issue raises if the Dict is replaced with Tuple, but i did not try any other combinations.
|