Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43754

Re: Atoms, Identifiers, and Primaries

Path csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <davea@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.027
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; '(so': 0.07; 'explicit': 0.07; 'definition,': 0.09; 'identifier': 0.09; 'python': 0.11; '"."': 0.16; '::=': 0.16; 'attributeref': 0.16; 'expression.': 0.16; 'limit.': 0.16; 'normally,': 0.16; 'object),': 0.16; 'slicing,': 0.16; 'struck': 0.16; 'wrote:': 0.18; 'thoughts': 0.19; 'bruce': 0.22; 'header:User-Agent:1': 0.23; 'questions:': 0.24; 'primary': 0.26; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'appear': 0.29; 'correct': 0.29; "doesn't": 0.30; "i'm": 0.30; 'that.': 0.31; 'another': 0.32; 'trouble': 0.34; "i'd": 0.34; 'beyond': 0.35; 'definition': 0.35; 'but': 0.35; 'method': 0.36; 'wrong': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'little': 0.38; 'to:addr:python.org': 0.39; 'called': 0.40; 'skip:u 10': 0.60; 'course': 0.61; 'first': 0.61; 'happen': 0.63; 'side': 0.67; 'received:74.208': 0.68; 'online': 0.71; 'hand': 0.80; '5.3.1': 0.84; 'received:74.208.4.194': 0.84; 'dozen': 0.91; 'mean.': 0.91
Date Wed, 17 Apr 2013 07:07:45 -0400
From Dave Angel <davea@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4
MIME-Version 1.0
To python-list@python.org
Subject Re: Atoms, Identifiers, and Primaries
References <66e78281-542b-41b3-a56d-04bf736d1e0a@googlegroups.com>
In-Reply-To <66e78281-542b-41b3-a56d-04bf736d1e0a@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:9miytMGmlj3i6WNbZRBPT69nEZ87etLfMFA4sKBkRiF qbvBtX4kW63eUEAmvzyodruFrsgH61uEdBWKvy655Apbjq5SJQ OjRhC+56rTPHFdX1f6kqayCLMAqfm9j3YK+p2/DHb++YFUCob3 NTrMloTTuqhV3dzWSBn3ObAi8+ig8jfljTU8PoEnTPJ/hF55y0 W01NRpU8+335b0Jr05AyJFsHMsX/S+SXhqVTxR6Q8OKnOr6p9H LrQPYQ2jsoo4PYQOwQJtN51aFju8kPqM6+EEtjk9VMJXbIPHa4 c1OaQbu/duXEjRisn/HsdIsxfaXRL+eMn2rZqU+R6ycDrZ/OQ= =
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.720.1366196886.3114.python-list@python.org> (permalink)
Lines 28
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1366196887 news.xs4all.nl 2683 [2001:888:2000:d::a6]:48200
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:43754

Show key headers only | View raw


On 04/16/2013 10:57 PM, Bruce McGoveran wrote:
> These are terms that appear in section 5 (Expressions) of the Python online documentation.  I'm having some trouble understanding what, precisely, these terms mean.  I'd appreciate the forum's thoughts on these questions:
>
>
> 3.  Section 5.3.1 offers this definition of an attributeref:
>      attributeref ::= primary "." identifier
>
> Now, I was at first a little concerned to see the non-terminal primary on the right hand side of the definition, since primary is defined to include attributeref in section 5.3 (so this struck me as circular).  Am I correct in thinking attributeref is defined this way to allow for situations in which the primary, whether an atom, attributeref (example:  an object on which a method is called that returns another object), subscription, slicing, or call, returns an object with property identifier?
>

It is circular.  Nothing wrong with that.  It means that not only can 
you use
     a.b

but also
     a.b.c

and
     a.b.c.d.e.f.g

without any explicit limit.  if a non-circular definition were to be 
attempted, you might need a few dozen rules, just to cover what someone 
*might* happen to use in an expression.  Of course normally, one doesn't 
go much beyond a.b.c in a single expression.


-- 
DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Atoms, Identifiers, and Primaries Bruce McGoveran <bruce.mcgoveran@gmail.com> - 2013-04-16 19:57 -0700
  Re: Atoms, Identifiers, and Primaries rusi <rustompmody@gmail.com> - 2013-04-16 20:55 -0700
    Re: Atoms, Identifiers, and Primaries Mark Janssen <dreamingforward@gmail.com> - 2013-04-17 16:40 -0700
      Re: Atoms, Identifiers, and Primaries alex23 <wuwei23@gmail.com> - 2013-04-17 17:29 -0700
        Re: Atoms, Identifiers, and Primaries Mark Janssen <dreamingforward@gmail.com> - 2013-04-17 17:41 -0700
        Re: Atoms, Identifiers, and Primaries Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-04-18 02:04 +0100
      Re: Atoms, Identifiers, and Primaries rusi <rustompmody@gmail.com> - 2013-04-18 00:40 -0700
    Re: Atoms, Identifiers, and Primaries Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-17 18:33 -0600
      Re: Atoms, Identifiers, and Primaries Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-18 02:14 +0000
        Re: Atoms, Identifiers, and Primaries Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-17 21:12 -0600
    Re: Atoms, Identifiers, and Primaries Mark Janssen <dreamingforward@gmail.com> - 2013-04-17 18:04 -0700
    Re: Atoms, Identifiers, and Primaries Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-04-18 02:08 +0100
    Re: Atoms, Identifiers, and Primaries Chris Angelico <rosuav@gmail.com> - 2013-04-18 11:56 +1000
    Re: Atoms, Identifiers, and Primaries Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-17 21:10 -0600
  Re: Atoms, Identifiers, and Primaries Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-17 01:21 -0600
    Re: Atoms, Identifiers, and Primaries 88888 Dihedral <dihedral88888@googlemail.com> - 2013-04-17 21:29 -0700
    Re: Atoms, Identifiers, and Primaries 88888 Dihedral <dihedral88888@googlemail.com> - 2013-04-17 21:29 -0700
  Re: Atoms, Identifiers, and Primaries Dave Angel <davea@davea.name> - 2013-04-17 07:07 -0400
  Re: Atoms, Identifiers, and Primaries Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-17 11:43 +0000
  Re: Atoms, Identifiers, and Primaries Bruce McGoveran <bruce.mcgoveran@gmail.com> - 2013-04-17 10:15 -0700
    Re: Atoms, Identifiers, and Primaries Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-18 04:43 +1000
      Re: Atoms, Identifiers, and Primaries rusi <rustompmody@gmail.com> - 2013-04-18 10:04 -0700

csiph-web