summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/next/Library/2023-11-24-09-27-01.gh-issue-112361.kYtnHW.rst
diff options
context:
space:
mode:
authorBarney Gale <barney.gale@gmail.com>2023-11-25 17:19:38 (GMT)
committerGitHub <noreply@github.com>2023-11-25 17:19:38 (GMT)
commit19a1fc1b3df30f64450d157dc3a5d40c992e347f (patch)
tree347f7abd5eb38070f713b2d5f32e1e2a792590d5 /Misc/NEWS.d/next/Library/2023-11-24-09-27-01.gh-issue-112361.kYtnHW.rst
parent6b961b8ceaba372b78d03feaceb4837bf7236694 (diff)
downloadcpython-19a1fc1b3df30f64450d157dc3a5d40c992e347f.zip
cpython-19a1fc1b3df30f64450d157dc3a5d40c992e347f.tar.gz
cpython-19a1fc1b3df30f64450d157dc3a5d40c992e347f.tar.bz2
GH-112361: Speed up pathlib by removing some temporary objects. (#112362)
Construct only one new list object (using `list.copy()`) when creating a new path object with a modified tail. This slightly speeds up `with_name()` and `with_suffix()`
Diffstat (limited to 'Misc/NEWS.d/next/Library/2023-11-24-09-27-01.gh-issue-112361.kYtnHW.rst')
-rw-r--r--Misc/NEWS.d/next/Library/2023-11-24-09-27-01.gh-issue-112361.kYtnHW.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2023-11-24-09-27-01.gh-issue-112361.kYtnHW.rst b/Misc/NEWS.d/next/Library/2023-11-24-09-27-01.gh-issue-112361.kYtnHW.rst
new file mode 100644
index 0000000..5a83f93
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2023-11-24-09-27-01.gh-issue-112361.kYtnHW.rst
@@ -0,0 +1,2 @@
+Speed up a small handful of :mod:`pathlib` methods by removing some
+temporary objects.