diff options
author | Barney Gale <barney.gale@gmail.com> | 2023-03-05 22:00:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-05 22:00:56 (GMT) |
commit | 3572c861d8e8f03c34793608e7e2221e116aaec0 (patch) | |
tree | f40f31085c3e5270604adfea42990743691b1196 /Misc | |
parent | 96e10229292145012bc462a6ab3ce1626c8acf71 (diff) | |
download | cpython-3572c861d8e8f03c34793608e7e2221e116aaec0.zip cpython-3572c861d8e8f03c34793608e7e2221e116aaec0.tar.gz cpython-3572c861d8e8f03c34793608e7e2221e116aaec0.tar.bz2 |
GH-101362: Call join() only when >1 argument supplied to pathlib.PurePath() (#101665)
GH-101362: Call join() only when >1 argument supplied to pathlib.PurePath
This reduces the time taken to run `PurePath("foo")` by ~15%
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2023-02-07-21-16-41.gh-issue-101362.KMQllM.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2023-02-07-21-16-41.gh-issue-101362.KMQllM.rst b/Misc/NEWS.d/next/Library/2023-02-07-21-16-41.gh-issue-101362.KMQllM.rst new file mode 100644 index 0000000..af4ee9a --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-02-07-21-16-41.gh-issue-101362.KMQllM.rst @@ -0,0 +1,2 @@ +Speed up :class:`pathlib.PurePath` construction by calling +:func:`os.path.join` only when two or more arguments are given. |