Message259201
This works right in Python 2.7, but fails in python3:
UnboundLocalError: local variable 'e' referenced before assignment
def test():
try:
raise Exception('a')
except Exception as e:
pass
else:
return
print(e)
test() |
|
Date |
User |
Action |
Args |
2016-01-29 09:40:26 | socketpair | set | recipients:
+ socketpair |
2016-01-29 09:40:26 | socketpair | set | messageid: <1454060426.66.0.838628390922.issue26237@psf.upfronthosting.co.za> |
2016-01-29 09:40:26 | socketpair | link | issue26237 messages |
2016-01-29 09:40:26 | socketpair | create | |
|