Skip to content

Commit

Permalink
Undo initialiser change
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed Dec 22, 2023
1 parent c7af331 commit 3bce495
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Lib/pathlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ def __init__(self, *args):
"argument should be a str or an os.PathLike "
"object where __fspath__ returns a str, "
f"not {type(path).__name__!r}")
if path:
paths.append(path)
paths.append(path)
# Avoid calling super().__init__, as an optimisation
self._raw_paths = paths
self._resolving = False
Expand Down
2 changes: 1 addition & 1 deletion Lib/pathlib/_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class PurePathBase:
pathmod = os.path

def __init__(self, *args):
self._raw_paths = [arg for arg in args if arg]
self._raw_paths = list(args)
self._resolving = False

def with_segments(self, *pathsegments):
Expand Down

0 comments on commit 3bce495

Please sign in to comment.