Martin v. Löwis <mar...@v.loewis.de> added the comment: > Would you elaborate just a bit more on why a ctypes implementation would be > undesirable?
ctypes is inherently insecure. It must be possible to use Python itself with ctypes removed. Therefore, there is a strict policy not to use ctypes in the core. >> People tend to access functions of the posix module that are specific >> to POSIX through the os module, but it isn't really meant this way. > > But isn't that the way to write future-proof portable code? If one writes > code that calls os.symlink, and a future version of Python supports symlink in > Windows, then the library that calls os.symlink may just work in Windows > without any rewrite. Indeed, isn't that the primary purpose of the os module, > to provide a unified interface to platform-specific implementations of the > same behavior? Correct - but for that to work, it should really only expose functions that work on all systems. It currently fails to do so, allowing people to write applications that they believe to be portable, but actually aren't portable at all. However, it has always been that way, so the added portability that the os module provides is really minor. Instead, portability is already provided in posixmodule.c ---------- title: Add os.link() and os.symlink() and os.path.islink() support for Windows -> Add os.link() and os.symlink() and os.path.islink() support for Windows _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1578269> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com