[Python-3000] What's the point of annotations?

BJörn Lindqvist bjourne at gmail.com
Tue Jan 2 20:13:14 CET 2007


On 1/2/07, Phillip J. Eby <pje at telecommunity.com> wrote:
> At 12:08 PM 1/2/2007 -0600, Collin Winter wrote:
> >I could say You Aren't Going to Need It, but that gets the tense
> >wrong; we're getting along without annotations quite nicely here in
> >the present. In short: I'd like to request that PEP 3107 be rejected
> >as an overly-specific, unnecessary addition to the language.
>
> You left off overloading and argument adaptation as use cases.  These are
> considerably more readable when specified in-line, just like decorators are
> more readable placed above the function than after it.

I don't understand. How does function annotations in itself make
overloading and argument adaptation more readable? And with
"overloading," do you mean function overloading? I thought that wasn't
possible in Python and even if it was, it was a bad idea. The FAQ says
something like that. I'd like to see a before-and-after example.

> As with decorators, these uses happen today, but are more awkward without
> the syntax.

Where?

-- 
mvh Björn


More information about the Python-3000 mailing list