-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Open
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-featureA feature request or enhancementA feature request or enhancement
Description
os.walk()
silently produces an empty iterator if the argument is not a path to directory:
>>> import os
>>> list(os.walk('./non-existing'))
[]
>>> list(os.walk('./python'))
[]
>>> list(os.walk('/dev/null'))
[]
It can causes bugs like #99203, when a function produces some incorrect result instead of raising an exception.
Metadata
Metadata
Assignees
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-featureA feature request or enhancementA feature request or enhancement