[Python-Dev] PEP 384 status
solipsis at pitrou.net
Wed Sep 1 00:42:38 CEST 2010
On Wed, 01 Sep 2010 10:23:42 +1200
Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Daniel Stutzbach wrote:
> > Likewise, a FILE * isn't safe to pass around, unless I can guarantee
> > that the application really is one big happy family compiled against the
> > same version of the C library.
> Given that, it seems to me that it's a mistake for Python
> to provide any APIs that take a FILE* directly in the
> first place.
What I think would be a mistake would be to define the API in terms of
Windows-specific quirks. All this discussion seems bent on satisfying
the needs of Windows developers at the expense of non-Windows
developers. "FILE*" is a perfectly standard C feature (and a
widely-used one at that). If Windows doesn't handle it correctly then
it's a Windows issue and we shouldn't annoy other people by refusing
access to that feature.
Again, putting a warning in the documentation should be enough for
those people who want to have perfect Windows support. And if
the Microsoft compiler/linker doesn't bother warning the user when
passing FILE* between various CRTs, then it's not Python's job to
After all, we don't usually try to workaround platform-specific
bugs (not as a low level such as the C API level); at worse, we mention
their existence in the docs.
More information about the Python-Dev