[Python-Dev] IO implementation: in C and Python? (original) (raw)

Alexandre Vassalotti alexandre at peadrop.com
Fri Feb 20 08🔞09 CET 2009


On Fri, Feb 20, 2009 at 12:35 AM, Steven D'Aprano <steve at pearwood.info> 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. Given the 3.0 approach, how would one access the Python versions without black magic or hacks?

My prefered way to handle this is to keep the original Python implementations with a leading underscore (e.g., pickle._Pickler). I found this was the easiest way to test the C and Python implementations without resorting to import hacks.

-- Alexandre



More information about the Python-Dev mailing list