[Python-checkins] python/dist/src/Lib codeop.py,1.6,1.7

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Thu, 15 May 2003 18:24:32 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv451

Modified Files:
	codeop.py 
Log Message:
Don't replace an empty line with "pass" when symbol == "eval", where
"pass" isn't valid syntax.  Reported by Samuele Pedroni on python-dev
(May 12, 2003).


Index: codeop.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/codeop.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** codeop.py	13 Feb 2003 22:07:54 -0000	1.6
--- codeop.py	16 May 2003 01:24:30 -0000	1.7
***************
*** 73,77 ****
              break               # Leave it alone
      else:
!         source = "pass"         # Replace it with a 'pass' statement
  
      err = err1 = err2 = None
--- 73,78 ----
              break               # Leave it alone
      else:
!         if symbol != "eval":
!             source = "pass"     # Replace it with a 'pass' statement
  
      err = err1 = err2 = None