@@ -203,11 +203,11 @@ def _add(str, fn):
203203def makedirs (name , mode = 0o777 , exist_ok = False ):
204204 """makedirs(name [, mode=0o777][, exist_ok=False])
205205
206- Super-mkdir; create a leaf directory and all intermediate ones. Works like
207- mkdir, except that any intermediate path segment (not just the rightmost)
208- will be created if it does not exist. If the target directory already
209- exists, raise an OSError if exist_ok is False. Otherwise no exception is
210- raised. This is recursive.
206+ Super-mkdir; create a leaf directory and all intermediate ones. Works
207+ like mkdir, except that any intermediate path segment (not just the
208+ rightmost) will be created if it does not exist. If the target
209+ directory already exists, raise an OSError if exist_ok is False.
210+ Otherwise no exception is raised. This is recursive.
211211
212212 """
213213 head , tail = path .split (name )
@@ -295,12 +295,12 @@ def walk(top, topdown=True, onerror=None, followlinks=False):
295295 dirpath, dirnames, filenames
296296
297297 dirpath is a string, the path to the directory. dirnames is a list of
298- the names of the subdirectories in dirpath (including symlinks to directories,
299- and excluding '.' and '..').
298+ the names of the subdirectories in dirpath (including symlinks to
299+ directories, and excluding '.' and '..').
300300 filenames is a list of the names of the non-directory files in dirpath.
301- Note that the names in the lists are just names, with no path components.
302- To get a full path (which begins with top) to a file or directory in
303- dirpath, do os.path.join(dirpath, name).
301+ Note that the names in the lists are just names, with no path
302+ components. To get a full path (which begins with top) to a file or
303+ directory in dirpath, do os.path.join(dirpath, name).
304304
305305 If optional arg 'topdown' is true or not specified, the triple for a
306306 directory is generated before the triples for any of its subdirectories
@@ -310,13 +310,13 @@ def walk(top, topdown=True, onerror=None, followlinks=False):
310310
311311 When topdown is true, the caller can modify the dirnames list in-place
312312 (e.g., via del or slice assignment), and walk will only recurse into the
313- subdirectories whose names remain in dirnames; this can be used to prune the
314- search, or to impose a specific order of visiting. Modifying dirnames when
315- topdown is false has no effect on the behavior of os.walk(), since the
316- directories in dirnames have already been generated by the time dirnames
317- itself is generated. No matter the value of topdown, the list of
318- subdirectories is retrieved before the tuples for the directory and its
319- subdirectories are generated.
313+ subdirectories whose names remain in dirnames; this can be used to prune
314+ the search, or to impose a specific order of visiting. Modifying
315+ dirnames when topdown is false has no effect on the behavior of
316+ os.walk(), since the directories in dirnames have already been generated
317+ by the time dirnames itself is generated. No matter the value of
318+ topdown, the list of subdirectories is retrieved before the tuples for
319+ the directory and its subdirectories are generated.
320320
321321 By default errors from the os.scandir() call are ignored. If
322322 optional arg 'onerror' is specified, it should be a function; it
@@ -457,9 +457,9 @@ def fwalk(top=".", topdown=True, onerror=None, *, follow_symlinks=False, dir_fd=
457457 The advantage of fwalk() over walk() is that it's safe against symlink
458458 races (when follow_symlinks is False).
459459
460- If dir_fd is not None, it should be a file descriptor open to a directory,
461- and top should be relative; top will then be relative to that directory.
462- (dir_fd is always supported for fwalk.)
460+ If dir_fd is not None, it should be a file descriptor open to
461+ a directory, and top should be relative; top will then be relative to
462+ that directory. (dir_fd is always supported for fwalk.)
463463
464464 Caution:
465465 Since fwalk() yields file descriptors, those are only valid until the
0 commit comments