[Python-Dev] C extension [PEP 399] import time

Stefan Krah stefan at bytereef.org
Fri Oct 11 17:38:20 CEST 2013


Antoine Pitrou <solipsis at pitrou.net> wrote:
> > 
> > I'm getting about the same values as above. I may be misunderstanding
> > something, but I wanted to reduce the difference between the 2.21 msec
> > and the 112 usec.
> 
> So you aren't complaining about C extension import time, but Python
> code import time, right?

Right, that wasn't clear from the title. Somehow I thought that PEP 399
explicitly recommended importing the C extension at the end of the file,
but in fact it only says "This [importing] is typically done at the end
of the module".


> Just create a _pydecimal module (like _pyio).

Thanks, I'll try that.


Stefan Krah




More information about the Python-Dev mailing list