New submission from Serhiy Storchaka:

Example:

>>> err = None
>>> try: raise ValueError
... except ValueError as err: pass
... 
>>> err
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'err' is not defined

It is expected that either the variable will have the catched value, or save 
the old value, or the compiler will raise an error. But it didn't even warns.

----------
components: Interpreter Core
messages: 177657
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: except statement turns defined variable into undefined
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4

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

Reply via email to