Uh oh!
There was an error while loading. Please reload this page.
GH-119169: Simplify os.walk() exception handling - #121435
Conversation
Handle errors from `os.scandir()` and `ScandirIterator` similarly, which lets us loop over directory entries with `for`.
os.walk() exception handlingos.walk() exception handling
serhiy-storchaka
left a comment
There was a problem hiding this comment.
LGTM.
This is not so much optimization as simplification.
barneygale
commented
Jul 8, 2024
Thanks Serhiy |
bedevere-bot
commented
Jul 8, 2024
|
bedevere-bot
commented
Jul 8, 2024
|
Handle errors from `os.scandir()` and `ScandirIterator` similarly, which lets us loop over directory entries with `for`.
Handle errors from `os.scandir()` and `ScandirIterator` similarly, which lets us loop over directory entries with `for`.
Handle errors from
os.scandir()andScandirIteratorsimilarly, which lets us loop over directory entries withfor.os.walk()#119169