Title: Improve the documentation of `fnmatch` · Issue #123345 · python/cpython · GitHub
Open Graph Title: Improve the documentation of `fnmatch` · Issue #123345 · python/cpython
X Title: Improve the documentation of `fnmatch` · Issue #123345 · python/cpython
Description: The implementation of fnmatch.fnmatch calls os.path.normcase on both the filename and the pattern, also allowing path-like objects. On the other hand, fnmatch.filter call os.path.normcase to normalize the pattern as well as os.path.normc...
Open Graph Description: The implementation of fnmatch.fnmatch calls os.path.normcase on both the filename and the pattern, also allowing path-like objects. On the other hand, fnmatch.filter call os.path.normcase to normal...
X Description: The implementation of fnmatch.fnmatch calls os.path.normcase on both the filename and the pattern, also allowing path-like objects. On the other hand, fnmatch.filter call os.path.normcase to normal...
Opengraph URL: https://github.com/python/cpython/issues/123345
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve the documentation of `fnmatch`","articleBody":"The implementation of `fnmatch.fnmatch` calls `os.path.normcase` on both the filename and the pattern, also allowing path-like objects. On the other hand, `fnmatch.filter` call `os.path.normcase` to normalize the pattern as well as `os.path.normcase` on the filenames being iterated over, but only on non-POSIX platforms.\r\n\r\nFollowing the discussion on #123215, we decided not to change the runtime behaviour (i.e. do not call `os.fspath`) but simply clarify the documentation. Inconsistencies remain between platforms where non-POSIX platforms will not get a TypeError if they use path-like objects in `fnmatch.filter`. We will also not document `fnmatch.fnmatch` as accepting path-like objects.\r\n\r\nRelated: \r\n\r\n- #123135 \r\n- https://github.com/python/cpython/issues/123215#issuecomment-2308763569\r\n- https://github.com/python/typeshed/pull/12522\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-123346\n* gh-128775\n* gh-128776\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/picnixz","@type":"Person","name":"picnixz"},"datePublished":"2024-08-26T15:59:33Z","url":"https://github.com/python/cpython/issues/123345"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:189f862d-b9cb-f8d9-405b-61919defcf25 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BD7C:1F927B:196AC30:2181F64:6B020F35 |
| html-safe-nonce | 1a9c260717d18d8ea5e3ca062998abda933fd00a399d8569fc7f09e74b0d54ef |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDdDOjFGOTI3QjoxOTZBQzMwOjIxODFGNjQ6NkIwMjBGMzUiLCJ2aXNpdG9yX2lkIjoiMTM2NDc0NTg1MzE3MjA1OTk1NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f01a5acf5e8a2cd0abe5057e0c3b4a51766df425ea5413295e3aedc1af6dcead |
| hovercard-subject-tag | issue:2487201523 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/123345/issue_layout |
| twitter:image | https://opengraph.githubassets.com/631019494916afd74d5bd2a87c91fbfcef0be29ca113b6216f70985949a0dfa2/python/cpython/issues/123345 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/631019494916afd74d5bd2a87c91fbfcef0be29ca113b6216f70985949a0dfa2/python/cpython/issues/123345 |
| og:image:alt | The implementation of fnmatch.fnmatch calls os.path.normcase on both the filename and the pattern, also allowing path-like objects. On the other hand, fnmatch.filter call os.path.normcase to normal... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | picnixz |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width