PEP 318 decorators are not Decorators
Grant Edwards
grante at visi.com
Fri Aug 13 12:56:20 EDT 2004
On 2004-08-13, Arien Malec <arien_malec at yahoo.com.REMOVE> wrote:
>>> decorator. One of the issues is that the Decorator pattern is more
>>
>> The term decorator as used in the current discussion comes
>> from compiler writing. You have a syntax 'tree' which gets
>> 'decorated' with additional attributes.
>
> 1) That's not mentioned in PEP 318
> 2) That's in disagreement with http://www.python.org/moin/PythonDecorators
> 3) Won't most programmers think GoF decorators before compiler syntax tree
> decorators?
Thank you! I spent a while reading up on "decorators" the
other day and was completely baffled. I couldn't see that the
stuff in PEP 318 discussion threads had anything at all to do
with what was discussed by the references I found on
"decorators" (which were all about "design pattern" stuff).
So, I gave up and went back to work on writing a strip-chart
recorder using the Gnuplot module.
--
Grant Edwards grante Yow! I'm shaving!! I'M
at SHAVING!!
visi.com
More information about the Python-list
mailing list