[Python-ideas] PEP 484 (Type Hints) -- first draft round

Guido van Rossum guido at python.org
Sun Jan 18 05:17:23 CET 2015

On Sat, Jan 17, 2015 at 8:14 AM, Dennis Brakhane <brakhane at googlemail.com>

> The PEP does not mention MyPy style casts. Is this intentional?

No, we ran out of time for the first draft (and Łukasz needed some pushing
to like them :-). The conclusion in
https://github.com/ambv/typehinting/issues/15 is that we will add it.

> If yes, are casts not supported at all, or is there just no cast in typing
> and people should use type: comments instead?
> x = [1,2,3]  # type: Iterable[int]
> y = x # type: Sequence[int]
The issue I linked to also explains the difference (it's subtle!).

If someone wants to give describing cast() in the PEP a shot, send a PR!

--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150117/e5af6665/attachment.html>

More information about the Python-ideas mailing list