Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.028 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'subject:Python': 0.05; 'repeated': 0.07; 'empty,': 0.09; 'cc:addr:python-list': 0.10; 'fetches': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'purchases.': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; '(the': 0.22; 'posted': 0.23; '2015': 0.23; 'replacing': 0.23; 'sat,': 0.23; "i've": 0.24; 'header:In-Reply-To:1': 0.24; 'question': 0.26; 'chris': 0.26; 'said,': 0.27; 'message-id:@mail.gmail.com': 0.28; 'piece': 0.29; 'referenced': 0.29; 'gets': 0.32; 'point': 0.33; 'subject:?': 0.34; 'received:google.com': 0.34; 'identity': 0.35; 'list:': 0.35; 'list': 0.35; "isn't": 0.35; 'there': 0.36; 'subject:: ': 0.37; 'placed': 0.37; 'pm,': 0.39; 'things': 0.39; 'expect': 0.39; 'some': 0.40; 'more': 0.62; 'dont': 0.64; 'week,': 0.64; 'paper': 0.78; 'hand': 0.82; 'chrisa': 0.84; 'shopping': 0.87; 'to:none': 0.90 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-type; bh=k8u1uOz/6hSuMXcSq8SFOReG8ESZro6nuTZHndCmv6c=; b=dF8XzMoYiIohMwTF93et+T9qHg+zyBMt4oTZpG8zeUOVGebeaReF5HIaMQP1EC1BGs cqiOurQjz23ybb9La68ojx/DFwKDrULSLpiD2FNNaMQXEZEGJGYeIHBEvaPKOIdnPIBf 6ZO9m0lCYoXIE87lCujnBHvbTtkD1m6vT0GuBYN6L6+cI2dcL2Cl+ycFcOoJSoM00X9T rqKHwQM8UvsJJwZO8QX+54KYDlkudhd2KeQo/qd2IcmkA3//XORo4WKvld2muoE2Gyty VYaCERpxEPT3tWOuHgJY6HG+qm5EC305TG1z4nJGW6qmEU5HJBga2wXaR4tQ3R+oWiSb qjcw== MIME-Version: 1.0 X-Received: by 10.43.0.67 with SMTP id nl3mr13679926icb.59.1433569417296; Fri, 05 Jun 2015 22:43:37 -0700 (PDT) In-Reply-To: References: <3bbe49da-e989-4a8c-a8a9-75d3a786f508@googlegroups.com> <557056f9$0$13009$c3e8da3$5496439d@news.astraweb.com> <5570ce43$0$12991$c3e8da3$5496439d@news.astraweb.com> <55710b69$0$12980$c3e8da3$5496439d@news.astraweb.com> <6c78b294-efd6-4096-a572-1841aa71a5eb@googlegroups.com> <557182af$0$13014$c3e8da3$5496439d@news.astraweb.com> <33a2f501-5587-4fd9-91fa-7094d4f6c512@googlegroups.com> <81cb1232-ecf8-4cf0-b29c-ecf2ca47ade0@googlegroups.com> Date: Sat, 6 Jun 2015 15:43:37 +1000 Subject: Re: Can Python function return multiple data? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433569420 news.xs4all.nl 2838 [2001:888:2000:d::a6]:38714 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:92173 On Sat, Jun 6, 2015 at 3:28 PM, Rustom Mody wrote: > You just repeated what Chris said, replacing 'immutable' with 'same' > There was a list: [1,2,3] > At some point that list is found to be(come) [1,2,3,4] > They dont look same to me. "I'm going shopping, can you get me the shopping list please?" *goes and fetches a piece of paper from the kitchen* "Wait, this isn't the right list! This one has more things on it!" The question of whether or not the thing fetched is indeed the shopping list is independent of the items on it. The list has an identity and it has a value (the items needed). If I hand you an empty list on the basis that the shopping list you placed there last week was empty, I've destroyed the value of the posted shopping list - people have added things to it during the week, and they expect those things to be on the list that gets referenced to make purchases. ChrisA