[Python-ideas] PEP 484 (Type Hints) -- first draft round

Ed Kellett edk141 at gmail.com
Thu Jan 22 22:45:41 CET 2015


On Thu Jan 22 2015 at 20:05:41 Guido van Rossum <guido at python.org> wrote:
>
> This paragraph (and a some words you wrote earlier) feels really offensive
> to me. I am doing the best I can. I have listened to an *enormous* amount
> of feedback and if you read back earlier discussions (going back to I
> believe September or October 2014) or skim the typehinting issue tracker
> <https://github.com/ambv/typehinting/issues> you'll find that I am taking
> the feedback very seriously.
>

I'm sorry. I don't mean to minimize the work you've put into this, and in
any case there was no call to speak so unconstructively.


> The only situation where there may be a desire to change something (the
> minimal thing being to add a "# type: OFF" comment at the top of a module)
> is when a library that uses annotations for non-type-hinting purposes is
> used by an application (or another library) that wants to use type hints,
> and the user who is running the type checker cannot live with the noise
> output spewed by the type checker for that library.
>

This is more or less the situation I imagined. Or, more problematic - the
user running the type checker might assume the library is no good because
it sets off the warnings.


> Finally. In the distant future there may be more agreement about the use
> of annotations for type hints, and users will start asking library authors
> to change their code. But that's no different than other evolution of the
> language -- it won't happen overnight, you will get ample warning
> (DeprecationWarning :-), and the principle of supply and demand will apply.
> Heck, if you're not using Python 3, you're safe until 2020.
>

I understand that it's a long way off, but in my view that'd be a
regression: I know not many things are using annotations at the moment, but
where they are used they fit really well (extra information for
command-line-ifying a function being the one I have most experience with).
It seems a shame to throw away something so neat when it feels as if the
different use cases could coexist peacefully.

Thanks for your time,
Ed Kellett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150122/ef5efcf3/attachment.html>


More information about the Python-ideas mailing list