You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following names have currently been registered: 'posix', 'nt', 'java'.
In my understanding, the value 'java' is for the benefit of jython, which is rather poorly. Other third-party implementations which may or may not have a "full os module" (e.g. ironpython) do not -- as far as I can tell -- get to be registered against this value, and Python 3.3's addition of sys.implementation seems like a more reliable (and better supported) way to perform implementation-specific checks.
Therefore I feel os.name == 'java' only exists to confuse readers of the documentation, but doesn't really provide any value, and should be removed.
PS: "platform.system()" also documents Java as a value which doesn't seem to make that much sense, however it's an open set so probably less of an issue / source of confusion.
Activity
masklinn commentedon Jan 21, 2022
os.name is defined as:
In my understanding, the value
'java'is for the benefit of jython, which is rather poorly. Other third-party implementations which may or may not have a "full os module" (e.g. ironpython) do not -- as far as I can tell -- get to be registered against this value, and Python 3.3's addition ofsys.implementationseems like a more reliable (and better supported) way to perform implementation-specific checks.Therefore I feel
os.name == 'java'only exists to confuse readers of the documentation, but doesn't really provide any value, and should be removed.masklinn commentedon Jan 21, 2022
PS: "platform.system()" also documents
Javaas a value which doesn't seem to make that much sense, however it's an open set so probably less of an issue / source of confusion.StanFromIreland commentedon May 3, 2025
sobolevn commentedon May 3, 2025