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: operator precedence table is wrong
Type: Stage:
Components: Documentation Versions: Python 3.0, Python 2.4, Python 3.1, Python 2.7, Python 2.6, Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, ggenellina
Priority: normal Keywords: patch

Created on 2009-02-19 03:50 by ggenellina, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
expressions.diff ggenellina, 2009-02-19 06:35 operator precedence table
Messages (2)
msg82451 - (view) Author: Gabriel Genellina (ggenellina) Date: 2009-02-19 03:50
The operator precedence table is wrong.
<http://docs.python.org/reference/
expressions.html#summary>
shows "in"/"not in" having less priority than 
comparisons like "==", but that's not true:

py> 2 in (1,2) == True
False

The .rst file is wrong, as well as all the 
generated .html files since version 2.1 at least.
But the original Latex source lists them in the 
same group.

Looks like the latex->html and latex->rst tools 
both had the same problem with this kind of 
table construct.

The attached patch is based on the ref5.tex file 
included in Python 2.5
msg82463 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-02-19 08:30
Fixed in r69769.
History
Date User Action Args
2022-04-11 14:56:45adminsetgithub: 49560
2009-02-19 08:30:21georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg82463
2009-02-19 06:35:28ggenellinasetfiles: + expressions.diff
keywords: + patch
2009-02-19 03:50:17ggenellinacreate