<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 27, 2014 at 8:00 AM, Chris Angelico <span dir="ltr"><<a href="mailto:rosuav@gmail.com" target="_blank">rosuav@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":eh" class="a3s" style="overflow:hidden">You could abuse try/finally for this purpose.<br>
<br>
try:<br>
    whatever you need to do<br>
finally:<br>
    my_widget.setFocus()</div></blockquote></div><br></div><div class="gmail_extra">There's no abuse there. "finally" is there precisely for that sort of intention.<br></div><div class="gmail_extra"><br clear="all"></div><div class="gmail_extra">I think that what the OP wants is to "announce" the final action at the <br></div><div class="gmail_extra">-- <br><div class="gmail_signature"><span style="color:rgb(0,102,0)">Juancarlo </span><b style="color:rgb(0,102,0)">Añez</b></div>
</div></div>