Paul Rubin wrote:
> I like
>> if dlg.ShowModal() == wx.ID_OK:
> db_name = dlg.GetValue()
> else:
> db_name = None
> dlg.Destroy()
> return db_name
>> better than
>> db_name = None
> if dlg.ShowModal() == wx.ID_OK:
> db_name = dlg.GetValue()
> dlg.Destroy()
> return db_name
>> but I suppose it's a matter of preference.
Yeah, I think the second way is usually used by people who are more
accustomed to programming in C, since they need to initialize variables.
Your way is probably more Pythonic though.
-Farshid