PEP 3107 Function Annotations for review and comment

Tony Lownds tony at PageDNA.com
Mon Jan 1 18:01:00 EST 2007


On Jan 1, 2007, at 1:53 PM, Paul Boddie wrote:
> It's true that for the area to be explored, which I know you've been
> doing, one first has to introduce an annotation scheme that can  
> then be
> used by things like pylint. I'd like to see assertions about the
> usefulness of such annotations verified by modified versions of tools
> like pylint before changes to the language are made, mostly because
> such assertions seem to be more conjecture than prediction. In other
> words, the changes should be advocated, implemented and tested in a
> closed system before being introduced as wider language changes,
> especially given that Python has already seen a number of speculative
> changes which were made in anticipation of certain needs that
> subsequently appeared to be less significant than first thought.
>

I can understand reluctance to change the language, keep in mind this is
Python-3000 not Python 2.x, and even accepted features do get removed
sometimes, like the access statement. I'm sure that feature qualifies  
as a
speculative change -- I'd be curious to what other ones you were  
thinking
about.

At least one such modified tool exists: pydoc. That will display  
annotations.
Does that count?

It's not easy to develop syntax in a closed system that ISN'T python  
itself,
especially when part of the point is to consolidate the ways in which  
function
arguments and return types get annotated, and to do so as readably as  
possible.


> Another thing I find worrying about function annotations is the
> ambivalence around their purpose: the feature is supposedly great for
> static typing, but when confronted over the consequences of having
> developers spray type declarations everywhere, we're told that they
> aren't really meant for such things and that type declarations are  
> only
> an example of what annotations could do. Here, the sales department  
> and
> the engineering department really have to get together and get their
> story straight.

Can you point out any specific text from the PEP you derived this from?
Then "sales" can work from something specific :)

Thanks
-Tony





More information about the Python-list mailing list