Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Stephen Hansen Newsgroups: comp.lang.python Subject: Re: one-element tuples [Was: Most probably a stupid question, but I still want to ask] Date: Sun, 10 Apr 2016 17:28:39 -0700 Lines: 24 Message-ID: References: <1460334519.3450964.574635185.2D79B8FC@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de rOjUHdpxKi5nlfc4UY2KPglfjDFwos0q0+nwZF8nd6aQ== Return-Path: 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; 'subject:question': 0.08; 'python:': 0.09; 'received:internal': 0.09; 'subject:still': 0.09; 'tuple': 0.09; 'index': 0.13; '--s': 0.16; 'indexerror:': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.44': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:66.111.4.27': 0.16; 'received:compute4.internal': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:out3-smtp.messagingengine.com': 0.16; 'received:psf.io': 0.16; 'subject:Was': 0.16; 'surprising': 0.16; 'wrote:': 0.16; 'language': 0.19; '>>>': 0.20; '"",': 0.22; 'tuples': 0.22; '(most': 0.24; 'header:In-Reply-To:1': 0.24; 'question': 0.27; 'turns': 0.27; 'subject: [': 0.29; 'you?': 0.30; 'point': 0.33; 'traceback': 0.33; 'file': 0.34; 'so,': 0.35; 'there': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'received:66': 0.38; 'why': 0.39; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'header:Message- Id:1': 0.61; 'managing': 0.66; 'subject:, \n ': 0.84; 'subject:want': 0.93 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=ixokai.io; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=c8JNO4stohH6nc41JXJnXZAZjDs=; b=YNu9tS EivBvPI94/CDaOptuJFl8nfwam+4skw55Ld7/lGDXs50jdlbyGk+0ytJGBRoDcnP tZ5kU+SnYi9GYc1AlLb3/2e3y5M8NM5Faj2KxLxjJgrtufve4astuni+IUeTw+Vq qSpVKgTHrlir5gsQgK4x5BNYMkHLmKk7L4FbU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=c8JNO4stohH6nc4 1JXJnXZAZjDs=; b=jwUYbNtaAy9knSa3jOUxBWUKQS06WFiS7/KYOwqosqTsIQj UoT0p2sixd6eycWAGLuY+2U35ObqMPArobojqYgW0lLYMFPBI9rXdeQBuT1gOLY9 owiUoGSs7lpls4wAFekghvlbjUV/olho/vcmzqpqnDy2UsRTanTq2Zu+ABzI= X-Sasl-Enc: UUmvCvXHo2ZbQaoO0D9csm45oC7+ZWbJI9PuAcYJsiBK 1460334519 X-Mailer: MessagingEngine.com Webmail Interface - ajax-eadf0bcf 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: <1460334519.3450964.574635185.2D79B8FC@webmail.messagingengine.com> X-Mailman-Original-References: Xref: csiph.com comp.lang.python:106809 On Sun, Apr 10, 2016, at 05:22 PM, Fillmore wrote: > Hold on a sec! it turns up that there is such thing as single-element > tuples in python: > > >>> c = ('hello',) > >>> c > ('hello',) > >>> c[0] > 'hello' > >>> c[1] > Traceback (most recent call last): > File "", line 1, in > IndexError: tuple index out of range > >>> > > So, my original question makes sense. Why was a discontinuation point > introduced by the language designer? What discontinuation point? You keep masterfully managing to *not explain what you're asking*. What is surprising to you? --S