diff options
author | Barney Gale <barney.gale@gmail.com> | 2024-04-11 00:26:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 00:26:53 (GMT) |
commit | 0cc71bde001950d3634c235e2b0d24cda6ce7dce (patch) | |
tree | b7cdb33ccd2c1d0f793a8c3b60f590d9af8c0e0e /Lib/test/test_asyncio/test_streams.py | |
parent | 6258844c27e3b5a43816e7c559089a5fe0a47123 (diff) | |
download | cpython-0cc71bde001950d3634c235e2b0d24cda6ce7dce.zip cpython-0cc71bde001950d3634c235e2b0d24cda6ce7dce.tar.gz cpython-0cc71bde001950d3634c235e2b0d24cda6ce7dce.tar.bz2 |
GH-117586: Speed up `pathlib.Path.walk()` by working with strings (#117726)
Move `pathlib.Path.walk()` implementation into `glob._Globber`. The new
`glob._Globber.walk()` classmethod works with strings internally, which is
a little faster than generating `Path` objects and keeping them normalized.
The `pathlib.Path.walk()` method converts the strings back to path objects.
In the private pathlib ABCs, our existing subclass of `_Globber` ensures
that `PathBase` instances are used throughout.
Follow-up to #117589.
Diffstat (limited to 'Lib/test/test_asyncio/test_streams.py')
0 files changed, 0 insertions, 0 deletions