[Python-Dev] PEP 526 (variable annotations) accepted provisionally

Nick Coghlan ncoghlan at gmail.com
Wed Sep 7 20:22:28 EDT 2016


On 8 September 2016 at 04:18, Guido van Rossum <guido at python.org> wrote:
> There's been some quite contentious discussion about the PEP, on and
> off python-dev, regarding how the mere presence of annotation syntax
> in the language will change the way people will see the language. My
> own experience using mypy and PyCharm has been quite different:
> annotations are a valuable addition for large code bases, and it's
> worth the effort to add them to large legacy code bases (think
> millions of lines of Python 2.7 code that needs to move to Python 3 by
> 2020). The effect of this has been that engineers using Python are
> happier and more confident that their code works than before, have an
> easier time spelunking code they don't know, and are less afraid of
> big refactorings (where conversion to Python 3 can be seen as the
> ultimate refactoring).

I also don't think it hurts to make the language migration easier for
folks coming from a C/C++/C#/Java background, and even if they
initially use explicit hints more heavily than they need to given the
inferencing engines in typecheckers, those same hints have the
potential to enable more automated refactorings that simplify their
code.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list