From: Barry Warsaw Date: Sat, 1 Jun 2002 03:56:07 +0000 (+0000) Subject: _is_unicode(): Use UnicodeType instead of the unicode builtin for X-Git-Tag: v2.3c1~5528 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb98c8cff0987e9c1afbc1967721ff4999c5d381;p=python _is_unicode(): Use UnicodeType instead of the unicode builtin for Python 2.1 compatibility. --- diff --git a/Lib/email/Charset.py b/Lib/email/Charset.py index 4a7ef69576..9a54dab9ef 100644 --- a/Lib/email/Charset.py +++ b/Lib/email/Charset.py @@ -7,8 +7,10 @@ except NameError: def _is_unicode(x): return 1==0 else: + # Use UnicodeType instead of built-in unicode for Py2.1 compatibility + from types import UnicodeType def _is_unicode(x): - return isinstance(x, unicode) + return isinstance(x, UnicodeType) from email.Encoders import encode_7or8bit import email.base64MIME