This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
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) * (Python committer) | 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) * (Python committer) | Date: 2010年12月02日 01:31 | |
issue2380.diff does not apply anymore. |
|||
| msg123248 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | 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) * (Python committer) | 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 messages: + msg368051 resolution: out of date stage: needs patch -> resolved |
| 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 | |