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


Groups > comp.lang.python > #53961

why syntax change in lambda

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'syntax': 0.04; '[1]:': 0.09; '[2]:': 0.09; 'accepted,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'extraneous': 0.16; 'lambda': 0.16; 'parentheses': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'syntaxerror:': 0.16; 'seems': 0.21; 'header:User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'usually': 0.31; '"",': 0.31; 'file': 0.32; 'but': 0.35; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'invalid': 0.68; 'received:139': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Neal Becker <ndbecker2@gmail.com>
Subject why syntax change in lambda
Date Wed, 11 Sep 2013 09:03:49 -0400
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Gmane-NNTP-Posting-Host exa2-in-fw-01-epn.hns.com
User-Agent KNode/4.10.5
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.249.1378904645.5461.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1378904645 news.xs4all.nl 15951 [2001:888:2000:d::a6]:46371
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:53961

Show key headers only | 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