[Python-ideas] site.py uses os.sep to determine platform
steve.dower at python.org
Sun Feb 12 10:05:44 EST 2017
It depends on what the code beneath the if is doing. "Windows" may be a shorthand for "uses backslash", in which case the check is correct.
We should certainly match the check to the intent, but we need to determine the intent first.
Top-posted from my Windows Phone
From: "Alex Walters" <tritium-list at sdamon.com>
Sent: 2/12/2017 4:35
To: "python-ideas at python.org" <python-ideas at python.org>
Subject: [Python-ideas] site.py uses os.sep to determine platform
On august 7th, 1998, Guido committed
3e893 to python, adding the quit() and exit() built-ins. He decided to
determine the platform python was running on by checking os.sep. I don't
understand the rationale behind this choice in 1998, but I assume that there
It's 2017. We have sys.platform, and the standard library is tested against
everything that vanilla cpython (unpatched by a vendor) will ever put in
Is there any reason not to change os.sep == '\\' to sys.platform == 'win32'
Python-ideas mailing list
Python-ideas at python.org
Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas