Skip to content

bpo-43970: Optimize Path.cwd() in pathlib - #25699

Merged
ericvsmith merged 1 commit into
python:masterfrom
kfollstad:PathlibCwdFix
Apr 28, 2021
Merged

ericvsmith merged 1 commit into
python:masterfrom
kfollstad:PathlibCwdFix

Conversation

@kfollstad

@kfollstad kfollstad commented Apr 28, 2021 •

Copy link
Copy Markdown
Contributor

Avoid instantiating a class unnecessarily.

https://bugs.python.org/issue43970

@domdfcoding

Copy link
Copy Markdown
Contributor

cc @barneygale as I've seen you've been working on improving pathlib

@barneygale

Copy link
Copy Markdown
Contributor

LGTM! This wasn't previously possible because _accessor was set at initialization time, but that changed in 2219187.

+1 from me.

@ericvsmith
ericvsmith merged commit 4a85718 into python:master Apr 28, 2021
@barneygale

Copy link
Copy Markdown
Contributor

@kfollstad thanks very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

6 participants