[Python-Dev] Re: [Python-checkins] python/dist/src/Lib warnings.py,1.19,1.20

Skip Montanaro skip@pobox.com
Wed, 14 May 2003 13:02:05 -0500


    >> defer re module imports to help improve interpreter startup

    Guido> Are you sure that's going to help?  "import warnings" callse
    Guido> _processoptions() and makes a few calls to filterwarnings() which
    Guido> brings in the re module anyway...

Apparently not. :-( The call to _processoptions() won't hurt unless the user
invokes the interpreter with a -W arg.  Not much we can do there.  I think
the import in filterwarnings can be avoided by deferring the re compilation
until warn_explicit.  I'll see what I can come up with and submit a patch.

Skip