-
-
Notifications
You must be signed in to change notification settings - Fork 31k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify os.path.join documentation #100783
Comments
hauntsaninja
added a commit
to hauntsaninja/cpython
that referenced
this issue
Jan 6, 2023
- Use "drive", not "drive letter", because of UNC paths - Previous components are not thrown away from relative drive letters - Use "segment" instead of "component" for consistency with pathlib See issue for more details
eryksun
added
type-bug
An unexpected behavior, bug, or error
OS-windows
3.11
only security fixes
3.10
only security fixes
3.12
bugs and security fixes
labels
Jan 7, 2023
hauntsaninja
added a commit
that referenced
this issue
Jan 8, 2023
- Use "drive", not "drive letter", because of UNC paths - Previous components are not thrown away from relative drive letters - Use "segment" instead of "component" for consistency with pathlib - Other miscellaneous improvements
This was referenced Jan 8, 2023
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jan 8, 2023
- Use "drive", not "drive letter", because of UNC paths - Previous components are not thrown away from relative drive letters - Use "segment" instead of "component" for consistency with pathlib - Other miscellaneous improvements (cherry picked from commit 53455a3) Co-authored-by: Shantanu <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jan 8, 2023
- Use "drive", not "drive letter", because of UNC paths - Previous components are not thrown away from relative drive letters - Use "segment" instead of "component" for consistency with pathlib - Other miscellaneous improvements (cherry picked from commit 53455a3) Co-authored-by: Shantanu <[email protected]>
miss-islington
added a commit
that referenced
this issue
Jan 8, 2023
- Use "drive", not "drive letter", because of UNC paths - Previous components are not thrown away from relative drive letters - Use "segment" instead of "component" for consistency with pathlib - Other miscellaneous improvements (cherry picked from commit 53455a3) Co-authored-by: Shantanu <[email protected]>
miss-islington
added a commit
that referenced
this issue
Jan 8, 2023
- Use "drive", not "drive letter", because of UNC paths - Previous components are not thrown away from relative drive letters - Use "segment" instead of "component" for consistency with pathlib - Other miscellaneous improvements (cherry picked from commit 53455a3) Co-authored-by: Shantanu <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://docs.python.org/3/library/os.path.html#os.path.join
There are a couple potential issues here.
First, it should be "drive", not "drive letter":
Second, it should be "if a component is from a different drive or an absolute path, all previous components are thrown away and the drive is reset":
Third, as a nit, maybe "component" should be replaced with "segment", since arguments can contain path separators. This would improve consistency with the pathlib docs.
cc @barneygale @JelleZijlstra
These came up in #100782
Linked PRs
The text was updated successfully, but these errors were encountered: