summaryrefslogtreecommitdiffstats
path: root/Lib/sre.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/sre.py')
-rw-r--r--Lib/sre.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sre.py b/Lib/sre.py
index 7910c83..ffe2bc3 100644
--- a/Lib/sre.py
+++ b/Lib/sre.py
@@ -221,7 +221,7 @@ def _compile(*key):
pattern, flags = key
if isinstance(pattern, _pattern_type):
return pattern
- if not isinstance(pattern, sre_compile.STRING_TYPES):
+ if not sre_compile.isstring(pattern):
raise TypeError, "first argument must be string or compiled pattern"
try:
p = sre_compile.compile(pattern, flags)