[Python-Dev] Those import related syntax errors again...

Barry A. Warsaw barry@digicool.com
Thu, 22 Feb 2001 16:24:32 -0500


>>>>> "GvR" == Guido van Rossum <guido@digicool.com> writes:

    >> How should code like Mailman's mm_cfg.py/Defaults.py construct
    >> be rewritten to provide similar functionality ? Much as I
    >> dislike 'from module import *', it really does have its uses.

    GvR> I have no idea what mm_cfg.py/Defaults.py is, but yes, import
    GvR> * has its uses!

Not that it's really that important to the discussion, but the way
Mailman lets users override its defaults is by putting all the
(autoconf and hardcoded) system defaults in Defaults.py, which the
user is never supposed to touch.

Then mm_cfg.py does a "from Defaults import *" -- at module level of
course -- and users put any overridden values in mm_cfg.py.  All
Mailman modules that have to reference a system default do so by
importing and using mm_cfg.

This was Ken's idea, and a darn good one!  It's got a wart or two, but
they are quite minor.

-Barry