Path: csiph.com!goblin2!goblin.stu.neva.ru!newsfeed1.swip.net!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; '*not*': 0.07; '*is*': 0.09; 'changed;': 0.09; 'implies': 0.09; 'pointers': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; '\xe2\x80\x94': 0.09; 'python': 0.10; 'language,': 0.11; 'value.': 0.15; '(there': 0.16; 'created.': 0.16; 'describing': 0.16; 'distinct': 0.16; 'illusion': 0.16; 'mean,': 0.16; 'python),': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:versus': 0.16; 'with?': 0.16; 'pointer': 0.18; 'refers': 0.18; 'variable': 0.18; 'assign': 0.22; 'c++,': 0.22; 'references': 0.23; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'switch': 0.27; 'values': 0.28; 'references.': 0.29; 'return;': 0.29; 'sure,': 0.29; 'program,': 0.29; 'that.': 0.30; 'normally': 0.30; 'another': 0.32; "can't": 0.32; 'accessible': 0.33; 'clarify': 0.33; 'reference,': 0.33; 'running': 0.34; "isn't": 0.35; 'but': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'difference': 0.38; 'progress': 0.38; 'does': 0.39; 'to:addr:python.org': 0.40; 'skip:u 10': 0.61; 'different': 0.63; 'great': 0.63; 'fundamental': 0.66; "they're": 0.66; 'direct': 0.68; 'skip:\xe2 10': 0.70; 'subjectcharset:utf-8': 0.71; '8bit%:46': 0.76; '_o__)': 0.84; 'received:125': 0.84; 'subject::': 0.85 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: Terminology: =?utf-8?B?4oCccmVmZXJlbmNl4oCd?= versus =?utf-8?B?4oCccG9pbnRlcuKAnQ==?= Date: Sat, 12 Sep 2015 14:52:51 +1000 References: <14afe27e-0bd5-410f-8e64-0f31d496ebf2@googlegroups.com> <55F36B4C.9020007@gmail.com> <1442016698.95299.381478313.2487CA0E@webmail.messagingengine.com> <85mvws6z45.fsf_-_@benfinney.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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) Cancel-Lock: sha1:YyGKycNKH8Dc6cali9cATHterio= 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: 44 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442033578 news.xs4all.nl 23782 [2001:888:2000:d::a6]:52769 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96399 Random832 writes: > Ben Finney writes: > > With the significant difference that “pointer” implies that it has its > > own value accessible directly by the running program, such as a pointer > > in C. > > Its own value *is* what you're accessing when you assign or return it. You're not describing Python references. But I don't know what you are describing with all those “it”s — what language, what behaviour, what concept? Can you clarify what you mean, and what in my description you are disagreeing with? > > That's different from a “reference”, which to my understanding > > implies the running program does *not* normally have direct access > > to it as a distinct value. The only way you can use a reference is > > to get at the object to which it refers. > > In C++, references cannot be reassigned. I consider *that* the > fundamental difference - a pointer is a variable that you can reassign > and return; a reference always refers to the same object once created. Sure, that will work fine. So in Python, we don't have pointers because we don't have access to change or reassign them. A Python reference isn't accessible and can't be changed; you can just make another reference and switch to that. You can't, for example, keep the old reference (there are no references to references in Python), because they're not accessible as values in themselves. Once you assign a different reference, the old one is gone and can't be found again. -- \ “[T]he great menace to progress is not ignorance but the | `\ illusion of knowledge.” —Daniel J. Boorstin, historian, | _o__) 1914–2004 | Ben Finney