[Python-ideas] Proposal: Use mypy syntax for function annotations

Juancarlo Añez apalala at gmail.com
Thu Aug 14 00:21:40 CEST 2014


On Wed, Aug 13, 2014 at 3:14 PM, Guido van Rossum <guido at python.org> wrote:

> I am proposing that we adopt whatever mypy uses here, keeping discussion
> of the details (mostly) out of the PEP. The goal is to make it possible to
> add type checking annotations to 3rd party modules (and even to the stdlib)
> while allowing unaltered execution of the program by the (unmodified)
> Python 3.5 interpreter.


I'll comment later on the core subject.

For now, I think this deserves some thought:

Function annotations are not available in Python 2.7, so promoting
widespread use of annotations in 3.5 would be promoting code that is
compatible only with 3.x, when the current situation is that much effort is
being spent on writing code that works on both 2.7 and 3.4 (most
libraries?).

Independently of its core merits, this proposal should fail unless
annotations are added to Python 2.8.

Cheers,

-- 
Juancarlo *Añez*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140813/a43b8896/attachment-0001.html>


More information about the Python-ideas mailing list