mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
	
		
			340 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
	
		
			340 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from test_support import verbose, TestFailed
 | |
| 
 | |
| if verbose:
 | |
|     print 'Running test on duplicate arguments'
 | |
| 
 | |
| try:
 | |
|     exec('def f(a, a): pass')
 | |
|     raise TestFailed, "duplicate arguments"
 | |
| except SyntaxError:
 | |
|     pass
 | |
| 
 | |
| try:
 | |
|     exec('def f(a = 0, a = 1): pass')
 | |
|     raise TestFailed, "duplicate keyword arguments"
 | |
| except SyntaxError:
 | |
|     pass
 | 
