Eryk Sun <eryk...@gmail.com> added the comment:

> Correct, though the examples I'd give are Win32 vs. WinRT vs. Cygwin, 
> which are fundamentally different API surfaces for interacting with 
> the operating system.

Cygwin and MSYS are presented as more than APIs; they're separate platforms. 
sys.platform is 'cygwin' or 'msys', and os.name is 'posix'.

The Windows platform name is "win32". If we could change it, I'd prefer 
"windows". The C API is the "Windows API" or WINAPI. It used to be called 
Win32, which is still the popular name. The ABI for 32-bit x86 (Intel 
Architecture) is "win32". If we could change it, I'd prefer "win-ia32" to 
parallel "win-amd64".

> os.name is also odd, and honestly I'd rather it just went away 
> completely. I'd like the module to be called "posix" everywhere, 
> since that's the API it exposes (it's an emulation layer on 
> non-POSIX platforms), and checks should use sys.platform. 

os is too entrenched to be renamed. But I'd like it if nt (posixmodule.c) were 
renamed windows_posix (or win32_posix) -- since it has nothing to do with the 
NT API. We would need to move the Windows-only functions to a "windows" (or 
"win32") platform module. This includes _getdiskusage, _getfinalpathname, 
_getfullpathname, _getvolumepathname, _isdir, and startfile. They have no place 
in a POSIX module.

----------
nosy: +eryksun

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35896>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to