Path: csiph.com!goblin2!goblin.stu.neva.ru!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'attributes': 0.07; 'differently': 0.07; 'empty,': 0.09; 'length.': 0.09; 'objects)': 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; 'python': 0.10; 'python.': 0.11; 'language,': 0.11; 'talks': 0.11; 'namespace,': 0.16; 'objects).': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:reference': 0.16; 'subject:versus': 0.16; 'to]': 0.16; 'wrote:': 0.16; 'language': 0.19; 'aspect': 0.22; 'assumes': 0.22; 'interpret': 0.22; 'sep': 0.22; 'trying': 0.22; '(you': 0.23; 'elements': 0.23; 'represents': 0.23; 'implemented': 0.24; 'mon,': 0.24; 'module': 0.25; "i've": 0.25; 'header:User-Agent:1': 0.26; 'example': 0.26; 'header:X-Complaints-To:1': 0.26; '14,': 0.27; '[2]': 0.27; 'see,': 0.27; 'start,': 0.27; 'array': 0.29; 'objects': 0.29; 'code': 0.30; 'another': 0.32; "can't": 0.32; '[1]': 0.32; 'point': 0.33; 'problem': 0.33; 'message- id:@gmail.com': 0.34; 'except': 0.34; 'could': 0.35; 'exist': 0.35; 'step': 0.36; 'but': 0.36; 'should': 0.36; 'there': 0.36; '(and': 0.36; 'alone': 0.36; 'modules': 0.36; 'subject:" ': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'agree': 0.37; 'say': 0.37; 'received:org': 0.37; 'detail': 0.38; "won't": 0.38; 'version': 0.38; 'names': 0.38; 'wrong': 0.38; 'mean': 0.38; 'does': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'term': 0.60; 'your': 0.60; 'behavior': 0.61; 'provide': 0.61; 'here.': 0.62; 'more': 0.63; 'different': 0.63; 'box.': 0.66; 'fact,': 0.67; 'talking': 0.67; 'picture': 0.70; 'special': 0.73; 'received:89': 0.80; 'irrelevant': 0.84; 'predicts': 0.84; 'stop,': 0.84 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 20:45:22 +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> <87pp1l6h9a.fsf@gmail.com> <1442187517.2372486.382584889.2ED1B071@webmail.messagingengine.com> <874mix5a63.fsf@gmail.com> <1442243411.198925.383193481.6164EF4E@webmail.messagingengine.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:cinGLmKALRKqVr5CMlNQ3YBpQ4I= 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: 52 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442252812 news.xs4all.nl 23760 [2001:888:2000:d::a6]:35897 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96579 Random832 writes: > On Mon, Sep 14, 2015, at 10:48, Akira Li wrote: >> start, stop, step attributes (corresponding Python ints) may not exist >> ("the objects we've talking about have never been created") until you >> request them explicitly. > > That's not true in CPython. In fact, the range object in python contains > *four* reference boxes - one more for length. Even if it true in CPython. Specific implementations are irrelevant for the discussions. Python -- the language -- does not mandate any reference boxes (and given how you interpret the term "box" -- boxes are not used anywhere). >> I've mentioned it in another message but to be clear, I consider "parcel >> tags" [1] and "box and arrows" [2] (boxes are always empty, they only >> point to objects) models to be the same and different from "labelled >> box" [3] model (boxes contain objects). > > See, I consider the box and arrow to be the same as the labeled box > model - only the object the boxes contain is an arrow. Except for > special kinds of boxes implemented in some other language, such as the > elements of an array from the array module [box + arrow pointing to] + object == parcel tag + object I could draw a picture but it won't be pretty. "labelled box" model that assumes that objects are inside boxes is clearly wrong -- it fails if you have two names that refer to the same object in Python (you can't put the same object into different boxes). If a box contains nothing then there is no need for the box. If you think the box contains "something" then find me the corresponding term in Python language reference. I don't understand what is "arrow" that the box might contain exactly. For example I can find what "name", "object" mean in Python. > The problem with "parcel tags" is that it represents namespaces - or one > particular namespace, I've never seen any version of it that even > clearly talks about locals, let alone different modules - differently > from other kinds of objects. I don't understand what are you trying to say here. If you have a specific example when the "parcel tags" [1] model predicts a _wrong_ behavior; please do provide it. If your point is that "parcel tag" does not describe in full detail all aspect of the behavior of an arbitrary Python code then I agree with you (though none of the discussed models can or should do it).