mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
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()`
This commit is contained in:
parent
6b961b8cea
commit
19a1fc1b3d
3 changed files with 14 additions and 22 deletions
|
@ -0,0 +1,2 @@
|
|||
Speed up a small handful of :mod:`pathlib` methods by removing some
|
||||
temporary objects.
|
Loading…
Add table
Add a link
Reference in a new issue