[Python-ideas] Fast context creation

Juancarlo Añez apalala at gmail.com
Thu Nov 27 14:16:02 CET 2014


On Thu, Nov 27, 2014 at 8:00 AM, Chris Angelico <rosuav at gmail.com> wrote:

> You could abuse try/finally for this purpose.
>
> try:
>     whatever you need to do
> finally:
>     my_widget.setFocus()
>

There's no abuse there. "finally" is there precisely for that sort of
intention.

I think that what the OP wants is to "announce" the final action at the
-- 
Juancarlo *Añez*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20141127/0fe4aca6/attachment.html>


More information about the Python-ideas mailing list