[Python-3000] Function annotations considered obfuscatory (Re: Conventions for annotation consumers)

Jim Jewett jimjjewett at gmail.com
Wed Aug 16 16:26:44 CEST 2006


On 8/16/06, Guido van Rossum <guido at python.org> wrote:
> On 8/15/06, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:

    [9 lines for a two argument def]

> > There's another thing that's bothering me about all this.
> > The main reason Guido rejected the originally suggested
> > syntax for function decorators was that it put too much
> > stuff into the function header and obscured the signature.

> It's a worse-case scenario suggesting how one could solve a very hairy
> problem. I don't expect that something this extreme will be at all
> common (otherwise I'd be against it too).

Yes and no; I don't think it will be that uncommon to have multiple
annotations, somewhat similar to "public static final int".  Also note
that needing to disambiguate the annotations will tend to increase
their length.

I hope that needing more than one line per argument will be unusual,
but needing more than one line for a definition may not be.

That is one reason I wonder whether all annotations/modifications have
to actually be part of the prologue, or whether they could be applied
to the Signature afterwards.

-jJ


More information about the Python-3000 mailing list