Style: global configuration data

Alex Martelli aleaxit at yahoo.com
Mon Nov 13 09:09:12 EST 2000


"Boudewijn Rempt" <boud at rempt.xs4all.nl> wrote in message
news:8uokpo$d7d$1 at news1.xs4all.nl...
    [snip]
> > Having a module "config"?  Modules are handy in the way that if two
> > modules both go
>
> > import config
>
> > they get the same module.
    [snip]
> I wonder - does that also work when one of the client modules changes
> a setting in the config? Are the other modules then updated?

If, after the "import config"'s, anybody (code from any importing
module) sets, e.g., config.spam to whatever, any other importing
module will see the same whatever as now bound to config.spam.


Alex






More information about the Python-list mailing list