-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Clarify os.path.join documentation #100783
Copy link
Copy link
Closed
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixesOS-windowsdocsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Metadata
Metadata
Assignees
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixesOS-windowsdocsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
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