Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ben Finney Newsgroups: comp.lang.python Subject: Re: one-element tuples Date: Mon, 11 Apr 2016 11:36:58 +1000 Lines: 50 Message-ID: References: <851t6d3s0k.fsf_-_@benfinney.id.au> <85bn5h2af9.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 j75PKzmcdBQ+G3mc0xW7ng/DnfHrn5Jsf7xyUy3X35IQ== Cancel-Lock: sha1:8s8jLQNIzHXpF7s7TCDfu9BWxmo= Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.049 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'happen?': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'explicitly': 0.15; "skip:' 30": 0.15; 'expect,': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'say,': 0.18; '>>>': 0.20; 'issue.': 0.20; 'saying': 0.22; 'examples': 0.24; 'header :User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'question': 0.27; 'specifically': 0.28; 'closer': 0.29; "i'm": 0.30; 'another': 0.32; 'is?': 0.33; 'surprised': 0.33; "skip:' 20": 0.34; 'but': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'two': 0.37; 'being': 0.37; 'received:org': 0.37; 'does': 0.39; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'above,': 0.63; 'different': 0.63; 'here': 0.66; 'life': 0.67; 'spend': 0.67; 'skip:\xe2 10': 0.70; 'surprise': 0.72; '_o__)': 0.84; 'received:125': 0.84; 'shocking': 0.84; '\xe2\x80\xa6': 0.84; 'why?': 0.91; 'responses': 0.93 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: <85bn5h2af9.fsf@benfinney.id.au> X-Mailman-Original-References: <851t6d3s0k.fsf_-_@benfinney.id.au> Xref: csiph.com comp.lang.python:106829 Fillmore writes: > On 04/10/2016 08:31 PM, Ben Finney wrote: > > Can you describe explicitly what that “discontinuation point” is? I'm > > not seeing it. > > Here you go: > > >>> a = '"string1"' > >>> b = '"string1","string2"' > >>> c = '"string1","string2","string3"' > >>> ea = eval(a) > >>> eb = eval(b) > >>> ec = eval(c) > >>> type(ea) > <--- HERE !!!! > >>> type(eb) > > >>> type(ec) > While I wait to find out what confuses you about the above, let me ask another question that might get closer to the issue. Would you find the following session confusing? Why? >>> a = "string1" >>> b = "string1", "string2" >>> c = "string1", "string2", "string3" >>> type(a) >>> type(b) >>> type(c) > and mind you, I am not saying that this is wrong. I'm just saying that > it surprised me. If the two examples give you different responses (one surprises you, the other does not), I would really like to know *what the surprise is*. What specifically did you expect, that did not happen? -- \ “I knew it was a shocking thing to say, but … no-one has the | `\ right to spend their life without being offended.” —Philip | _o__) Pullman, 2010-03-28 | Ben Finney