summaryrefslogtreecommitdiff
path: root/Lib/sre_parse.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-01-11 08:32:01 +0200
committerEzio Melotti <ezio.melotti@gmail.com>2013-01-11 08:32:01 +0200
commit5c4e32b131af335d82e467ba95d6b30a414020e8 (patch)
tree75d5742ff3c21a65b1731b3a51c380c03f46930b /Lib/sre_parse.py
parent32851d61f2779b4fcefb92fa0a74f814a87211cb (diff)
downloadcpython-git-5c4e32b131af335d82e467ba95d6b30a414020e8.tar.gz
#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 7149dca491..8b98b1ac2e 100644
--- a/Lib/sre_parse.py
+++ b/Lib/sre_parse.py
@@ -228,7 +228,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]