why syntax change in lambda

Neal Becker ndbecker2 at gmail.com
Wed Sep 11 09:03:49 EDT 2013


In py2.7 this was accepted, but not in py3.3.  Is this intentional?  It seems to 
violate the 'principle' that extraneous parentheses are usually allowed/ignored

In [1]: p = lambda x: x

In [2]: p = lambda (x): x
  File "<ipython-input-2-2b94675a98f1>", line 1
    p = lambda (x): x
               ^
SyntaxError: invalid syntax





More information about the Python-list mailing list