Message334950
Hello dear developer!
I was playing with try/else/finally block and have found a bug:
Inside of "else" or/and "except" I can do this
1 + print('Why do you print me?') + 1
this would print "Why do you print me?",
in case if I have "finally" block with a "return" statement, no error raises,
if I don't have finally, nothing is printed.
def foo(var):
try:
print("Hello")
# 1 + print("Hello")
except:
1 + print('Why do you print me?') + 1
else:
1 + print('Why do you print me?') + 1
finally:
print("finally block")
return |
|
Date |
User |
Action |
Args |
2019-02-06 16:18:40 | dmitry_koshelev | set | recipients:
+ dmitry_koshelev |
2019-02-06 16:18:37 | dmitry_koshelev | set | messageid: <1549469917.09.0.661318828546.issue35916@roundup.psfhosted.org> |
2019-02-06 16:18:37 | dmitry_koshelev | link | issue35916 messages |
2019-02-06 16:18:36 | dmitry_koshelev | create | |
|