diff options
Diffstat (limited to 'Lib/sre_compile.py')
-rw-r--r-- | Lib/sre_compile.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py index f6cbd7bc8e..4f2fb04612 100644 --- a/Lib/sre_compile.py +++ b/Lib/sre_compile.py @@ -470,18 +470,8 @@ def _compile_info(code, pattern, flags): _compile_charset(charset, flags, code) code[skip] = len(code) - skip -try: - unicode -except NameError: - STRING_TYPES = (type(""),) -else: - STRING_TYPES = (type(""), type(unicode(""))) - def isstring(obj): - for tp in STRING_TYPES: - if isinstance(obj, tp): - return 1 - return 0 + return isinstance(obj, basestring) def _code(p, flags): |