[Python-Dev] Re: method decorators (PEP 318) (original) (raw)
Jewett, Jim J jim.jewett at eds.com
Mon Mar 29 10🔞40 EST 2004
- Previous message: [Python-Dev] Re: [Python-checkins] python/dist/src/Python compile.c, 2.299, 2.300
- Next message: [Python-Dev] Yet Another Decorator Syntax Suggestion (YADSS)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] Re: [Python-checkins] python/dist/src/Python compile.c, 2.299, 2.300
- Next message: [Python-Dev] Yet Another Decorator Syntax Suggestion (YADSS)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]