[Python-checkins] python/dist/src/Python compile.c,2.317,2.318

bcannon at users.sourceforge.net bcannon at users.sourceforge.net
Sun Aug 15 09:21:27 CEST 2004


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31674/Python

Modified Files:
	compile.c 
Log Message:
Correct the order of application for decorators.  Meant to be bottom-up and not
top-down.  Now matches the PEP.


Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.317
retrieving revision 2.318
diff -C2 -d -r2.317 -r2.318
*** compile.c	15 Aug 2004 01:15:01 -0000	2.317
--- compile.c	15 Aug 2004 07:21:24 -0000	2.318
***************
*** 4133,4137 ****
  
  	ndecorators = 0;
! 	for (i = NCH(n) - 1; i >= 0; --i) {
  		node *ch = CHILD(n, i);
  		if (TYPE(ch) != NEWLINE) {
--- 4133,4140 ----
  
  	ndecorators = 0;
! 	/* the application order for decorators is the reverse of how they are
! 	   listed; bottom-up */
! 	nch -= 1;
! 	for (i = 0; i < nch; i+=1) {
  		node *ch = CHILD(n, i);
  		if (TYPE(ch) != NEWLINE) {



More information about the Python-checkins mailing list