From 6431df0ab4abe23ad6cfa7b0567956caed71ff83 Mon Sep 17 00:00:00 2001 From: Kevin Follstad Date: Wed, 28 Apr 2021 13:38:02 -0700 Subject: [PATCH] bpo-43970: Optimize Path.cwd() in pathlib --- Lib/pathlib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/pathlib.py b/Lib/pathlib.py index 073fce82ad5705..cf40370c049a31 100644 --- a/Lib/pathlib.py +++ b/Lib/pathlib.py @@ -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): pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy