Message363689
`pathlib.Path.iterdir()` uses `os.listdir()` rather than `os.scandir()`. I think this has a small performance cost, per PEP 471:
> It returns a generator instead of a list, so that scandir acts as a true iterator instead of returning the full list immediately.
As `scandir()` is already available from `_NormalAccessor` it's a simple patch to use `scandir()` instead. |
|
Date |
User |
Action |
Args |
2020-03-09 00:17:57 | barneygale | set | recipients:
+ barneygale |
2020-03-09 00:17:57 | barneygale | set | messageid: <1583713077.79.0.39541814988.issue39907@roundup.psfhosted.org> |
2020-03-09 00:17:57 | barneygale | link | issue39907 messages |
2020-03-09 00:17:57 | barneygale | create | |
|