Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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; 'attribute': 0.07; 'element': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; '"some': 0.16; 'message-id:@4ax.com': 0.16; 'name)': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'selects': 0.16; 'skip:> 20': 0.16; 'unnamed': 0.16; 'component': 0.16; 'feb': 0.22; 'url:home': 0.24; 'purposes': 0.26; 'references': 0.26; 'header:X-Complaints-To:1': 0.27; 'subject:list': 0.30; 'anonymous': 0.31; "d'aprano": 0.31; 'object.': 0.31; 'steven': 0.31; 'charset:us-ascii': 0.36; 'list': 0.37; 'being': 0.38; 'to:addr:python-list': 0.38; 'list,': 0.38; 'itself': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'chain': 0.60; 'expression': 0.60; 'mentioned': 0.61; 'name': 0.63; 'qualified': 0.72; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Explanation of list reference Date: Sat, 15 Feb 2014 14:30:31 -0500 Organization: IISS Elusive Unicorn References: <13208de8-0f85-4e60-b059-dc087c8fda41@googlegroups.com> <52fefccc$0$29973$c3e8da3$5496439d@news.astraweb.com> <52ff0dc5$0$29973$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-79-222-63.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392492647 news.xs4all.nl 2951 [2001:888:2000:d::a6]:49014 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66477 On 15 Feb 2014 06:48:37 GMT, Steven D'Aprano declaimed the following: > >myobj.alist[12]["some key"].attribute > > >I think it is fair to call that both an expression and a reference. It's a chain of references to me... The name myobj is a reference to some object that has a component (attribute) named alist which is a reference to a list object. [12] selects an element of the list, said element being an anonymous (unnamed, unless you want to consider [12] to be the name) reference to an unnamed dictionary object. "some key" selects an element of the dictionary which is an anonymous reference to an object having an attribute named attribute which itself is a reference to some object -- for the purposes of this chain, the final mentioned object is considered the value of the fully qualified name. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/