GH-112361: Speed up pathlib by removing some temporary objects. by barneygale · Pull Request #112362 · python/cpython
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()`, `with_suffix()`, `_make_child_relpath()` (used in walking and globbing), and `glob()`.
aisk pushed a commit to aisk/cpython that referenced this pull request
…python#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()`
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request
…python#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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters