Kay Schluehr wrote:
Hi all,

thanks for Your attention !

I think my proposal was more in mind of Rons modified exec than
Pythons lambda.

When George proposed his unpacking behavoir for list-comps as a pack of
suggar:

1. [x*y-z for (x,y,z=0) in (1,2,3), (4,5), (6,7,8)]

I interpreted it in a subsequent posting in lambda fashion:

2. [(lambda x,y,z=0:x*y-z)(*v) for v in (1,2,3), (4,5), (6,7,8)]

Argh! Stupid me ! I never thought of using the star operator for this :( Thanks Kay.

(snip)

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to