[Python-ideas] Python-ideas Digest, Vol 93, Issue 31

Nick Coghlan ncoghlan at gmail.com
Thu Aug 14 10:44:53 CEST 2014


On 14 August 2014 07:09, Guido van Rossum <guido at python.org> wrote:
> On Wed, Aug 13, 2014 at 1:18 PM, Raymond Hettinger
> <raymond.hettinger at gmail.com> wrote:
>>
>>
>> On Aug 13, 2014, at 12:44 PM, python-ideas-request at python.org wrote:
>>
>>  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.
>>
>>
>> Is the goal to "make it possible" or would it quickly become required
>> (i.e. any time you write normal, readable Python, it would break
>> someone's optimizer, refactorer, linter, etc.?)
>
>
> Whoa, whoa. That's not at all the idea. Currently *nobody* uses type
> annotations because there's no standard notation. My goal is to enable their
> use by proposing a standard, nothing more.

Given the general lack of familiarity with ABCs, I don't have any
great fear of optional static typing becoming standard practice
either. Just like ABCs, it's a useful way to formalise some checks
when scaling up a code base to larger development teams. Most code
bases aren't going to be that large, so it often isn't going to be
worth the hassle.

On the other hand, it's going to make it easier to detect certain
kinds of structural errors more easily than even extensive unit
testing, as well as helping out IDEs to provide better prompts to
users, so I'm personally a fan of the idea.

Cheers,
Nick.

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


More information about the Python-ideas mailing list