Issue2380
Created on 2008-03-18 03:51 by belopolsky, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue2380.diff | belopolsky, 2008-03-18 04:59 | |||
| Messages (5) | |||
|---|---|---|---|
| msg63875 - (view) | Author: Alexander Belopolsky (belopolsky) * ![]() |
Date: 2008-03-18 03:51 | |
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 |
|||
| msg66580 - (view) | Author: Bruno Gola (brunogola) | Date: 2008-05-10 20:02 | |
Should nested tuples in an except clause be a valid syntax?
like:
...
except ((ValueError, Exception), TypeError, (...)):
pass
I don't see any benefit and because of this behavior the implementation
(in Python/errors.c and in the patch attached) will use recursive function.
I think that any objects inside a tuple in an except clause should be
treated equally (as an object), even a tuple, so the except clause above
should be an error in py3k and should produce a warning because the list
objects does not inherits BaseException.
Please, see my comment in http://bugs.python.org/issue2345, it is
related to this issue.
|
|||
| msg123030 - (view) | Author: Alexander Belopolsky (belopolsky) * ![]() |
Date: 2010-12-02 01:31 | |
issue2380.diff does not apply anymore. |
|||
| msg123248 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2010-12-03 14:09 | |
Not all incompatibilities have to raise a py3k warnings; AFAIK, only those which are not handled by 2to3 do. |
|||
| msg368051 - (view) | Author: Zachary Ware (zach.ware) * ![]() |
Date: 2020-05-04 13:55 | |
With 2.7 out of support, closing. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:32 | admin | set | github: 46633 |
| 2020-05-04 13:55:06 | zach.ware | set | status: open -> closed nosy:
+ zach.ware resolution: out of date |
| 2016-09-10 18:33:23 | belopolsky | set | assignee: belopolsky -> versions: - Python 2.6, Python 2.7 |
| 2012-08-23 17:51:12 | moijes12 | set | nosy:
- moijes12 |
| 2012-08-23 14:39:07 | moijes12 | set | nosy:
+ moijes12 |
| 2010-12-03 14:09:16 | pitrou | set | nosy:
+ pitrou, benjamin.peterson messages: + msg123248 |
| 2010-12-02 01:31:49 | belopolsky | set | assignee: belopolsky messages: + msg123030 stage: needs patch |
| 2010-06-26 22:52:38 | ezio.melotti | set | nosy:
+ ezio.melotti |
| 2010-04-28 18:27:52 | terry.reedy | set | versions: + Python 2.7 |
| 2008-05-10 20:02:56 | brunogola | set | nosy:
+ brunogola messages: + msg66580 |
| 2008-03-18 04:59:04 | belopolsky | set | files:
+ issue2380.diff keywords: + patch |
| 2008-03-18 04:29:28 | gvanrossum | set | priority: low keywords: + easy, 26backport |
| 2008-03-18 03:51:02 | belopolsky | create | |
