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: Unacceptable Output
Type: behavior Stage: resolved
Components: Windows Versions: Python 3.8
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Kshitish, paul.moore, steve.dower, tim.golden, xtreak, zach.ware
Priority: normal Keywords:

Created on 2020-11-25 11:41 by Kshitish, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Screenshot 2020-11-25 161636.png Kshitish, 2020-11-25 11:41 Check the png for better understanding
Screenshot 2020-11-25 181647.png Kshitish, 2020-11-25 12:49 Final One
Messages (2)
msg381821 - (view) Author: Nishant Gautam (Kshitish) * Date: 2020-11-25 11:41
Wrong Output
msg381826 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-11-25 12:32
Please don't attach images since text will have better accessibility for readers. The expression is as below and is a result of operator precedence : 
https://docs.python.org/3/reference/expressions.html#operator-precedence

>>> 7+3==10 | 7+1==8 and not(10!=10)
False


>>> (7+3) == (10 | (7 +1)) == 8
False
>>> (7+3) == (10 | (7 +1)) == 10
True

It would be good to use parens to indicate explicit bracing that helps in readability and understanding it in future for complex operations in 1 line.

Please refrain from creating multiple issues as explained in the other issues using stack overflow, python tutor, etc will be better forums to ask for help

https://bugs.python.org/issue42460
https://bugs.python.org/issue42456
https://bugs.python.org/issue42459
History
Date User Action Args
2022-04-11 14:59:38adminsetgithub: 86628
2020-11-25 13:57:17eric.smithsetstatus: open -> closed
resolution: not a bug
stage: resolved
2020-11-25 12:49:36Kshitishsetfiles: + Screenshot 2020-11-25 181647.png
2020-11-25 12:32:04xtreaksetnosy: + xtreak
messages: + msg381826
2020-11-25 11:41:29Kshitishcreate