8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
os.getcwd()
Path.cwd()
1 parent b061747 commit 19bf6ffCopy full SHA for 19bf6ff
Lib/pathlib.py
@@ -694,7 +694,7 @@ def cwd(cls):
694
"""Return a new path pointing to the current working directory
695
(as returned by os.getcwd()).
696
"""
697
- return cls().absolute()
+ return cls(os.getcwd())
698
699
@classmethod
700
def home(cls):
@@ -768,7 +768,7 @@ def absolute(self):
768
769
if self.is_absolute():
770
return self
771
- return self.makepath(os.getcwd(), self)
+ return self.makepath(self.cwd(), self)
772
773
def resolve(self, strict=False):
774
0 commit comments