[Python-Dev] Decorator order implemented backwards? (original) (raw)
Anthony Baxter anthony at interlink.com.au
Tue Aug 10 07:08:20 CEST 2004
- Previous message: [Python-Dev] Decorator order implemented backwards?
- Next message: [Python-Dev] Decorator order implemented backwards?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Anthony Baxter wrote:
James Y Knight wrote:
I haven't seen anyone remark upon this yet, but the order of decorator application appears to be implemented backwards.
def testorder(self): class C(object): @funcattrs(abc=1) @staticmethod def foo(): return 42 # This wouldn't work if staticmethod was called first self.assertEqual(C.foo(), 42) self.assertEqual(C().foo(), 42) How odd. I'm positive at one point I tested this and it was the right way round.
Mark, is it possible that this changed between the first and final versions of the decorator patch? The SF report doesn't list any of the older versions...
Thanks, Anthony
- Previous message: [Python-Dev] Decorator order implemented backwards?
- Next message: [Python-Dev] Decorator order implemented backwards?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]