Skip to content

[3.10] gh-91317: Document that Path does not collapse initial // (GH-32193) #93703

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 10, 2022

Documentation for pathlib says:

Spurious slashes and single dots are collapsed, but double dots ('..') are not, since this would change the meaning of a path in the face of symbolic links:

However, it omits that initial double slashes also aren't collapsed.

Later, in documentation of PurePath.drive, PurePath.root, and PurePath.name it mentions UNC but:

  • this abbreviation says nothing to a person who is unaware about existence of UNC (Wikipedia doesn't help either by giving a disambiguation page)
  • it shows up only if a person needs to use a specific property or decides to fully learn what the module provides.

For context, see the BPO entry.
(cherry picked from commit 78f1a43)

Co-authored-by: Oleg Iarygin oleg@arhadthedev.net

Automerge-Triggered-By: GH:brettcannon

…thonGH-32193)

Documentation for `pathlib` says:

> Spurious slashes and single dots are collapsed, but double dots ('..') are not, since this would change the meaning of a path in the face of symbolic links:

However, it omits that initial double slashes also aren't collapsed.

Later, in documentation of `PurePath.drive`, `PurePath.root`, and `PurePath.name` it mentions UNC but:

- this abbreviation says nothing to a person who is unaware about existence of UNC (Wikipedia doesn't help either by [giving a disambiguation page](https://en.wikipedia.org/wiki/UNC))
- it shows up only if a person needs to use a specific property or decides to fully learn what the module provides.

For context, see the BPO entry.
(cherry picked from commit 78f1a43)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@bedevere-bot bedevere-bot added docs Documentation in the Doc dir awaiting review labels Jun 10, 2022
@brettcannon brettcannon self-assigned this Jun 10, 2022
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 9fafc0a into python:3.10 Jun 10, 2022
@miss-islington miss-islington deleted the backport-78f1a43-3.10 branch June 10, 2022 23:10
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants