PEP 318

David M. Wilson dw-google.com at botanicus.net
Mon Mar 22 03:17:54 CET 2004


Nicolas Fleury <nid_oizo at yahoo.com_removethe_> wrote...

> Personnally, I prefer the "as" syntax to the other proposed (and by a 
> large margin).  However, I feel that it is making the language more 
> complex and I'm far from sure it's worth the effort.

I'd +1 for the 'as' syntax too, it's more descriptive and feels
'pythonic' (much as the term disgusts me) in its verbosity.

Personally, I think for the meager benefit this new syntax brings, it
appears to be a rather large and incompatible waste of time. With the
exception of syntactic beauty, does this really add anything to
Python? It gives programmers two ways of doing something very basic
indeed. Both proposed syntaxes will inevitably break existing source
analysers, etc.

Even preferring the 'as' syntax, 'def foo(x) as bar' doesn't really
make that much sense to me. staticmethods are wrapper objects and much
better expressed as 'foo = staticmethod(foo)', where you at least know
some kind of layering or transformation is being applied to foo (if
there isn't, why is this person using the same variable name? etc).
With 'as', it suggests some kind of aliasing is taking place, or some
kind of different type of object creation, which isn't the case.

It's also very specific syntax, I'd have hoped big language changes
like this would be reserved for larger, more fundamental, and general
changes that everyone can find useful. Did I say I didn't think it's
worth it already? :)


David.



More information about the Python-list mailing list