summaryrefslogtreecommitdiffstats
path: root/Lib/sre_parse.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-01-11 06:32:01 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-01-11 06:32:01 (GMT)
commitfe8e6e741492c496837a48fc04c5c776c8779b32 (patch)
tree158902e54b0a6ce62362f03759a674bc117a22e9 /Lib/sre_parse.py
parent26ed234052db568379efd2cc00d5850dd00b13f7 (diff)
downloadcpython-fe8e6e741492c496837a48fc04c5c776c8779b32.zip
cpython-fe8e6e741492c496837a48fc04c5c776c8779b32.tar.gz
cpython-fe8e6e741492c496837a48fc04c5c776c8779b32.tar.bz2
#13899: \A, \Z, and \B now correctly match the A, Z, and B literals when used inside character classes (e.g. [A]). Patch by Matthew Barnett.
Diffstat (limited to 'Lib/sre_parse.py')
-rw-r--r--Lib/sre_parse.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py
index 9aea56a..19dd4fc 100644
--- a/Lib/sre_parse.py
+++ b/Lib/sre_parse.py
@@ -235,7 +235,7 @@ def _class_escape(source, escape):
if code:
return code
code = CATEGORIES.get(escape)
- if code:
+ if code and code[0] == IN:
return code
try:
c = escape[1:2]