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: Error Message
Type: Stage: resolved
Components: Versions: Python 3.8
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: blue555, eric.smith, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2020-12-01 06:37 by blue555, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
main.py blue555, 2020-12-01 06:37 I try this code in IDE of PYTHON
main.py blue555, 2020-12-01 11:11 File with full researcher
Messages (5)
msg382216 - (view) Author: Kshitish (blue555) Date: 2020-12-01 06:37
print (5 + 2 == 7 and 10 <= 1232 and 100 ^ 1000 >= 128) # Incorrect 

  Output: True

This argument should be false but it prints true. This is the logical error vulnerability. Try this code in another language too. You find out they print false because the argument is false but unfortunately Python prints true. Because Python does not understand this.
msg382217 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2020-12-01 07:11
This appears to be similar to issue42488, which it looks like you also reported, with a different account.

It's not clear to me why you expect the output to be False. But in any event, this is not a bug in Python.

>>> 100 ^ 1000
908

Please do not create issues on the bug tracker without doing some research. You're wasting volunteer's time.
msg382235 - (view) Author: Kshitish (blue555) Date: 2020-12-01 11:11
Please do not talk like behave properly. I know here I am wrong but it is not way to talk to some one like that. I respect your knowledge but maintain your language. Okay! 

I send you new file with full research. Please check it out and thank you
msg382242 - (view) Author: Kshitish (blue555) Date: 2020-12-01 12:01
Look tell why you close this
 

In the argument:
print (5 + 2 == 7 and 10 <= 1232 != 10 ^ 100 <= 100)

10 <= 1232 != 10 ^ 100 <= 100

10 <= 1232 is true
10 ^ 100 <= 100 is false

These two argument compares by != 
So, this statement must be true. 

Overall: print (5 + 2 == 7 and 10 <= 1232 != 10 ^ 100 <= 100)

This is the argument is true but is print false.
msg382244 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2020-12-01 12:28
You need to learn about chained comparisons in Python. This is not a bug. Please stop reopening it.
History
Date User Action Args
2022-04-11 14:59:38adminsetgithub: 86684
2020-12-01 12:28:46paul.mooresetstatus: open -> closed

messages: + msg382244
2020-12-01 12:01:30blue555setstatus: closed -> open
type: behavior ->
resolution: not a bug ->
messages: + msg382242
2020-12-01 11:19:16christian.heimessetstatus: open -> closed
type: security -> behavior
resolution: not a bug
2020-12-01 11:11:35blue555setstatus: closed -> open
files: + main.py
type: behavior -> security
messages: + msg382235

resolution: not a bug -> (no value)
2020-12-01 07:49:13eryksunsetcomponents: - Windows
2020-12-01 07:48:47eryksunsettype: behavior
2020-12-01 07:11:03eric.smithsetstatus: open -> closed

nosy: + eric.smith
messages: + msg382217

resolution: not a bug
stage: resolved
2020-12-01 06:37:14blue555create