Index: Python/compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.317 diff -u -r2.317 compile.c --- Python/compile.c 15 Aug 2004 01:15:01 -0000 2.317 +++ Python/compile.c 15 Aug 2004 06:35:13 -0000 @@ -4132,7 +4132,8 @@ REQ(CHILD(n, nch - 1), NEWLINE); ndecorators = 0; - for (i = NCH(n) - 1; i >= 0; --i) { + nch -= 1; + for (i = 0; i < nch; i+=1) { node *ch = CHILD(n, i); if (TYPE(ch) != NEWLINE) { com_decorator(c, ch); Index: Lib/test/test_decorators.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_decorators.py,v retrieving revision 1.3 diff -u -r1.3 test_decorators.py --- Lib/test/test_decorators.py 4 Aug 2004 02:36:18 -0000 1.3 +++ Lib/test/test_decorators.py 15 Aug 2004 06:35:13 -0000 @@ -129,7 +129,8 @@ # XXX: This doesn't work unless memoize is the last decorator - # see the comment in countcalls. counts = {} - @countcalls(counts) @memoize + @memoize + @countcalls(counts) def double(x): return x * 2 @@ -187,7 +188,8 @@ def test_order(self): class C(object): - @funcattrs(abc=1) @staticmethod + @staticmethod + @funcattrs(abc=1) def foo(): return 42 # This wouldn't work if staticmethod was called first self.assertEqual(C.foo(), 42)