[Python-Dev] [Python-checkins] cpython (3.2): #11669: rephrase footnote in the Compound Statements page.

Sandro Tosi sandro.tosi at gmail.com
Sun Jun 26 16:02:52 CEST 2011


Hi Nick,
given I'm "guilty" for this patch, I'd reply :)

On Sun, Jun 26, 2011 at 15:55, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On Sun, Jun 26, 2011 at 6:38 PM, ezio.melotti
> <python-checkins at python.org> wrote:
>> -.. [#] The exception is propagated to the invocation stack only if there is no
>> -   :keyword:`finally` clause that negates the exception.
>> +.. [#] The exception is propagated to the invocation stack unless
>> +   there is a :keyword:`finally` clause which happens to raise another
>> +   exception. That new exception causes the old one to be lost.
>
> I believe the footnote was talking about this case:
>
>>>> def f():
> ...   try:
> ...     raise Exception()
> ...   finally:
> ...     return "What exception?"
> ...
>>>> f()
> 'What exception?'
>
> The new wording doesn't accurately reflect that.

I gave my interpretation of the footnote at:
http://bugs.python.org/issue11669#msg139092 . Does this clarify it?

Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi


More information about the Python-Dev mailing list