cleaner way to write this?

Paul Rubin http
Wed Oct 25 22:47:12 CEST 2006


John Salerno <johnjsal at NOSPAMgmail.com> writes:
> Interesting idea to use try/finally to ensure that dlg.Destroy() runs
> even with a return earlier in the method. 

Note that the code is wrong, the dialog should either be created
outside the while loop, or destroyed inside it.  I don't know wx so
I'm not sure which of those is correct.  But the version I posted
potentially creates multiple dialogs and destroys only one of them.



More information about the Python-list mailing list