Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #53961

why syntax change in lambda

From Neal Becker <ndbecker2@gmail.com>
Subject why syntax change in lambda
Date 2013-09-11 09:03 -0400
Newsgroups comp.lang.python
Message-ID <mailman.249.1378904645.5461.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

why syntax change in lambda Neal Becker <ndbecker2@gmail.com> - 2013-09-11 09:03 -0400
  Re: why syntax change in lambda Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-12 00:09 +0000

csiph-web