Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-100783: fix os.path.join documentation#100811
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
6 commits Select commitHold shift + click to select a range
ccb103f gh-100783: fix os.path.join documentation
hauntsaninja5a3589b clarify "absolute"
hauntsaninja8c3acbf change preposition
hauntsaninjaa2a6c81 Update Doc/library/os.path.rst
hauntsaninja4729442 Update Doc/library/os.path.rst
hauntsaninja403ef6e split sentences
hauntsaninjaFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
23 changes: 12 additions & 11 deletionsDoc/library/os.path.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -306,17 +306,18 @@ the :mod:`glob` module.) | ||
| .. function:: join(path, *paths) | ||
| Join one or more path segments intelligently. The return value is the | ||
| concatenation of *path* and all members of *\*paths*, with exactly one | ||
hauntsaninja marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| directory separator following each non-empty part except the last. That is, | ||
| if the last part is empty, the result will end in a separator. If | ||
| a segment is an absolute path (which on Windows requires both a drive and a | ||
| root), then all previous segments are ignored and joining continues from the | ||
| absolute path segment. | ||
| On Windows, the drive is not reset when a rooted path segment (e.g., | ||
| ``r'\foo'``) is encountered. If a segment is on a different drive or is an | ||
| absolute path, all previous segments are ignored and the drive is reset. Note | ||
| that since there is a current directory for each drive, | ||
| ``os.path.join("c:", "foo")`` represents a path relative to the current | ||
| directory on drive :file:`C:` (:file:`c:foo`), not :file:`c:\\foo`. | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.