Visitar URL original
bpo-43970: Optimize Path.cwd() in pathlib by kfollstad · Pull Request #25699 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20221223145750/https://github.com/python/cpython/pull/25699
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Apr 28, 2021

Conversation

kfollstad
Copy link
Contributor

@kfollstad kfollstad commented Apr 28, 2021 •

Avoid instantiating a class unnecessarily.

https://bugs.python.org/issue43970

@domdfcoding
Copy link
Contributor

domdfcoding commented Apr 28, 2021

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

@barneygale
Copy link
Contributor

barneygale commented Apr 28, 2021

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
10 checks passed
@barneygale
Copy link
Contributor

barneygale commented Apr 28, 2021

@kfollstad thanks very much!

@kfollstad kfollstad deleted the PathlibCwdFix branch Apr 29, 2021
kreathon pushed a commit to kreathon/cpython that referenced this pull request May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants