[New-bugs-announce] [issue2380] Raise a Py3K warning for catching nested tuples with non-BaseException exceptions

Alexander Belopolsky report at bugs.python.org
Tue Mar 18 04:51:03 CET 2008


New submission from Alexander Belopolsky <belopolsky at users.sourceforge.net>:

As of r61478, the following code fails to produce a py3k warning:

try:
   raise ValueError
except ((ValueError,object),):
   pass


which is an error for in py3k:

Traceback (most recent call last):
  File "x.py", line 3, in <module>
    except ((ValueError,object),):
TypeError: catching classes that do not inherit from BaseException is 
not allowed

----------
components: Interpreter Core
messages: 63875
nosy: belopolsky
severity: normal
status: open
title: Raise a Py3K warning for catching nested tuples with non-BaseException exceptions
type: behavior
versions: Python 2.6

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2380>
__________________________________


More information about the New-bugs-announce mailing list