[Python-Dev] PEP 343 - next steps

tanzer@swing.co.at tanzer at swing.co.at
Sat Jun 11 16:15:16 CEST 2005


"Andrew Koenig" <ark-mlist at att.net> wrote:

> Of course, this usage shows that the syntax is unnecessary in this context,
> but what I care about is
> 
> 	def f(x as (a, b)):
> 		# ...
> 
> which has the advantage over the alternative
> 
> 	def f(x):
> 		(a, b) = x
> 		# ...
> 
> that if you call f with the wrong arguments, you get a clearer diagnostic
> message.

Thanks to the time machine, you can already do this:

 	def f((a, b)):
		# ...

-- 
Christian Tanzer                                    http://www.c-tanzer.at/



More information about the Python-Dev mailing list