New submission from Kkshitish <kkshit...@yahoo.com>:

try:
  
  a = 10
  
  if a == 11:
    
    print ("Yes")
    
except:
  
  print ("Out")
  
else:
  
  print ("No")


Output: No

The output should be "Out" but it print "No", The else statement should be 
print when try condition is execute. But the try condition is not execute on 
program. But still it print else statement. 

This is not ideal output. If you are disagree with me. So, kindly provide very 
strong argument over this.

----------
files: main.py
messages: 385100
nosy: Kkshitish
priority: normal
severity: normal
status: open
title: OUTPUT WRONG
type: security
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49745/main.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42933>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to