mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
gh-89973: Fix re.error in the fnmatch module. (GH-93072)
Character ranges with upper bound less that lower bound (e.g. [c-a])
are now interpreted as empty ranges, for compatibility with other glob
pattern implementations. Previously it was re.error.
(cherry picked from commit 0902c3d8ed)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
60adc4b92a
commit
2f8aae38b9
3 changed files with 140 additions and 7 deletions
|
|
@ -0,0 +1,3 @@
|
|||
Fix :exc:`re.error` raised in :mod:`fnmatch` if the pattern contains a
|
||||
character range with upper bound lower than lower bound (e.g. ``[c-a]``).
|
||||
Now such ranges are interpreted as empty ranges.
|
||||
Loading…
Add table
Add a link
Reference in a new issue