| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Handle errors from `os.scandir()` and `ScandirIterator` similarly, which lets us loop over directory entries with `for`. In top-down mode, call `os.path.join()` at most once per iteration.
Sorry, something went wrong.
|
#119473 fixes the test failure. |
Sorry, something went wrong.
When `os.walk()` traverses into subdirectories in top-down mode, call `os.path.join()` once to add a trailing slash, and use string concatenation thereafter to generate child paths.
Handle errors from `os.scandir()` and `ScandirIterator` similarly, which lets us loop over directory entries with `for`.
|
Closing because reversing sibling traversal order isn't kosher - see discussion on #119473. |
Sorry, something went wrong.
GH-119186: Slightly speed up `os.walk(topdown=True)` When `os.walk()` traverses into subdirectories in top-down mode, call `os.path.join()` once to add a trailing slash, and use string concatenation thereafter to generate child paths.
…121431) pythonGH-119186: Slightly speed up `os.walk(topdown=True)` When `os.walk()` traverses into subdirectories in top-down mode, call `os.path.join()` once to add a trailing slash, and use string concatenation thereafter to generate child paths.
| Back | FazBrowse Home | New Git URL |
Add entries to the stack while iterating over os.scandir() results, rather than afterwards.