GH-101362: Omit path anchor from `pathlib.PurePath()._parts` by barneygale · Pull Request #102476 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 106 additions & 65 deletions Lib/pathlib.py
2 changes: 0 additions & 2 deletions Lib/test/test_pathlib.py
Comment thread
barneygale marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,6 @@ def test_parts_common(self):
p = P('a/b')
parts = p.parts
self.assertEqual(parts, ('a', 'b'))
# The object gets reused.
self.assertIs(parts, p.parts)
# When the path is absolute, the anchor is a separate part.
p = P('/a/b')
parts = p.parts
Expand Down