Steven D'Aprano wrote:

Currently, if I want to verify that (say) cFoo and Foo do the same thing, or compare their speed, it's easy because I can import the modules separately.

Also, won't foo.py be wasting time in most cases by
defining python versions that get overwritten?

Instead of defining things directly in foo.py, maybe it
should do

  try:
    from cFoo import *
  except ImportError:
    from pyFoo import *

Then the fast path will be taken if cFoo is available,
and you can directly import cFoo or pyFoo if you want.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to