[Python-Dev] Re: method decorators (PEP 318)

Jewett, Jim J jim.jewett at eds.com
Mon Mar 29 10:18:40 EST 2004


Paul Moore 

> If the importance of the metadata use case is sufficient to justify
> new syntax, then it is regardless of the existence of decorators. If
> it isn't, then I can't see how the existence of decorators could make
> it more important to have syntax for setting attributes.

When scanning a library, there is an important difference between 
"information about X" and "this changes how you call X".

Information -- even something as important as deprecated -- should
not accidentally hide changes to the signature.

If we make wrappers easy, they will be used.  If we make annotations
and transformations use the same syntax, then transformations will be 
lost in the crowd.  

If we encourage different syntax right from the start ("this just adds
something to the object; that might change the object's type entirely"),
then people will not get into so many bad habits.

-jJ




More information about the Python-Dev mailing list