Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: one-element tuples [Was: Most probably a stupid question, but I still want to ask] Date: Mon, 11 Apr 2016 12:34:56 +1000 Lines: 15 Message-ID: References: <570AF0C6.7020007@mrabarnett.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de KL0mqbwvvi3kwfrsKochjgDqw3eSs3cmBipz1MpnQ5Lw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'mrab': 0.05; 'though:': 0.07; 'subject:question': 0.08; 'cc:addr:python-list': 0.09; 'spelling': 0.09; 'subject:still': 0.09; 'tuple': 0.09; 'exception': 0.13; 'subject: \n ': 0.15; '2016': 0.16; 'comma': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'literal.': 0.16; 'parentheses': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Was': 0.16; 'tuple,': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; "doesn't": 0.26; 'message-id:@mail.gmail.com': 0.27; 'dan': 0.29; 'subject: [': 0.29; 'received:google.com': 0.35; 'but': 0.36; 'there': 0.36; 'received:209.85': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'subject:-': 0.39; 'chrisa': 0.84; 'construct': 0.84; 'mandatory.': 0.84; 'to:none': 0.91; 'subject:want': 0.93 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; bh=NjmB04ZtQcORKZ47IOaiCMZbHFVhG7rWbbB7E5kQUT8=; b=N3k3obRuw4RRrfGDU9fH0G7OwEstWAMS+ZNBAhPVqvQUT3DNaxBdhO0gpq71vfxmMU wgzC1nkbaBfjxNFE2z0HOlL4L2sXGs04iM5JeuOLMO4qFiTKYARFt6FY+9bWk6oSuiU1 mkyUPAOJwjzEp0IihZWrPtDxN0J7+8NLD2o6V3Ht5qSnWV4E5nqywA8jTfWhSw21Trx9 dntC9WHJmj4mam+RqHlhzBwnbvv/GtU/QiLZnJcoS+D3IVkkUd4UpelghNniHkRQl0bI inDz6Ta7bsF3iStTihJtaQwh/g6F4pdciiYoSoNYw4iPGrH77SFKtmjDkvOlj0noedPq emsQ== 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; bh=NjmB04ZtQcORKZ47IOaiCMZbHFVhG7rWbbB7E5kQUT8=; b=fbYlKgEN0dmmZHTmg2o7KZt60SEd8CGBWR/aRY1C7DTgiYKylDhfoa+c2nidlikQlm 4NTdr0+LhiHSTRWcXl/rhVdCaBBM5qIGDfiZ31dse6YeOxVKd+G2nXhYDt90+hdQUqPx Uu0oZ6o1o57ZBWW0uNdcu8+yDYiLrBpztKpkhvi6XDPvbW93Sd+XFBcq/lzmbUoPkYTj dtAE7By7CygvuBSl3TeOiBKn7EoZcU1YIPQgwdXdbDAGCPHZCkQ9TLdeRCs7jITdA7c+ L20utExN1Yhw7haSOX8d8PS3DvRKBtGpkHrb0V7/uqwGYoC228q1ONai3UOMGgO9AjcM /igw== X-Gm-Message-State: AD7BkJK8h5tyY+QsIjb4kqbVnfvq03Chdik/DHF+G6IYXOLhlapu01qRz3az8M02KN9IjXA8cI0GoMnYPetJMg== X-Received: by 10.107.137.101 with SMTP id l98mr20545661iod.31.1460342096808; Sun, 10 Apr 2016 19:34:56 -0700 (PDT) In-Reply-To: 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: <570AF0C6.7020007@mrabarnett.plus.com> Xref: csiph.com comp.lang.python:106837 On Mon, Apr 11, 2016 at 12:22 PM, Dan Sommers wrote: > On Mon, 11 Apr 2016 01:33:10 +0100, MRAB wrote: > >> There _is_ one exception though: (). It's the empty tuple (a 0-element >> tuple). It doesn't have a comma and the parentheses are mandatory. >> There's no other way to write it. > > The other way to write it is: > > tuple() There are lots of ways to construct an empty tuple, but only one spelling for its literal. ChrisA