C#3.0 and lambdas
Paul Rubin
http
Mon Sep 19 10:14:55 EDT 2005
"Fredrik Lundh" <fredrik at pythonware.com> writes:
> "Is anyone truly attached to nested tuple function parameters; 'def
> fxn((a,b)): print a,b'? /.../
>
> Would anyone really throw a huge fit if they went away? I am willing
> to write a PEP for their removal in 2.6 with a deprecation in 2.5 if
> people are up for it."
It's not just function parameters, it works in assignments too:
s = ((1,2), (3,4))
...
((x1,y1), (x2,y2)) = s
Why is there such eagerness to remove it?
The corresponding feature in Lisp is called destructuring-bind and
it's quite useful.
More information about the Python-list
mailing list