Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #43725
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2013-04-16 19:57 -0700 |
| Message-ID | <66e78281-542b-41b3-a56d-04bf736d1e0a@googlegroups.com> (permalink) |
| Subject | Atoms, Identifiers, and Primaries |
| From | Bruce McGoveran <bruce.mcgoveran@gmail.com> |
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?
2. Section 5.3 defines primaries as the most tightly bound operations of Python. What does this mean? In particular, if an atom is a primary, what operation is the atom performing that leads to the label "most tightly bound"? To put it a different way, I think of atoms as things (i.e. identifiers). The documentation makes me think atoms actually do something, as opposed to being things (I think I have in my mind the difference between a noun and a verb as I write this). Perhaps the doing in this case (or binding, if you like) is linking (binding) the identifier to the underlying object? I think it might help if I had a better working notion of what a primary is.
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?
These are, I know, long-winded questions. I appreciate in advance any thoughts the group can offer.
The relevant documentation link is: http://docs.python.org/2/reference/expressions.html#expressions
Thanks,
Bruce
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll 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