<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><div><div style="font-family: Calibri,sans-serif; font-size: 11pt;">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.<br><br>We should certainly match the check to the intent, but we need to determine the intent first.<br><br>Cheers,<br>Steve<br><br>Top-posted from my Windows Phone</div></div><div dir="ltr"><hr><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">From: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:tritium-list@sdamon.com">Alex Walters</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Sent: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;">2/12/2017 4:35</span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">To: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:python-ideas@python.org">python-ideas@python.org</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Subject: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;">[Python-ideas] site.py uses os.sep to determine platform</span><br><br></div>On august 7th, 1998, Guido committed<br>https://github.com/python/cpython/commit/d89fa0c5761254c970af72e5abcea420fd2<br>3e893 to python, adding the quit() and exit() built-ins. He decided to<br>determine the platform python was running on by checking os.sep. I don't<br>understand the rationale behind this choice in 1998, but I assume that there<br>was one.<br><br>It's 2017. We have sys.platform, and the standard library is tested against<br>everything that vanilla cpython (unpatched by a vendor) will ever put in<br>cpython.<br><br>Is there any reason not to change os.sep == '\\' to sys.platform == 'win32'<br>in 2017?<br><br>_______________________________________________<br>Python-ideas mailing list<br>Python-ideas@python.org<br>https://mail.python.org/mailman/listinfo/python-ideas<br>Code of Conduct: http://python.org/psf/codeofconduct/<br></body></html>