[Python-bugs-list] [ python-Bugs-833905 ] Incorrect priority 'in' and '=='

SourceForge.net noreply at sourceforge.net
Fri Oct 31 17:06:33 EST 2003


Bugs item #833905, was opened at 2003-10-31 22:06
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=833905&group_id=5470

Category: Documentation
Group: Python 2.2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: John Roth (jhrothjr)
Assigned to: Nobody/Anonymous (nobody)
Summary: Incorrect priority 'in' and '=='

Initial Comment:
Section 5.9 of the LRM specifies that 'in' and 'is' are 
treated the same as '=='. However, the priority chart in 
the 5.14 Summary part of chapter 5 gives them different 
priorities. This leads one to expect that 'a' in 'abc' == 1 
should parse as if it was 'a' in ('abc' == 1) while it 
actually parses as ('a' in 'abc') == 1. 

The priority chart in the LRM should be corrected to put 
both 'is' and 'in' on the same line with the other 
conditionals. It would also be nice if a note pointed out 
that all of the operators on this line exhibit short circuit 
behavior, and also that this is not a change from prior 
releases.

See the discussion on c.l.py beginning on 10/30/2003 
titled Boolean Confusion. The first post is by Frantisek 
Fuka.

I've put it under 2.2.3 only because I don't have the 
2.3.2 manual to hand. I believe the original report on 
c.l.py was under 2.3.2

John Roth

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=833905&group_id=5470



More information about the Python-bugs-list mailing list