John Salerno <[EMAIL PROTECTED]> writes:

>          if dlg.ShowModal() == wx.ID_OK:
>              db_name = dlg.GetValue()
>              dlg.Destroy()
>              return db_name
>          else:
>              dlg.Destroy()
>              return

It's for reasons like this that I prefer to have only one 'return'
from my functions.

    db_name = None
    if dlg.ShowModal() == wx.ID_OK:
        db_name = dlg.GetValue()
    dlg.Destroy()
    return db_name

-- 
 \         "I was trying to daydream, but my mind kept wandering."  -- |
  `\                                                     Steven Wright |
_o__)                                                                  |
Ben Finney

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to