Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve fnmatch.fnmatch documentation #125848

Open
gordcodes opened this issue Oct 22, 2024 · 1 comment
Open

improve fnmatch.fnmatch documentation #125848

gordcodes opened this issue Oct 22, 2024 · 1 comment
Labels
docs Documentation in the Doc dir pending The issue will be closed if no feedback is provided

Comments

@gordcodes
Copy link

Documentation

In the documentation for fnmatch.
https://docs.python.org/3/library/fnmatch.html

It says that "Both parameters are case-normalized using os.path.normcase()".

This implies that the strings are always case normalized but if you dive into the description of os.path.normcase, it's actually OS dependent. Windows is case insensitive while non Windows is case sensitive.

So I would like the documentation clarified with something basic like " Both parameters are case-normalized using os.path.normcase(), which behaves differently based on OS."

@gordcodes gordcodes added the docs Documentation in the Doc dir label Oct 22, 2024
@picnixz
Copy link
Contributor

picnixz commented Oct 23, 2024

It says that they are case-normalized using os.path.normcase and the docs of the latter says:

Normalize the case of a pathname. On Windows, convert all characters in the pathname to lowercase, and also convert forward slashes to backward slashes. On other operating systems, return the path unchanged.

I don't think we'll need to restate it (in case of confusion, clicking on the link should be sufficient actually). cc @barneygale

@picnixz picnixz added the pending The issue will be closed if no feedback is provided label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir pending The issue will be closed if no feedback is provided
Projects
None yet
Development

No branches or pull requests

2 participants