Skip to content

gh-148765: Fix description of include_hidden parameter in glob docs#148768

Open
EoinTrial wants to merge 1 commit intopython:mainfrom
EoinTrial:fix/glob-include-hidden-docs
Open

gh-148765: Fix description of include_hidden parameter in glob docs#148768
EoinTrial wants to merge 1 commit intopython:mainfrom
EoinTrial:fix/glob-include-hidden-docs

Conversation

@EoinTrial
Copy link
Copy Markdown

@EoinTrial EoinTrial commented Apr 19, 2026

The include_hidden parameter in glob.glob() and glob.iglob() is described as:

If include_hidden is true, "**" pattern will match hidden directories.

This is inaccurate because the flag affects all wildcard patterns, not just **, and "hidden directories" wrongly implies Windows FILE_ATTRIBUTE_HIDDEN rather than dot-prefixed names.

The fix aligns the wording with glob.translate(), which already uses the correct description in the same file.

Discourse thread from 2022 where this was identified: https://discuss.python.org/t/new-glob-documentation-could-be-improved/19054


📚 Documentation preview 📚: https://cpython-previews--148768.org.readthedocs.build/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant