mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	warn about parameter tuple unpacking
This commit is contained in:
		
							parent
							
								
									d5efd20406
								
							
						
					
					
						commit
						f4fcdb6b8c
					
				
					 2 changed files with 9 additions and 0 deletions
				
			
		|  | @ -701,6 +701,9 @@ ast_for_arguments(struct compiling *c, const node *n) | |||
|                     /* def foo((x)): is not complex, special case. */ | ||||
|                     if (NCH(ch) != 1) { | ||||
|                         /* We have complex arguments, setup for unpacking. */ | ||||
|                         if (Py_Py3kWarningFlag && !ast_warn(c, ch, | ||||
|                             "tuple parameter unpacking has been removed in 3.x")) | ||||
|                             goto error; | ||||
|                         asdl_seq_SET(args, k++, compiler_complex_args(c, ch)); | ||||
|                         if (!asdl_seq_GET(args, k-1)) | ||||
|                                 goto error; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Benjamin Peterson
						Benjamin Peterson