On 3/4/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> FWIW, I would like the feature to be kept. I've found it useful in that it
> documents the function signature more completely when dealing
> with arguments that are already pre-packed into tuples
I just noticed that this has a more noticeable effect on lambda, since
you don't have room for another statement to do the unpacking.
To sort a dictionary by value, you can currently write
sorted(dict.items(), key=lambda (key, value): value)
Without tuple unpacking, this idiom becomes
sorted(dict.items(), key=lambda item: item[1])
obscuring the fact that the item is a (key, value) pair.
-- ?!ng
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com