Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:

> An explicit dictionary to map the Python and C implementations may be a 
> better approach.


Do you mean a global 

optimized_module = {'pickle': '_pickle'}

in test/support.py?


I don't think I like this idea.  Even with an explicit dictionary like that,  
support.import_module_implementations() will not support all possible ways that 
alternative implementations of a given module may be provided in cpython.  It 
works for pickle/_pickle and heapq/_heapq, but won't work for io/_io/_pyio.  I 
would like import_module_implementations() to promote uniformity in the way 
parallel pure/native modules are designed.  Test suites for modules that want 
more flexibility can always call import_fresh_module() directly.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9104>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to