Visitar URL original
bpo-43970: Optimize Path.cwd() in pathlib by kfollstad · Pull Request #25699 · python/cpython · GitHub
Skip to content
Merged
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
bpo-43970: Optimize Path.cwd() in pathlib
  • Loading branch information
kfollstad committed Apr 28, 2021
commit 6431df0ab4abe23ad6cfa7b0567956caed71ff83
2 changes: 1 addition & 1 deletion Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ def cwd(cls):
"""Return a new path pointing to the current working directory
(as returned by os.getcwd()).
"""
return cls(cls()._accessor.getcwd())
return cls(cls._accessor.getcwd())

@classmethod
def home(cls):
Expand Down