[Python-Dev] Special file "nul" in Windows and os.stat

"Martin v. Löwis" martin at v.loewis.de
Tue Nov 6 19:00:33 CET 2007


> As Mask Hammond said, I think that we should rely on what windows is
> saying to us as strict as possible. If windows change its behaviour,
> ok, I do not think that we need to "patch" these behaviour holes.
> 
> What do you think? Is a mistake to adhere to windows behaviour?

We certainly should rely on the Windows behavior. The next question then
is: What exactly *is* "the Windows behavior". Windows is not just
inconsistent across versions, but apparently so even within a single
version.

IIUC, GetFileAttributes and FindFirstFile both claim that NUL exists,
whereas GetFileAttributesEx claims that it doesn't exist, all in a
single version, and all is Windows API.

Please understand that Python 2.4 *also* adheres to Windows behavior.

Regards,
Martin


More information about the Python-Dev mailing list