| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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 python#117589.
…gs (python#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 python#117589.
| Back | FazBrowse Home | New Git URL |
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.
Timings:
Speedup is nothing to write home about, but this PR has the benefit of keeping closely-related recursive-directory-walking code together, and removing some redundant private pathlib methods.