Visitar URL original
GH-76846, GH-85281: Call `__new__()` and `__init__()` on pathlib subclasses by barneygale · Pull Request #102789 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix str(Path('foo').parent)
  • Loading branch information
barneygale committed Mar 17, 2023
commit b8842db3b5f61143ae899e9a70eca1e0824ba43d
2 changes: 1 addition & 1 deletion Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def _load_parts(self):
def _from_parsed_parts(cls, drv, root, parts):
path = cls._format_parsed_parts(drv, root, parts)
self = cls(path)
self._str = path
self._str = path or '.'
self._drv = drv
self._root = root
self._parts_cached = parts
Expand Down