[Python-Dev] Type hints -- a mediocre programmer's reaction

Daniel Holth dholth at gmail.com
Tue Apr 21 19:34:30 CEST 2015


On Tue, Apr 21, 2015 at 1:10 PM, Guido van Rossum <guido at python.org> wrote:
> On Tue, Apr 21, 2015 at 9:17 AM, R. David Murray <rdmurray at bitdance.com>
> wrote:
>>
>> Please be respectful rather than inflammatory.  If you read what I
>> wrote, I did not say that I was going to stop contributing, I
>> specifically talked about that gut reaction being both emotional and
>> illogical.  That doesn't make the reaction any less real, and the fact
>> that such reactions exist is a data point you should consider in
>> conducting your PR campaign for this issue.  (I don't mean that last as
>> a negative:  this issue *requires* an honest PR campaign.)
>
>
> Well, my own reactions at this point in the flame war are also quite
> emotional. :-(
>
> I have done my best in being honest in my PR campaign. But I feel like the
> opposition (not you, but definitely some others -- have you seen Twitter?)
> are spreading FUD based on an irrational conviction that this will destroy
> Python. It will not. It may not prove the solution to all Python's problems
> -- there's always 3.6. (Oh wait, Python 2.7 is perfect. I've heard that
> before -- Paul Everitt famously said the same of Python 1.5.2. Aren't you
> glad I didn't take him literally? :-P )
>
> --
> --Guido van Rossum (python.org/~guido)

I am looking forward to using type annotations. I am not very good at
remembering the operations that are available on the objects passed
around in my code, but I am very good at typing CTRL-space. To get
that I am happy to modify my code with weird docstrings or any other
notation. Good support for completion, aided by standard annotations,
eliminates a huge amount of cross-referencing while coding.

I'm also hopeful that static type checking, aided with annotations,
will help with unicode porting. Duck typing does not work very well
when you are trying to differentiate between bytes and str.

Also, Python 1.5.2 was pretty good :-)


More information about the Python-Dev mailing list