[New-bugs-announce] [issue8130] except-as in Py3 eats variables

Stefan Behnel report at bugs.python.org
Sat Mar 13 08:32:38 CET 2010


New submission from Stefan Behnel <scoder at users.sourceforge.net>:

Python 3.2a0 (py3k:78205M, Feb 16 2010, 17:32:08)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> e = None
[50279 refs]
>>> e
[50279 refs]
>>> try: raise ValueError
... except ValueError as e: pass
...
[50277 refs]
>>> e
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'e' is not defined
[50277 refs]


Same for 3.1.1. Note how the refcount is going down after the try-except.

----------
components: Interpreter Core
messages: 100993
nosy: scoder
severity: normal
status: open
title: except-as in Py3 eats variables
type: behavior
versions: Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8130>
_______________________________________


More information about the New-bugs-announce mailing list