8000 Move call to `os.getcwd()` back into `Path.cwd()` · python/cpython@19bf6ff · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 19bf6ff

Browse files
committed
Move call to os.getcwd() back into Path.cwd()
1 parent b061747 commit 19bf6ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/pathlib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ def cwd(cls):
694694
"""Return a new path pointing to the current working directory
695695
(as returned by os.getcwd()).
696696
"""
697-
return cls().absolute()
697+
return cls(os.getcwd())
698698

699699
@classmethod
700700
def home(cls):
@@ -768,7 +768,7 @@ def absolute(self):
768768
"""
769769
if self.is_absolute():
770770
return self
771-
return self.makepath(os.getcwd(), self)
771+
return self.makepath(self.cwd(), self)
772772

773773
def resolve(self, strict=False):
774774
"""

0 commit comments

Comments
 (0)
0