diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2000-10-07 10:16:19 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2000-10-07 10:16:19 (GMT) |
commit | 025468d246cda4f9e7da098ea615e56a5f8f7f46 (patch) | |
tree | a707143c1fe3a749f14c7c3a6ba8e103ad8f95ea /Lib/sre_parse.py | |
parent | 53f3d4ac74455e98e372af9dc7d29afd7b420644 (diff) | |
download | cpython-025468d246cda4f9e7da098ea615e56a5f8f7f46.zip cpython-025468d246cda4f9e7da098ea615e56a5f8f7f46.tar.gz cpython-025468d246cda4f9e7da098ea615e56a5f8f7f46.tar.bz2 |
SRE didn't handle character category followed by hyphen inside a
character class. Fix provided by Andrew Kuchling. Closes bug
#116251.
Diffstat (limited to 'Lib/sre_parse.py')
-rw-r--r-- | Lib/sre_parse.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py index fcf5bcc..9cbbc02 100644 --- a/Lib/sre_parse.py +++ b/Lib/sre_parse.py @@ -393,6 +393,8 @@ def _parse(source, state): # potential range this = source.get() if this == "]": + if code1[0] is IN: + code1 = code1[1][0] set.append(code1) set.append((LITERAL, ord("-"))) break |