Dennis Lee Bieber <[EMAIL PROTECTED]> writes:

> On Sat, 04 Oct 2008 13:14:40 +0200, Peter Otten <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>> In 3.0 it has to be rewritten as
>> 
>> def f(ab):
>>     a, b = ab
>>     return a*b
>> 
>> i. e. it needs a statement and an expression and is therefore no
>> longer suitable for a lambda.
>>
>
>       Given that most lambda's are rather short, is it really that
> much of a pain to just use (for the above example) ab[0]*ab[1] without
> unpacking?

Well -- it is because the code used to be short and sweet that it feels
ugly to me to change

  lambda (a, b): a * b

into

  lambda ab: ab[0] * ab[1]

The first looks perfect -- it matches the math behind the code that I am
writing. The second does not look so nice.

From reading the PEP-3113 I got the impression that the author thought
that this feature was unused and didn't matter. With this I wish to say
that it matters to me.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.

Attachment: pgpd5Qp426xvo.pgp
Description: PGP signature

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to