closes bpo-25461: Update os.walk() docstring to match the online docs… · python/cpython@c43f26e (original) (raw)

`@@ -300,10 +300,11 @@ def walk(top, topdown=True, onerror=None, followlinks=False):

`

300

300

` (e.g., via del or slice assignment), and walk will only recurse into the

`

301

301

` subdirectories whose names remain in dirnames; this can be used to prune the

`

302

302

` search, or to impose a specific order of visiting. Modifying dirnames when

`

303

``

`-

topdown is false is ineffective, since the directories in dirnames have

`

304

``

`-

already been generated by the time dirnames itself is generated. No matter

`

305

``

`-

the value of topdown, the list of subdirectories is retrieved before the

`

306

``

`-

tuples for the directory and its subdirectories are generated.

`

``

303

`+

topdown is false has no effect on the behavior of os.walk(), since the

`

``

304

`+

directories in dirnames have already been generated by the time dirnames

`

``

305

`+

itself is generated. No matter the value of topdown, the list of

`

``

306

`+

subdirectories is retrieved before the tuples for the directory and its

`

``

307

`+

subdirectories are generated.

`

307

308

``

308

309

` By default errors from the os.scandir() call are ignored. If

`

309

310

` optional arg 'onerror' is specified, it should be a function; it

`