In article <[email protected]>, Pete Emerson <[email protected]> wrote: > >Excellent, this is what I finally discovered, although I was looking >for 'foo' in sys.modules.keys(), which apparently isn't necessary.
Actually, `foo in sys.modules.keys()` is double-slow, because first the dict must be scanned to create a list, and then the list must be scanned linearly to test for foo. -- Aahz ([email protected]) <*> http://www.pythoncraft.com/ "Many customs in this life persist because they ease friction and promote productivity as a result of universal agreement, and whether they are precisely the optimal choices is much less important." --Henry Spencer -- http://mail.python.org/mailman/listinfo/python-list
