Skip to content

Commit

Permalink
Make pickling cheaper
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed Mar 19, 2023
1 parent b8842db commit 32d13ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def __new__(cls, *args, **kwargs):
def __reduce__(self):
# Using the parts tuple helps share interned path parts
# when pickling related paths.
return (self.__class__, self.parts)
return (self.__class__, (self._raw_path,))

def __init__(self, *args):
if not args:
Expand Down

0 comments on commit 32d13ba

Please sign in to comment.