[Python-Dev] Pep 318 - new syntax (esp for wrappers)

Jewett, Jim J jim.jewett at eds.com
Wed Mar 3 14:39:37 EST 2004


Bob Ippolito

> ANYTHING that transforms a function in 
> ANY way can be represented by this decorator syntax.

"can" != "should".

The transforms *can* be represented in the current 
syntax, but we agree that the current idiom should 
be improved.  Different changes may be preferable 
for other patterns.

>> (2)  Wrappers are not essential to understanding 
>> functions, and should not pretend to be. ...

>> In most languages, classifiers are always relevant.
>> {int, public, synchronized, ...}

> [In python, these wrappers] are not essential to
> understanding how to make your own functions or methods,

exactly.

> Since when do newbies read the "language lawyer" documentation?

Depends on the newbie, and the definition of "language lawyer".

Most programmers want a manual or reference when they're first
learning, and will turn to it when they get confused.  (Hey, 
I got a syntax error!  What's up?  Hey, this function just 
changed its signature!)  Then they'll see the full syntax.  

> No tutorials or existing code ... use this syntax yet, so newbies 
> are obviously not going to see it.

There will always be more newbies -- even a year after this
enters the language.

-jJ



More information about the Python-Dev mailing list