]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-101362: Omit path anchor from `pathlib.PurePath()._parts` (GH-102476)
authorBarney Gale <barney.gale@gmail.com>
Sun, 9 Apr 2023 17:40:03 +0000 (18:40 +0100)
committerGitHub <noreply@github.com>
Sun, 9 Apr 2023 17:40:03 +0000 (18:40 +0100)
commit2c673d5e93cfe2779f27c4e742d7e50f7a94f356
tree7b5aa0de6865ad59854a78765f31edb3bda6875f
parent0a675f4bb57d01a5e69f8f58ae934ad7ca501a8d
GH-101362: Omit path anchor from `pathlib.PurePath()._parts` (GH-102476)

Improve performance of path construction by skipping the addition of the path anchor (`drive + root`) to the internal `_parts` list. Rename this attribute to `_tail` for clarity.
Lib/pathlib.py
Lib/test/test_pathlib.py
Misc/NEWS.d/next/Library/2023-03-06-18-49-57.gh-issue-101362.eSSy6L.rst [new file with mode: 0644]