commit | 30f0643e36d2c9a5849c76ca0b27b748448d0567 | [log] [tgz] |
---|---|---|
author | Barney Gale <barney.gale@gmail.com> | Fri Apr 12 23:02:39 2024 +0100 |
committer | GitHub <noreply@github.com> | Fri Apr 12 22:02:39 2024 +0000 |
tree | 65cede6194946ae5d5f55815c42b454eeabde038 | |
parent | 0eb52f5f266d9e0a662f28a4d2dfef8c746cf96e [diff] |
GH-117727: Speed up `pathlib.Path.iterdir()` by using `os.scandir()` (#117728) Replace use of `os.listdir()` with `os.scandir()`. Forgo setting `_drv`, `_root` and `_tail_cached`, as these usually aren't needed. Use `os.DirEntry.path` to set `_str`.