Skip to content

Commit abb4ca7

Browse files
Added missing explanations for some parameters in glob and iglob.
1 parent 645f5c4 commit abb4ca7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Lib/glob.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ def glob(pathname, *, root_dir=None, dir_fd=None, recursive=False,
2525
The order of the returned list is undefined. Sort it if you need a
2626
particular order.
2727
28+
If root_dir is not None, it should be a path-like object specifying the
29+
root directory for searching. It has the same effect as changing the
30+
current directory before calling it. If pathname is relative, the
31+
result will contain paths relative to root_dir.
32+
33+
If dir_fd is not None, it should be a file descriptor referring to a
34+
directory, and paths will then be relative to that directory.
35+
2836
If `include_hidden` is true, the patterns '*', '?', '**' will match hidden
2937
directories.
3038
@@ -46,6 +54,17 @@ def iglob(pathname, *, root_dir=None, dir_fd=None, recursive=False,
4654
The order of the returned paths is undefined. Sort them if you need a
4755
particular order.
4856
57+
If root_dir is not None, it should be a path-like object specifying the
58+
root directory for searching. It has the same effect as changing the
59+
current directory before calling it. If pathname is relative, the
60+
result will contain paths relative to root_dir.
61+
62+
If dir_fd is not None, it should be a file descriptor referring to a
63+
directory, and paths will then be relative to that directory.
64+
65+
If `include_hidden` is true, the patterns '*', '?', '**' will match hidden
66+
directories.
67+
4968
If recursive is true, the pattern '**' will match any files and
5069
zero or more directories and subdirectories.
5170
"""

0 commit comments

Comments
 (0)