Skip to content

Commit

Permalink
Use list comprehension in PurePathBase initialiser
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed Dec 21, 2023
1 parent dc08c5d commit 461c759
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Lib/pathlib/_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,7 @@ class PurePathBase:
pathmod = os.path

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

Expand Down

0 comments on commit 461c759

Please sign in to comment.