diff --git a/Lib/glob.py b/Lib/glob.py index a7256422d520fb6..97b76f0b6777553 100644 --- a/Lib/glob.py +++ b/Lib/glob.py @@ -25,7 +25,7 @@ def glob(pathname, *, root_dir=None, dir_fd=None, recursive=False, If `recursive` is true, the pattern '**' will match any files and zero or more directories and subdirectories. """ - return list(iglob(pathname, root_dir=root_dir, dir_fd=dir_fd, recursive=recursive, + return sorted(iglob(pathname, root_dir=root_dir, dir_fd=dir_fd, recursive=recursive, include_hidden=include_hidden)) def iglob(pathname, *, root_dir=None, dir_fd=None, recursive=False,