[Python-Dev] HAVE_FSTAT?

Nick Coghlan ncoghlan at gmail.com
Sun May 19 17:09:19 CEST 2013


On Mon, May 20, 2013 at 12:51 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> On Sun, 19 May 2013 07:47:14 -0700 (PDT)
> "Guido van Rossum" <gvanrossum at gmail.com> wrote:
>> Fake values would probably cause hard to debug problems. It's a long standing Python tradition not to offer low level APIs that the platform doesn't have.
>
> I meant the platform, not Python.

For CPython derivatives like PyMite, it can help to get things to compile.

Perhaps rather than dropping it, we can just replace all the complex
fallback code with code that triggers 'RuntimeError("Operation
requires fstat, which is not available on this platform")'.

Derivatives that support fstat-free platforms will have a clear place
to put their custom code, but we get the simpler assumption of fstat
always being available for the code paths we care about (and can
reasonably test).

Cheers,
Nick.

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


More information about the Python-Dev mailing list