[Python-ideas] Fast context creation
Chris Angelico
rosuav at gmail.com
Thu Nov 27 14:50:19 CET 2014
On Fri, Nov 28, 2014 at 12:17 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>> You could abuse try/finally for this purpose.
>
> Or just use it, since it's a normal use of try/finally ;-)
>
I guess so. I normally think of try/finally as an implication that an
exception is expected (rather than a function-level "atexit" type of
thing), but that's what's happening here. So yes, take off the "ab"
and just use try/finally.
ChrisA
More information about the Python-ideas
mailing list