A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-February/013118.html below:

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

[Python-Dev] Those import related syntax errors again... [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



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4