<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 13, 2014 at 3:21 PM, Juancarlo AƱez <span dir="ltr"><<a href="mailto:apalala@gmail.com" target="_blank">apalala@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><div dir="ltr"><div class=""><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 13, 2014 at 3:14 PM, Guido van Rossum <span dir="ltr"><<a href="mailto:guido@python.org" target="_blank">guido@python.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">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.</blockquote>
</div><br></div></div><div class="gmail_extra">I'll comment later on the core subject. <br><br>For now, I think this deserves some thought:<br><br></div><div class="gmail_extra">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?). <br>
<br></div><div class="gmail_extra">Independently of its core merits, this proposal should fail unless annotations are added to Python 2.8.<br></div></div></blockquote><div><br></div><div>Actually, mypy already has a solution. There's a codec (<a href="https://github.com/JukkaL/mypy/tree/master/mypy/codec">https://github.com/JukkaL/mypy/tree/master/mypy/codec</a>) that you can use which transforms Python-2-with-annotations into vanilla Python 2. It's not an ideal solution, but it can work in cases where you absolutely have to have state of the art Python 3.5 type checking *and* backwards compatibility with Python 2.<br>
<br></div></div>-- <br>--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)
</div></div>