On 8/10/07, Neil Schemenauer <[EMAIL PROTECTED]> wrote:
> Nick Coghlan <[EMAIL PROTECTED]> wrote:
> > However we select between Python and native module versions, the build
> > bots need be set up to run the modules both ways (with and without C
> > optimisation).
>
> If there is a way to explictly import each module separately then I
> think that meets both needs.

This sounds good. It may be as simple as moving the Python
implementation into a separate module as well, and having the public
module attempt to import first from the C code, then from the Python
code.

I think that if there's code for which no C equivalent exists (e.g.
some stuff in heapq.py, presumably some stuff in io.py), it should be
in the public module, so the latter cal do something like this:

try:
  from _c_foo import *  # C version
except ImportError:
  from _py_foo import *  # Py vesrion

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to