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

Chris Angelico rosuav at gmail.com
Fri Jun 21 09:16:01 CEST 2013


On Fri, Jun 21, 2013 at 11:06 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:

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.

How would you know if the Python you're running on has an incorrect bitflag?

If the "wrong" code is simply incomplete (it has the standard flags but none of the contended ones), that would at least be safe - you'll never get a false flag, but you might be unable to recognize the platform-specific ones. And then the platform-specific modules would always be adding, never overwriting, bitflags.

ChrisA



More information about the Python-Dev mailing list