Import config into global space?

simo simoninusa2001 at yahoo.co.uk
Wed Mar 31 18:40:55 EST 2004


Josiah Carlson <jcarlson at uci.edu> wrote:

[snip]
> > > from config import *

> > Actually, I've gone with the config.variable syntax for now anyway, it
> > actually makes more sense as I don't have to name my variables like
> > fontsize_config to differentiate them.

> In general, "from module import *" is generally frowned upon, if only 
> because it can clobber your module's namespace.  There are certainly 
> exceptions, but namespaces are useful.

Yes, that's what I thought, one of the reasons I'm going to go with
the config.variable syntax after all.

I'm moving to the wxWidgets 2.5 way of using the wx namespace too
(e.g. wx.ListCtrl instead of wxListCtrl).



More information about the Python-list mailing list