This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Pauli Salmenrinne
Recipients Pauli Salmenrinne
Date 2017-02-22.08:14:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487751244.2.0.980199684208.issue29618@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-02-22 08:14:04Pauli Salmenrinnesetrecipients: + Pauli Salmenrinne
2017-02-22 08:14:04Pauli Salmenrinnesetmessageid: <1487751244.2.0.980199684208.issue29618@psf.upfronthosting.co.za>
2017-02-22 08:14:04Pauli Salmenrinnelinkissue29618 messages
2017-02-22 08:14:03Pauli Salmenrinnecreate