Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!usenetcore.com!newsfeed.xs4all.nl!newsfeed7.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; 'model,': 0.05; 'that?': 0.05; 'works.': 0.07; 'url:pycon': 0.08; 'instance.': 0.09; 'objects.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'example:': 0.10; 'python': 0.10; '(note:': 0.16; '[4]:': 0.16; '[5]': 0.16; 'distinct': 0.16; 'i.e.,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:reference': 0.16; 'subject:versus': 0.16; 'url:display': 0.16; 'url:general': 0.16; 'url:gmane': 0.16; 'url:py': 0.16; 'url:thread': 0.16; 'wrote:': 0.16; '>>>': 0.20; '2015': 0.20; 'sep': 0.22; 'am,': 0.23; "python's": 0.23; 'references': 0.23; 'examples': 0.24; 'mon,': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'chris': 0.26; '14,': 0.27; '[2]': 0.27; 'object,': 0.27; 'correct': 0.28; "can't": 0.32; '[1]': 0.32; 'problem': 0.33; 'url:python': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'url:%4': 0.33; 'message-id:@gmail.com': 0.34; 'lists': 0.34; 'problem.': 0.35; 'there': 0.36; 'url:org': 0.36; 'subject:" ': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'being': 0.37; 'received:org': 0.37; 'why': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'url:3': 0.60; 'behavior': 0.61; 'caused': 0.61; 'show': 0.62; 'per': 0.62; 'is.': 0.63; 'different': 0.63; 'complete': 0.63; 'url:6': 0.66; 'url:js': 0.66; 'received:89': 0.80; 'url:2007': 0.84; 'url:a1': 0.84; 'url:false': 0.84; 'url:focus': 0.84; 'url:mode': 0.84; 'url:origin': 0.84; 'url:%0a': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Akira Li <4kir4.1i@gmail.com> Subject: Re: Terminology: "reference" versus "pointer" Date: Mon, 14 Sep 2015 05:26:11 +0300 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> <55f61e8c$0$1660$c3e8da3$5496439d@news.astraweb.com> <87h9mx6bhk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain X-Gmane-NNTP-Posting-Host: 89.169.229.68 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:CmEA3qvc4XT5XJMpTLqmcPf4b14= 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: 49 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442197672 news.xs4all.nl 23802 [2001:888:2000:d::a6]:60046 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96545 Chris Angelico writes: > On Mon, Sep 14, 2015 at 11:22 AM, Akira Li <4kir4.1i@gmail.com> wrote: >> Steven D'Aprano writes: >> >>> On Mon, 14 Sep 2015 09:17 am, Akira Li wrote: >>> >>>> I don't see why the model that can't describe range(1) in Python 3 >>>> pretends to be complete. >>> >>> >>> Please explain. >>> >>> range(1) returns a range instance. What is hard about that? >> >> Look at the last example: >> http://thread.gmane.org/gmane.comp.python.general/782626/focus=782704 > > Still not sure what the problem is. As per Python's object model, the > lists contain references to range objects. a contains two references > to the same range object, b contains references to each of two > distinct range objects. What of it? For me, there is no problem. "parcel tags" [1], "box and arrows"[2] are all the same (note: "labelled box"[3] that may contain an object is a different model). The talk about being "complete" is caused by the following quote from Random832 message [4]: If the "parcel tags" model can't show it, then the "parcel tag" model clearly is not a correct and complete depiction of how Python actually works. The purpose of the examples in [5] is to demonstate that neither models are "complete" i.e., there is (obviously) behavior of a Python program that they can't describe. [1] http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#python-has-names [2] http://www.pythontutor.com/visualize.html#code=a0+%3D+a1+%3D+%5B1,+2%5D%0Ab0+%3D+%5B1,+2%5D%0Ab1+%3D+%5B1,+2%5D%0Aa+%3D+%5Ba0,+a1%5D%0Ab+%3D+%5Bb0,+b1%5D%0Adel+a0,+a1,+b0,+b1%0A&mode=display&origin=opt-frontend.js&cumulative=false&heapPrimitives=false&textReferences=false&py=3&rawInputLstJSON=%5B%5D&curInstr=6 [3] http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#other-languages-have-variables [4] http://thread.gmane.org/gmane.comp.python.general/782626/focus=782645 [5] http://thread.gmane.org/gmane.comp.python.general/782626/focus=782704