C#3.0 and lambdas
Bill Mill
bill.mill at gmail.com
Mon Sep 19 15:40:44 EDT 2005
On 9/19/05, Diez B. Roggisch <deets at nospam.web.de> wrote:
> > meanwhile, over in python-dev land:
> >
> > "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."
>
> I am - I think that feature is sort of an orthogonality which should be
> preserved. No doubt its not one of the most important ones - but if I
> can write
>
> a, (b ,c) = 1, (2,3)
>
> I'd like to write
>
> def foo(a, (b,c)):
> ...
>
> foo(1, (2,3))
>
Agreed. I discovered them when I wondered "wouldn't it be neat if
functions unpacked tuples just like regular code does?" And was
pleasantly surprised to find that they did.
+1 on keeping them.
Peace
Bill Mill
bill.mill at gmail.com
More information about the Python-list
mailing list