Movatterモバイル変換


[0]ホーム

URL:


[Python-ideas] site.py uses os.sep to determine platform

Alex Walterstritium-list at sdamon.com
Sun Feb 12 07:26:29 EST 2017


On august 7th, 1998, Guido committedhttps://github.com/python/cpython/commit/d89fa0c5761254c970af72e5abcea420fd23e893 to python, adding the quit() and exit() built-ins.  He decided todetermine the platform python was running on by checking os.sep.  I don'tunderstand the rationale behind this choice in 1998, but I assume that therewas one.It's 2017.  We have sys.platform, and the standard library is tested againsteverything that vanilla cpython (unpatched by a vendor) will ever put incpython.Is there any reason not to change os.sep == '\\' to sys.platform == 'win32'in 2017?


More information about the Python-ideasmailing list

[8]ページ先頭

©2009-2026 Movatter.jp