Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '*not*': 0.07; 'referring': 0.07; 'result,': 0.07; 'abstraction': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; '*you*': 0.16; 'address).': 0.16; 'bus.': 0.16; 'definition.': 0.16; 'finney': 0.16; 'forbid': 0.16; "object's": 0.16; 'python;': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'which,': 0.16; 'demonstrate': 0.16; 'library': 0.18; 'written': 0.21; 'memory': 0.22; 'saying': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; '(by': 0.24; 'example.': 0.24; 'define': 0.26; 'extension': 0.26; 'pass': 0.26; 'header:X-Complaints-To:1': 0.27; 'rest': 0.29; 'besides': 0.30; "i'm": 0.30; 'code': 0.31; 'lines': 0.31; 'fault': 0.31; 'implied': 0.31; 'please.': 0.31; 'writes:': 0.31; 'entirely': 0.33; 'could': 0.34; 'case,': 0.35; 'false': 0.36; 'received:com.au': 0.36; 'returning': 0.36; 'yours,': 0.36; 'should': 0.36; 'virtual': 0.37; 'level': 0.37; 'ben': 0.38; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'unable': 0.39; 'received:org': 0.40; 'how': 0.40; 'simply': 0.61; "you're": 0.61; "you've": 0.63; 'address': 0.63; 'show': 0.63; 'skip:\xe2 10': 0.65; 'talking': 0.65; 'revealed': 0.68; 'physical': 0.72; 'address,': 0.75; '8bit%:46': 0.78; 'break.': 0.84; 'received:125': 0.84; 'returns.': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: Reference Date: Thu, 06 Mar 2014 08:37:19 +1100 References: <53144e8d$0$2149$426a74cc@news.free.fr> <1d1dfa1b-b715-4d8f-9c12-f0d3dc1a22c9@googlegroups.com> <85ppm3httu.fsf@benfinney.id.au> <20140303155112.46e34ff8@bigbox.christie.dr> <87siqy7whs.fsf@elektro.pacujo.net> <53155c15$0$2923$c3e8da3$76491128@news.astraweb.com> <164d209c-ba5e-449f-bc25-c27ebfb1fc0f@googlegroups.com> <5316b0dc$0$2923$c3e8da3$76491128@news.astraweb.com> <53176cfe$0$29985$c3e8da3$5496439d@news.astraweb.com> <87mwh475bc.fsf@elektro.pacujo.net> <87bnxk73gb.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: vmx15867.hosting24.com.au X-Public-Key-ID: 0xBD41714B X-Public-Key-Fingerprint: 9CFE 12B0 791A 4267 887F 520C B7AC 2E51 BD41 714B X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-gpg.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:9J4aNtsTixHqne2MbZOvQ5MNPiE= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 39 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1394055453 news.xs4all.nl 2929 [2001:888:2000:d::a6]:54820 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:67885 Marko Rauhamaa writes: > Ben Finney : > > > A reference-compliant implementation can contradict your inference (by > > returning an object identity that is *not* the object's memory > > address). Any code you've written based on that false inference will > > break. > > > > The fault will be yours, for inferring an assertion that isn't implied > > by the definition. > > Show me a few lines of Python that demonstrate the error of the false > inference, please. It need not be Python; it could be an extension library to which you pass the ‘id(foo)’ result, on the false assumption that it must be a memory location. Besides which, it is *you* that declares this abstraction to be leaky. If you're unable to show how that's the case, I rest on the null hypothesis: your assertion is untrue. > When I talk about an object's memory address, I'm not referring to > what might be revealed by gdb, for example. That is, I'm not talking > about the process's virtual address space, nor am I talking about the > physical address on the address bus. I can simply define that the > object's memory address is whatever id() returns. Then this does not count as a leaky abstraction. All you're saying is that the ‘id(foo)’ result is a representation of the object identity, which is entirely at the level of the abstraction. Nothing is leaked. -- \ “God forbid that any book should be banned. The practice is as | `\ indefensible as infanticide.” —Dame Rebecca West | _o__) | Ben Finney