mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	Issue 25483: Add an opcode to make f-string formatting more robust.
This commit is contained in:
		
							parent
							
								
									2753a096e0
								
							
						
					
					
						commit
						a78c7954d5
					
				
					 8 changed files with 205 additions and 168 deletions
				
			
		| 
						 | 
				
			
			@ -223,12 +223,13 @@ def _write_atomic(path, data, mode=0o666):
 | 
			
		|||
#     Python 3.5b1  3330 (PEP 448: Additional Unpacking Generalizations)
 | 
			
		||||
#     Python 3.5b2  3340 (fix dictionary display evaluation order #11205)
 | 
			
		||||
#     Python 3.5b2  3350 (add GET_YIELD_FROM_ITER opcode #24400)
 | 
			
		||||
#     Python 3.6a0  3360 (add FORMAT_VALUE opcode #25483)
 | 
			
		||||
#
 | 
			
		||||
# MAGIC must change whenever the bytecode emitted by the compiler may no
 | 
			
		||||
# longer be understood by older implementations of the eval loop (usually
 | 
			
		||||
# due to the addition of new opcodes).
 | 
			
		||||
 | 
			
		||||
MAGIC_NUMBER = (3350).to_bytes(2, 'little') + b'\r\n'
 | 
			
		||||
MAGIC_NUMBER = (3360).to_bytes(2, 'little') + b'\r\n'
 | 
			
		||||
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little')  # For import.c
 | 
			
		||||
 | 
			
		||||
_PYCACHE = '__pycache__'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue