-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Clarify os.path.join documentation #100783
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
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
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 <12621235+hauntsaninja@users.noreply.github.com>
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 <12621235+hauntsaninja@users.noreply.github.com>
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 <12621235+hauntsaninja@users.noreply.github.com>
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 <12621235+hauntsaninja@users.noreply.github.com>
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: