In article <ec8e0912-bc85-4c51-85f5-fc855e289...@k6g2000prg.googlegroups.com>,
Pete Emerson  <pemer...@gmail.com> 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 (a...@pythoncraft.com)           <*>         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

Reply via email to