cpython/Lib/pathlib
Barney Gale 0cc71bde00
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.
2024-04-11 01:26:53 +01:00
..
__init__.py GH-117586: Speed up `pathlib.Path.walk()` by working with strings (#117726) 2024-04-11 01:26:53 +01:00
_abc.py GH-117586: Speed up `pathlib.Path.walk()` by working with strings (#117726) 2024-04-11 01:26:53 +01:00