mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	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).
This commit is contained in:
		
							parent
							
								
									11659ade1e
								
							
						
					
					
						commit
						993bc3a708
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -72,6 +72,7 @@ def _maybe_compile(compiler, source, filename, symbol): | ||||||
|         if line and line[0] != '#': |         if line and line[0] != '#': | ||||||
|             break               # Leave it alone |             break               # Leave it alone | ||||||
|     else: |     else: | ||||||
|  |         if symbol != "eval": | ||||||
|             source = "pass"     # Replace it with a 'pass' statement |             source = "pass"     # Replace it with a 'pass' statement | ||||||
| 
 | 
 | ||||||
|     err = err1 = err2 = None |     err = err1 = err2 = None | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum