[issue13705] Raising exceptions from finally works better than advertised in the documentation

2012-01-03 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c39fbb24b3f4 by Benjamin Peterson in branch '3.2':
exception support is correct now (closes #13705)
http://hg.python.org/cpython/rev/c39fbb24b3f4

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13705] Raising exceptions from finally works better than advertised in the documentation

2012-01-03 Thread Sinisa Segvic

Sinisa Segvic  added the comment:

Link to the documentation:
http://docs.python.org/py3k/reference/compound_stmts.html#id2

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13705] Raising exceptions from finally works better than advertised in the documentation

2012-01-03 Thread Sinisa Segvic

New submission from Sinisa Segvic :

Hi,

The documentation says:
"""
If the finally clause raises another exception (...) the saved exception is 
lost. 
"""

This does not appear to be true. 
In the example below the backtrace shows both exceptions.

>>> import math
>>> try:
...   1/0
... finally:
...   math.sqrt(-1)
... 
Traceback (most recent call last):
  File "", line 2, in 
ZeroDivisionError: division by zero

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 4, in 
ValueError: math domain error

Cheers,

SiniĊĦa

--
assignee: docs@python
components: Documentation
messages: 150544
nosy: docs@python, ssegvic
priority: normal
severity: normal
status: open
title: Raising exceptions from finally works better than advertised in the 
documentation
type: enhancement
versions: Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com