Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ben Finney Newsgroups: comp.lang.python Subject: Re: Parens do create a tuple Date: Mon, 11 Apr 2016 10:57:28 +1000 Lines: 20 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: 8bit X-Trace: news.uni-berlin.de QMUbeYLg480eC3xCuA6fxwVFQjpDF26EsLDh2Psf0Izg== Cancel-Lock: sha1:NMBwAG6GJGgxeWOXVsKeN0wNLIU= Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'block.': 0.09; 'literal': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:create': 0.09; 'tuple.': 0.09; 'syntax': 0.13; '10:45': 0.16; '2016': 0.16; 'one-element': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'tuple,': 0.16; 'wrote:': 0.16; 'saying': 0.22; 'am,': 0.23; 'mon,': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'chris': 0.26; "i'm": 0.30; 'creating': 0.30; 'up.': 0.32; 'usually': 0.33; 'so,': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'wanted': 0.37; 'to:addr:python.org': 0.40; 'where': 0.40; '_o__)': 0.84; 'brain,': 0.84; 'received:125': 0.84; 'swimming': 0.84; 'examine': 0.95 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) 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: <85inzp2c93.fsf@benfinney.id.au> X-Mailman-Original-References: <1460333911.3449208.574628345.4B46CD32@webmail.messagingengine.com> <85r3ed2ctn.fsf_-_@benfinney.id.au> Xref: csiph.com comp.lang.python:106820 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 parens > > 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 “parens do not create a tuple”, because that's just wantonly creating *another* stubling block. -- \ “Pinky, are you pondering what I'm pondering?” “I think so, | `\ Brain, but don't you need a swimming pool to play Marco Polo?” | _o__) —_Pinky and The Brain_ | Ben Finney