PEP 318 decorators are not Decorators

Colin J. Williams cjw at sympatico.ca
Mon Aug 16 10:24:50 EDT 2004



Arien Malec wrote:
> Skip Montanaro <skip at pobox.com> wrote in
> news:mailman.1662.1092523102.5135.python-list at python.org: 
> 
> 
>>    Arien> 3) Won't most programmers think GoF decorators before
>>    Arien> compiler syntax tree decorators?
>>
>>    Skip> Not if they are unfamiliar with the GoF patterns (myself
>>    included). 
>>
>>    Arien> Google: [~62,000 : ~130 mentions of each sort of decorator]
>>
>>    ...
>>
>>BFD.... The thing is, just because in a verbal Rohrschach
>>test you think "GoF" when someone says "decorator" doesn't mean
>>everybody else will (or should).
> 
> 
> Clearly, Python can choose any name for the auto-function-transformation 
> syntax in question, but it's rather willfully confusing to choose a name 
> that's heavily identified with a profoundly different semantics that's 
> superficially similar in intent.
> 
> Arien
This is especially confusing as, in everyday english usage, to decorate
is not the same as to transform.

Perhaps "transform" could be consdered as an alternative.

The Mad Hatter's response to Alice dealt with the root naming issue:
   "When I use a word," Humpty Dumpty said in rather a scornful tone. "It
    means just what I choose it to mean - neither more or less."

   "The question is," said Alice, "whether you can make words mean so
     many different things."
   "The question is," said Humpty Dumpty, "which is to be master - that's
    all."

Colin W.




More information about the Python-list mailing list