]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-91317: Document that Path does not collapse initial `//` (GH-32193)
authorOleg Iarygin <oleg@arhadthedev.net>
Fri, 10 Jun 2022 22:52:36 +0000 (01:52 +0300)
committerGitHub <noreply@github.com>
Fri, 10 Jun 2022 22:52:36 +0000 (15:52 -0700)
commit78f1a436949209dab1f4a9d04036a1a42b165086
tree9aa46b046bc9357a399358b60097ab8ec96b403b
parent09243b898a13f3f61e275c1031143d1225e70916
gh-91317: Document that Path does not collapse initial `//` (GH-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.
Doc/library/pathlib.rst
Misc/NEWS.d/next/Documentation/2022-03-30-17-56-01.bpo-47161.gesHfS.rst [new file with mode: 0644]