mirror of
				https://github.com/pocketpy/pocketpy
				synced 2025-10-30 16:30:16 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
		
			169 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			169 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import traceback
 | |
| 
 | |
| try:
 | |
|     a = {'123': 4}
 | |
|     b = a[6]
 | |
| except KeyError:
 | |
|     s = traceback.format_exc()
 | |
| 
 | |
| assert s == r'''Traceback (most recent call last):
 | |
| KeyError: 6''' |