<p dir="ltr">Le 13 oct. 2013 10:19, "Stefan Behnel" <<a href="mailto:stefan_ml@behnel.de">stefan_ml@behnel.de</a>> a écrit :<br>
> I agree. I find it much easier to read a plain and obvious<br>
><br>
> try:<br>
> from _cmodule import *<br>
> except ImportError:<br>
> from _pymodule import *<br>
><br>
> in a facade module ...</p>
<p dir="ltr">I miss maybe something. I don't understand why you would like to use the Python implementation if a C implementation is available and probably (much) faster.</p>
<p dir="ltr">Maybe developers of PyPy, IronPython and Jython appreciate our effort to provide a Python implementation which is up to date and well tested. But why should we pay a price (bad performance) if the module is not (never? who uses _pyio?) used in CPython. If another Python uses it, the file can be renamed (ex: _pyio.py becomes simply io.py).</p>
<p dir="ltr">IMO if the C module is complete (has no extra functions in the "facade" module), it should get the main name (ex: decimal, not _decimal).</p>
<p dir="ltr">It was discussed to put the Python implementation in anothet directory. Good idea, but only put the directory in sys.path for unit tests (prepend it to sys.path to load the Python module).</p>
<p dir="ltr">I am only talking of C module which does not need anything of the "facade" module.</p>
<p dir="ltr">Victor</p>