This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Hard to find operator precedence in Lang Ref.
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: chris.jerdonek, docs@python, ezio.melotti, python-dev, rurpy2, terry.reedy
Priority: normal Keywords:

Created on 2012-12-14 06:09 by rurpy2, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg177444 - (view) Author: rurpy (rurpy2) Date: 2012-12-14 06:09
Python Language Reference, chapter 6 "Expressions".

The last section (6.15) of this is titled, "Summary".  That title is misleading -- it is not really a summary of the "Expressions" chapter but rather, as the first sentence makes clear, a table of operator precedences.  It is not really even a "summary" of operator precedences since some of the preceeding operator sections don't mention their precedence.  And adding to the confusion, none of preceding sections even use the word precedence, referring instead to "binding" or "priority".

Operator precedences are something many users frequently look for frequently in a language reference and the lack of an Operator Precedence entry in the ToC makes this section hard to find.

There are no index entries for "operators/precedence" or "expressions/order of evaluation".  There is an index entry for "evaluation order" but that points to a different section.

At a minimum, this section should have its title changed from "Summary" to "Operator Precedence" and get one or more index entries.

In other languages operator precedence is often described and indexed under "order of evaluation", often as a subindex of "expressions".  In the Python reference, there is a very short section called, 6.14, "Evaluation Order" that immediately preceeds the Operator Precedence section.  That section and the Operator Precedence section could be effectively combined into a single section.
msg177571 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012-12-15 22:49
I agree with index entries and that 6.14 Evaluation Order (7 lines) and 6.15 Summary (precedence table and notes) could be combined into 6.14 Evaluation Order and Precedence. I don't think the text necessarily needs revision. Just augment 6.14 and remove 6.15.
msg178126 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-12-25 13:47
New changeset a0f6c68ea12f by Ezio Melotti in branch '2.7':
#16677: rename section header and fix markup.
http://hg.python.org/cpython/rev/a0f6c68ea12f

New changeset 2eab4f7b7280 by Ezio Melotti in branch '3.2':
#16677: rename section header and fix markup.
http://hg.python.org/cpython/rev/2eab4f7b7280

New changeset 356af3fc6471 by Ezio Melotti in branch '3.3':
#16677: merge with 3.2.
http://hg.python.org/cpython/rev/356af3fc6471

New changeset 9a65501a71e6 by Ezio Melotti in branch 'default':
#16677: merge with 3.3.
http://hg.python.org/cpython/rev/9a65501a71e6
msg178128 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-12-25 13:58
I think it's better to keep the two sections separate, so I just changed the title from "Summary" to "Operator precedence".
While I was at it I also fixed the markup in a few places in the section and noticed a mistake in the "Evaluation order" (reported in #16777).
Regarding the index entries I don't see anything wrong with the current ones, but I'm not sure how they are supposed to work and I generally find Google more reliable than the Sphinx search.
msg178167 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012-12-25 22:10
Changing 'datum' to 'value' is a nice touch that I overlooked. It is definitely friendlier to people whose native language is not latin-infested. Thanks.
History
Date User Action Args
2022-04-11 14:57:39adminsetgithub: 60881
2012-12-25 22:10:59terry.reedysetmessages: + msg178167
2012-12-25 13:58:30ezio.melottisetstatus: open -> closed
messages: + msg178128

assignee: docs@python -> ezio.melotti
resolution: fixed
stage: needs patch -> resolved
2012-12-25 13:47:57python-devsetnosy: + python-dev
messages: + msg178126
2012-12-15 22:49:43terry.reedysetnosy: + terry.reedy
messages: + msg177571
2012-12-14 09:10:29ezio.melottisetnosy: + ezio.melotti, chris.jerdonek

stage: needs patch
2012-12-14 06:09:55rurpy2create