diff options
author | Barry Warsaw <barry@python.org> | 2002-06-01 03:56:07 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2002-06-01 03:56:07 (GMT) |
commit | bb98c8cff0987e9c1afbc1967721ff4999c5d381 (patch) | |
tree | f48e8017baae5ad901ff769a84dc51ad4dfeb38f /Lib/email | |
parent | 936654bce0444cad8259a7585722dcb06a0f1ec8 (diff) | |
download | cpython-bb98c8cff0987e9c1afbc1967721ff4999c5d381.zip cpython-bb98c8cff0987e9c1afbc1967721ff4999c5d381.tar.gz cpython-bb98c8cff0987e9c1afbc1967721ff4999c5d381.tar.bz2 |
_is_unicode(): Use UnicodeType instead of the unicode builtin for
Python 2.1 compatibility.
Diffstat (limited to 'Lib/email')
-rw-r--r-- | Lib/email/Charset.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/email/Charset.py b/Lib/email/Charset.py index 4a7ef69..9a54dab 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 |