Path: csiph.com!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail 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; 'compiler': 0.05; 'so?': 0.07; 'cc:addr:python-list': 0.09; 'dict': 0.09; 'immutable': 0.09; 'objects.': 0.09; 'tuple': 0.09; 'python': 0.10; 'python.': 0.11; 'ah,': 0.16; 'at.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'gotcha.': 0.16; 'here).': 0.16; 'subject:reference': 0.16; 'subject:versus': 0.16; 'wrote:': 0.16; 'obviously': 0.16; 'string': 0.17; 'else,': 0.18; 'language': 0.19; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'otherwise,': 0.20; 'do.': 0.22; "aren't": 0.22; 'context.': 0.22; 'sep': 0.22; 'pass': 0.22; 'am,': 0.23; 'bit': 0.23; 'tried': 0.24; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'sense': 0.26; 'message-id:@mail.gmail.com': 0.27; '14,': 0.27; 'values': 0.28; 'fine': 0.28; 'objects': 0.29; 'there.': 0.30; 'anywhere': 0.30; "can't": 0.32; 'url:python': 0.33; 'accessible': 0.33; 'case,': 0.34; 'changing': 0.34; 'lists': 0.34; 'list': 0.34; 'received:google.com': 0.35; 'exist': 0.35; 'but': 0.36; 'url:org': 0.36; 'subject:" ': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'agree': 0.37; 'difference': 0.38; 'end': 0.39; 'means': 0.39; "didn't": 0.39; 'where': 0.40; 'some': 0.40; 'term': 0.60; 'url:3': 0.60; 'more': 0.63; 'places': 0.64; 'sharing': 0.64; "they're": 0.66; 'talking': 0.67; '*does': 0.84; 'chrisa': 0.84; 'claim.': 0.84; 'absolutely': 0.88; 'to:none': 0.91; 'url:reference': 0.91 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=8q4IkzUfd6cUgXkAcd4vqC75QWkJdBbBFF5yu1vLH8w=; b=h1x7M9yLYnQIBwq9UIZrZ+UtZDWSdXrlkCNolXNd94ksjYJMlqhafYh0KKHwJucFER U03VRrtFCBPO2G4B5vHlZLwETUrIDqGneBPi9PX1YxWb3H0/GWZEU2gQkRnB11k+tzbt XjWEyrCqOS3bKrts9mcEKZbdunXWUOJes879p9o0yrt72qnEpeaX7n4sYQA5UL8puqtg IzqbT48+HKzOMkQX3SwtfehODUy6sDtkipoXByv6Qvkwjwb5hgKoajQn0o48JJdcsp6c wBIDfIfidTV51yUcuViH2X9YzoyfiFbRxsbsTfn/CRGTgLL75iPL5vt2pUiPNBH371TE KFqg== MIME-Version: 1.0 X-Received: by 10.50.21.10 with SMTP id r10mr14395781ige.94.1442192319874; Sun, 13 Sep 2015 17:58:39 -0700 (PDT) In-Reply-To: <87lhc96dw2.fsf@gmail.com> References: <85mvws6z45.fsf_-_@benfinney.id.au> <85io7g6xy4.fsf@benfinney.id.au> <85egi46wng.fsf@benfinney.id.au> <1a1a1f6a-27ce-4c1b-807a-43eabaa04abb@googlegroups.com> <04ca9d7c-d02b-4329-bd94-4d18d86b3edf@googlegroups.com> <87egi375wb.fsf@gmail.com> <87wpvu5h7f.fsf@gmail.com> <87pp1l6h9a.fsf@gmail.com> <87lhc96dw2.fsf@gmail.com> Date: Mon, 14 Sep 2015 10:58:39 +1000 Subject: Re: Terminology: "reference" versus "pointer" 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442192329 news.xs4all.nl 23814 [2001:888:2000:d::a6]:38589 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 5932 X-Received-Body-CRC: 3094257894 Xref: csiph.com comp.lang.python:96539 On Mon, Sep 14, 2015 at 10:30 AM, Akira Li <4kir4.1i@gmail.com> wrote: > "Naming and binding" is the title from the Python language reference > https://docs.python.org/3/reference/executionmodel.html#naming-and-binding > > Otherwise, I agree with you ("name" is better here). Ah, gotcha. That's talking in much broader scope, so "naming" makes a bit more sense there. In any case, I can't think of a better term for it in the full context. >> Until the moment when dependencies[dep] is requested for some new >> value of dep, the list *does not exist*. It is constructed anew. >> Obviously the end result of this is a dict of lists, and since those >> lists aren't accessible from anywhere else, it makes fine sense to >> talk about those lists as being "contained within" the (default)dict; >> but they clearly didn't exist until they were poked at. They're >> Heisenburg's Lists, I guess... > > lists are _mutable_ in Python. So? Objects are objects. Some of them have no means of changing their values, while others do. But the Python object model is absolutely the same for all of them; it's not "pass by value for immutables, pass by reference for mutables" as some have tried to claim. Immutable objects have values and identities; the only difference is that the compiler is allowed to constant-fold, using the same string "hello" in each of the three places where such a string comes up, or sharing the tuple (1,2,None) across usages. ChrisA