Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.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.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; 'immutable': 0.09; 'indicates': 0.09; 'name?': 0.09; 'operator,': 0.09; 'referenced': 0.09; 'references,': 0.09; 'slices': 0.09; 'to:addr:comp.lang.python': 0.09; 'used.': 0.09; 'cc:addr:python- list': 0.11; '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; 'cc:addr:python.org': 0.22; 'header:User- Agent:1': 0.23; 'questions:': 0.24; 'refers': 0.24; 'cc:2**0': 0.24; 'performing': 0.26; 'least': 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; "i'm": 0.30; 'names.': 0.31; 'operations.': 0.31; 'question:': 0.31; 'yes.': 0.31; 'trouble': 0.34; "i'd": 0.34; 'anywhere': 0.35; 'created': 0.35; 'operations': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'leads': 0.36; 'example,': 0.37; 'from:addr:googlemail.com': 0.38; 'pm,': 0.38; 'anything': 0.39; 'does': 0.39; 'skip:u 10': 0.60; 'most': 0.60; 'details.': 0.61; 'simple': 0.61; 'further': 0.61; 'more': 0.64; 'linked': 0.65; 'here': 0.66; 'surrounding': 0.68; 'online': 0.71; '"most': 0.84; '5.2.1': 0.84; 'relations.': 0.84; 'divided': 0.91; 'mean.': 0.91; '2013': 0.98 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:path:newsgroups:date:in-reply-to:complaints-to :injection-info:nntp-posting-host:references:user-agent :x-google-web-client:x-google-ip:mime-version:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=P03n1sJL9ebLu7wWr+AZEBxBqI2TOj/oxJQY1CfxZaA=; b=nQ7nIa99/jhdz4/An6eCwI8F1sJHmhgf4kjHHR+lFZOo20MzC+0VS+jPEumezX5Qbb ++BSQnzOI48umsi8QZeS7oQBq4R18AoRbNKtSEB6jx0roV3lMaqsRtSwxjoa6umS5fSb h8QElMjW6aSTqTbOv7ER4JXKYFwDjOfdLcS1ornpOck0dxA2p01f+8LqhEiaIC4/h8Gj 1//eJndmAbwh93vRHw98tkwB8b5VH5zykqOD77n0CBZrrALA/YYPkTdlEYdEPE6ur38k YAJpWh/R48C9dvSY72d502RaK11c8IV12iuWMFDaFnMIUzoWUUaJlL0QfqszznkyhPeO dRWw== X-Received: by 10.50.178.244 with SMTP id db20mr3001852igc.12.1366259398278; Wed, 17 Apr 2013 21:29:58 -0700 (PDT) Newsgroups: comp.lang.python Date: Wed, 17 Apr 2013 21:29:57 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=123.192.32.215; posting-account=5JdMBQoAAABHnS4mjpqEzxnmWtgiiVNw References: <66e78281-542b-41b3-a56d-04bf736d1e0a@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 123.192.32.215 MIME-Version: 1.0 Subject: Re: Atoms, Identifiers, and Primaries From: 88888 Dihedral To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Python 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: , Message-ID: Lines: 76 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1366259407 news.xs4all.nl 2253 [2001:888:2000:d::a6]:41388 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43808 Ian=E6=96=BC 2013=E5=B9=B44=E6=9C=8817=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=89U= TC+8=E4=B8=8B=E5=8D=883=E6=99=8221=E5=88=8600=E7=A7=92=E5=AF=AB=E9=81=93=EF= =BC=9A > On Tue, Apr 16, 2013 at 8:57 PM, Bruce McGoveran >=20 > wrote: >=20 > > These are terms that appear in section 5 (Expressions) of the Python on= line documentation. I'm having some trouble understanding what, precisely,= these terms mean. I'd appreciate the forum's thoughts on these questions: >=20 > > >=20 > > 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 que= stion: can an identifier be anything other than a name? >=20 >=20 >=20 > Yes. For example: >=20 >=20 >=20 > from a import b >=20 >=20 >=20 > Here "a" is an identifier but not a name, as it does not carry >=20 > object-binding semantics. >=20 >=20 >=20 > > 2. Section 5.3 defines primaries as the most tightly bound operations = of Python. What does this mean? >=20 >=20 >=20 > "Tightly bound" here refers to operator precedence. For example, we >=20 > say that the multiplication operator binds more tightly [to the >=20 > surrounding operands] than the arithmetic operator, because the >=20 > multiplication takes precedence. This section defines that the most >=20 > tightly bound operations in Python are attribute references, >=20 > subscriptions, slices and calls; these always take precedence over >=20 > other neighboring operations. >=20 >=20 >=20 > > In particular, if an atom is a primary, what operation is the atom perf= orming that leads to the label "most tightly bound"? >=20 >=20 >=20 > An atom doesn't perform an operation. The grammar defines that a >=20 > primary can be just an atom, so that anywhere in the grammar that >=20 > expects a primary, a simple atom with no primary operation performed >=20 > on it can equally be used. An atom can not be divided into further details. An atom can be created and cloned or just referenced=20 in some relations. An object is composed of atoms linked in someway. Of course, one can box those atoms of an object=20 to make the object immutable at least in some situations to be named and used.