Path: csiph.com!news.swapon.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeder.erje.net!1.eu.feeder.erje.net!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'broken': 0.03; 'url:pipermail': 0.05; 'exits': 0.09; 'lst': 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; '*a*,': 0.16; 'example)': 0.16; 'example?': 0.16; 'i.e.,': 0.16; 'means.': 0.16; 'prefer.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:reference': 0.16; 'subject:versus': 0.16; 'two,': 0.16; 'url:general': 0.16; 'url:gmane': 0.16; 'url:thread': 0.16; 'wrote:': 0.16; 'case.': 0.18; 'example.': 0.18; 'skip:+ 40': 0.18; 'thanks.': 0.18; '>>>': 0.20; '2015': 0.20; 'ascii': 0.22; 'sep': 0.22; 'trying': 0.22; 'am,': 0.23; 'discussion': 0.24; 'mon,': 0.24; 'header:User-Agent:1': 0.26; 'example': 0.26; 'header:X-Complaints-To:1': 0.26; 'moved': 0.27; 'then.': 0.27; 'idea': 0.28; "i'm": 0.30; 'code': 0.30; 'another': 0.32; 'role': 0.32; 'point': 0.33; 'url:python': 0.33; "d'aprano": 0.33; 'hopefully': 0.33; 'steven': 0.33; "i'll": 0.33; 'message- id:@gmail.com': 0.34; 'add': 0.34; 'text': 0.35; 'but': 0.36; 'should': 0.36; 'url:org': 0.36; 'subject:" ': 0.36; 'to:addr :python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'client': 0.37; 'received:org': 0.37; 'difference': 0.38; "won't": 0.38; 'names': 0.38; 'mean': 0.38; 'enough': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'your': 0.60; 'behavior': 0.61; 'here.': 0.62; 'afraid': 0.67; 'superior': 0.67; 'day': 0.67; 'received:89': 0.80; 'browser.': 0.81; 'url:focus': 0.84; 'plays': 0.93 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:24:32 +0300 References: <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> <55f6333c$0$1636$c3e8da3$5496439d@news.astraweb.com> <55f6fcf7$0$1640$c3e8da3$5496439d@news.astraweb.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:QlF37WqSbnkGw7gw71T/wO/quVk= 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: 81 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442251570 news.xs4all.nl 23734 [2001:888:2000:d::a6]:57679 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96577 Steven D'Aprano writes: > On Mon, 14 Sep 2015 01:23 pm, Akira Li wrote: > >> Steven D'Aprano writes: >> >>> On Mon, 14 Sep 2015 11:22 am, Akira Li wrote: >>>> Look at the last example: >>>> http://thread.gmane.org/gmane.comp.python.general/782626/focus=782704 >>> >>> >>> I'm afraid that page is broken in my browser. Can you not summarise, or >>> link to the specific message? I may be able to use another browser in a >>> day or two, but hopefully the discussion will have moved on by then. >> >> https://mail.python.org/pipermail/python-list/2015-September/696631.html > > Thanks. You mean this example? > > lst = [range(1, 3) for _ in range(3)] > a = [lst[0], lst[0]] > b = [lst[1], lst[2]] > > > I don't see what's difficult about this example. Here's a simple ASCII > drawing: > > > lst --------> [ range-object-1 , range-object-2 , range-object-3 ] > > a ----------> [ range-object-1 , range-object-1 ] > > b ----------> [ range-object-2 , range-object-3 ] > I should have mentioned that lst plays the role of range-object-X in your diagram i.e., only *a*, *b* names actualy exits (I should add `del lst` to the example) -- as the original example requires. > Trying to draw an arrow diagram using text is not my idea of a good time, > but I'll give it a go. Requires a monospaced font and an email client that > won't reflow the text: > > +-----+------+ > | | | <--------------------------- a > +--|--+---|--+ > | | > | | > V | > +-----+ <-+ +----+ > |range| <---------------|- |<------------ lst > +-----+ +----+ > +-----------|- | > +-----+ | +----+ > +-> |range| <---+ +------|- | > | +-----+ | +----+ > | | > | +-----+ | > | |range| <--------+ > | +-----+ > | ^ > +-|-+ | > | | | > +---+ | > | -|----+ > +---+ > ^ > | > +------------------------------------------- b > > > Out of the two, I know which one I prefer. I don't know what it means. If you mean "box and arrows" is superior somehow then I don't see any difference from the "parcel tags" model here. My point is that neither models are detailed enough to describe meaningfully the behavior of Python code in the general case.