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


Groups > comp.lang.python > #43739

Re: Atoms, Identifiers, and Primaries

Path csiph.com!usenet.pasdenom.info!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
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; 'python.': 0.02; 'example:': 0.03; '16,': 0.03; 'operator': 0.03; 'attribute': 0.07; 'atom': 0.09; 'defines': 0.09; 'identifier': 0.09; 'indicates': 0.09; 'name?': 0.09; 'operator,': 0.09; 'references,': 0.09; 'slices': 0.09; 'used.': 0.09; 'python': 0.11; '"a"': 0.16; 'expects': 0.16; 'identifiers': 0.16; 'operation.': 0.16; 'precedence': 0.16; 'precedence.': 0.16; 'wrote:': 0.18; 'thoughts': 0.19; 'import': 0.22; 'bruce': 0.22; 'questions:': 0.24; 'refers': 0.24; 'performing': 0.26; 'primary': 0.26; 'header:In-Reply-To:1': 0.27; 'appear': 0.29; "doesn't": 0.30; '2.3': 0.30; 'label': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'names.': 0.31; 'operations.': 0.31; 'question:': 0.31; 'yes.': 0.31; 'trouble': 0.34; "i'd": 0.34; 'received:209.85': 0.35; 'anywhere': 0.35; 'operations': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'leads': 0.36; 'example,': 0.37; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'anything': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'most': 0.60; 'simple': 0.61; 'more': 0.64; 'here': 0.66; 'surrounding': 0.68; 'online': 0.71; '"most': 0.84; '5.2.1': 0.84; 'mean.': 0.91; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=CuNRRUr0pEu9WCor8YTumljkotH4TwpgthtD3DYpfBY=; b=Tbmgy/q3F97gcN2Apr1QuwitOQZp2yl4gjby7VF8pP+FQ9VteXlNLb/2quTYnwHig2 LRiQCh2GCbp4jy32agwFITb7CY0z6aEimK3+ppc5GTS3qeY0AOkHlm/CMz58pdZCS+Fq HWU5Dv1hrcj/kwjB1PENDRg3i8MghrIFLQor1b9nhjq0YiYJco7Jyp4V/GeiZVTOHpci Pyv5CwSDPjqTSl4F537og81EMypjKKb4MVDbXWEKn7yK6axld7uhnUf1pwM14Ks4o9L8 uXMpJzDWL5KqathUfIi7xZs9HPisHi5qovuNoCGbVMyQEV+eD8RLwD0DLYlCkwOSjzSk 8VXA==
X-Received by 10.68.218.103 with SMTP id pf7mr7797294pbc.153.1366183301140; Wed, 17 Apr 2013 00:21:41 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <66e78281-542b-41b3-a56d-04bf736d1e0a@googlegroups.com>
References <66e78281-542b-41b3-a56d-04bf736d1e0a@googlegroups.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Wed, 17 Apr 2013 01:21:00 -0600
Subject Re: Atoms, Identifiers, and Primaries
To Python <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
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.709.1366183663.3114.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1366183663 news.xs4all.nl 2692 [2001:888:2000:d::a6]:42920
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:43739

Show key headers only | View raw


On Tue, Apr 16, 2013 at 8:57 PM, Bruce McGoveran
<bruce.mcgoveran@gmail.com> 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:
>
> 1.  Section 5.2.1 indicates that an identifier occurring as an atom is a name.  However, Section 2.3 indicates that identifiers are names.  My question:  can an identifier be anything other than a name?

Yes.  For example:

from a import b

Here "a" is an identifier but not a name, as it does not carry
object-binding semantics.

> 2.  Section 5.3 defines primaries as the most tightly bound operations of Python.  What does this mean?

"Tightly bound" here refers to operator precedence.  For example, we
say that the multiplication operator binds more tightly [to the
surrounding operands] than the arithmetic operator, because the
multiplication takes precedence.  This section defines that the most
tightly bound operations in Python are attribute references,
subscriptions, slices and calls; these always take precedence over
other neighboring operations.

> In particular, if an atom is a primary, what operation is the atom performing that leads to the label "most tightly bound"?

An atom doesn't perform an operation.  The grammar defines that a
primary can be just an atom, so that anywhere in the grammar that
expects a primary, a simple atom with no primary operation performed
on it can equally be used.

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