Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Parens do create a tuple Date: Mon, 11 Apr 2016 11:04:17 +1000 Lines: 27 Message-ID: References: <1460333911.3449208.574628345.4B46CD32@webmail.messagingengine.com> <85r3ed2ctn.fsf_-_@benfinney.id.au> <85inzp2c93.fsf@benfinney.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de v+VFv5QhxUW41oSnoIQzTQ4WozohZY2vUMgZ5aUJBJMg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'block.': 0.09; 'literal': 0.09; 'subject:create': 0.09; 'tuple.': 0.09; 'syntax': 0.13; '10:45': 0.16; '2016': 0.16; 'enough.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'one-element': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'singleton': 0.16; 'tuple,': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'saying': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'chris': 0.26; 'message-id:@mail.gmail.com': 0.27; 'correct': 0.28; 'creating': 0.30; "i'd": 0.31; 'up.': 0.32; 'usually': 0.33; 'except': 0.34; 'received:google.com': 0.35; 'but': 0.36; 'instead': 0.36; 'received:209.85': 0.36; 'cases': 0.36; 'subject:: ': 0.37; 'say': 0.37; 'received:209.85.213': 0.37; 'wanted': 0.37; 'received:209': 0.38; 'wrong': 0.38; 'enough': 0.39; 'rather': 0.39; 'where': 0.40; 'avoid': 0.61; 'chrisa': 0.84; 'to:none': 0.91; 'examine': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-transfer-encoding; bh=ufx5kT7miJ9T+l4xPo6YiHaBhXLJDKj62d0WwgNtMFU=; b=WDIVd5ll+lQoVF7oR/D+okZpymMO55THkHOf3rfMzh8Bb82LzdJ/u2YLnQCRuPam58 1AnT2pX9Yoe4dXkFjjFdPku3Sr/ZU2tNWo2VpxTYVXzeh50r1cVFwDbfs9PMuNnGbG86 MKWZ3vv6UbgrBTsP2dztBPtPE7QQ46dwwb8t7tMNJmaGeymyVQwK0SK92oS2Altu8d83 Pq0L5xgGn37JiIhbVkzJwMGce72D8APszylAcPJEAUDdNgAR2y5iFeum6no0QT9Nl5W1 Uos7CIWPG09ugIlDUtsujCIVo+ZC9TdajNgKqjCGiTXkaxdUSPRtGQZ9nOgAS2UOYWLR FRTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-transfer-encoding; bh=ufx5kT7miJ9T+l4xPo6YiHaBhXLJDKj62d0WwgNtMFU=; b=JxUTjO4eXsa2srAkL3raF7mICVIH4ArAcsDaTjb4OYi3JlZtWZqLQD7CoInodDBa93 ygfpZzrP7JFahl2IpU1+ZVDTTYatGPk6AQm0MWekecKB1S2ikPwujZISp4cNOc1c457+ QqN0EEGiGTD2bOtxoorbv423gehfKrl8x+MuMGkbpUaVQQI+MvNzQgrkspltoz+LSIIF /tcH8NcCx0fOgLhBpGROolEQb/WuFMik5tWd2jghr6AJG1S4wPQSMnL/fIkiaZhOZ955 kO1+TvUYXOnA+0JebFRbAIywKBi4UIVQsMBDOuqOyFb477CCN7oUhxyI/pqy8QhvuExR olqQ== X-Gm-Message-State: AD7BkJLinkftHVcVnD9zsYjd+OcvVznvkD+JHQzB3Vvb6SVKNGdlUL8zbsrIPj0ZOApaD/o0aNTovzRyMCmZ1Q== X-Received: by 10.51.17.34 with SMTP id gb2mr15362592igd.13.1460336657199; Sun, 10 Apr 2016 18:04:17 -0700 (PDT) In-Reply-To: <85inzp2c93.fsf@benfinney.id.au> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <1460333911.3449208.574628345.4B46CD32@webmail.messagingengine.com> <85r3ed2ctn.fsf_-_@benfinney.id.au> <85inzp2c93.fsf@benfinney.id.au> Xref: csiph.com comp.lang.python:106821 On Mon, Apr 11, 2016 at 10:57 AM, Ben Finney w= rote: > Chris Angelico writes: > >> On Mon, Apr 11, 2016 at 10:45 AM, Ben Finney wrote: >> > So the expanation that remains true when you examine it is: People >> > wanted a literal syntax to create a zero-length tuple. A pair of paren= s >> > is that literal syntax, and it's the parens that create the (empty) >> > tuple. >> >> But parens do NOT create a one-element tuple, and that's usually where >> people trip up. > > So let's stop saying =E2=80=9Cparens do not create a tuple=E2=80=9D, beca= use that's just > wantonly creating *another* stubling block. Fair enough. Let's instead say "commas create tuples", which is true in all cases except the singleton empty tuple. Is that near enough that we can avoid the detail? I'd rather be correct on the one-element case and wrong on the empty than the other way around. ChrisA