[Python-Dev] Pre-PEP: Unifying try-except and try-finally
Nick Coghlan
ncoghlan at gmail.com
Thu May 5 14:32:59 CEST 2005
Michael Hudson wrote:
> "Shane Holloway (IEEE)" <shane.holloway at ieee.org> writes:
>
>
>>And per the PEP, I think the explaining that::
>>
>> try:
>> A
>> except:
>> B
>> else:
>> C
>> finally:
>> D
>>
>>is *exactly* equivalent to::
>>
>> try:
>> try:
>> A
>> except:
>> B
>> else:
>> C
>> finally:
>> D
>>
>>Resolved all the questions about control flow for me.
>
>
> Well, yes, that makes sense, but also raises a small "and the point
> is...?" flag in my head.
Someone writing a patch and profiling the two versions would serve to convince me :)
Cheers,
Nick.
P.S. Well, assuming the flattened version is faster. . .
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
More information about the Python-Dev
mailing list