[Python-Dev] stat module in C -- what to do with stat.py?

Nick Coghlan ncoghlan at gmail.com
Fri Jun 21 03:06:24 CEST 2013


On 21 June 2013 01:04, Thomas Wouters <thomas at python.org> wrote:
> If the .py file is going to be wrong or incomplete, why would we want to
> keep it -- or use it as fallback -- at all? If we're dead set on having a
> .py file instead of requiring it to be part of the interpreter (whichever
> that is, however it was built), it should be generated as part of the build
> process. Personally, I don't see the value in it; other implementations will
> need to do *something* special to use it anyway.

Because practicality beats purity. This "wrong" Python code has been
good enough for all Python version up until 3.4, it makes sense to
keep it as a fallback instead of throwing it away.

As Daniel notes, it also means PyPy can just have a small cffi module
that adds (or overwrites) the platform specific constants, instead of
having to reimplement the whole module.

Cheers,
Nick.

--
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list