A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-January/132011.html below:

[Python-Dev] lambda (x, y):

[Python-Dev] lambda (x, y): [Python-Dev] lambda (x, y):Eric V. Smith eric at trueblade.com
Fri Jan 24 16:57:28 CET 2014
On 1/24/2014 10:50 AM, Ram Rachum wrote:
> I don't like how in Python 3.x, you can't do this:
> 
>     lambda (x, y): whatever
> 
> It's quite useful in Python 2
> 
> if I understand correctly, it's a side effect of such packed arguments
> not being allowed in function definitions. (i.e. def instead of lambda)

You can still do:
>>> fn = lambda x, y: x+y
>>> fn(20, 22)
42

It's just tuple unpacking which doesn't work.

> Can you please refer me to the original discussion in which it was
> decided to remove this grammar in Python 3? I'd like to understand the
> arguments for it. 

See PEP 3113.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4