decorator J4 - any objections?
Christos TZOTZIOY Georgiou
tzot at sil-tec.gr
Sat Aug 21 14:32:56 EDT 2004
On 20 Aug 2004 17:20:13 -0700, rumours say that Paul Rubin
<http://phr.cx@NOSPAM.invalid> might have written:
>Christos "TZOTZIOY" Georgiou <tzot at sil-tec.gr> writes:
>> Why type decorators as a dictionary if you are not going to produce a
>> dictionary? Cause if you produce a dictionary, the order of the
>> decorators is no longer guaranteed.
>
>Does that matter?
Try the following in 2.4a2:
>>> from test.test_decorators import memoize
>>> class A:
@memoize
@staticmethod
def add1(a,b):
return a+b
@staticmethod
@memoize
def add2(a,b):
return a+b
>>> A.add1(1,2)
>>> A.add2(1,2)
--
TZOTZIOY, I speak England very best,
"Tssss!" --Brad Pitt as Achilles in unprecedented Ancient Greek
More information about the Python-list
mailing list