New submission from Stefan Behnel <sco...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue8130>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to