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.
| Author | pitrou |
|---|---|
| Recipients | benjamin.peterson, pitrou |
| Date | 2008年06月14日.20:46:58 |
| SpamBayes Score | 0.018032648 |
| Marked as misclassified | No |
| Message-id | <1213476422.15.0.871996706322.issue3112@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Thinking about this, I realized that an exception can become its own
context if it is explicitly re-raised in its except handler (with "raise
variable", not bare "raise").
Not a critical bug, but it should be fixed in order to avoid delayed
garbage collection of such exceptions.
(as for the exception reporting code, it will have to detect recursivity)
>>> try: 1/0
... except Exception as e: raise e
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "<stdin>", line 1, in <module>
ZeroDivisionError: int division or modulo by zero
>>> e = sys.last_value
>>> e.__context__
ZeroDivisionError('int division or modulo by zero',)
>>> e.__context__ is e
True |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年06月14日 20:47:02 | pitrou | set | spambayes_score: 0.0180326 -> 0.018032648 recipients: + pitrou, benjamin.peterson |
| 2008年06月14日 20:47:02 | pitrou | set | spambayes_score: 0.0180326 -> 0.0180326 messageid: <1213476422.15.0.871996706322.issue3112@psf.upfronthosting.co.za> |
| 2008年06月14日 20:47:00 | pitrou | link | issue3112 messages |
| 2008年06月14日 20:46:58 | pitrou | create | |