summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2002-06-01 03:56:07 (GMT)
committerBarry Warsaw <barry@python.org>2002-06-01 03:56:07 (GMT)
commitbb98c8cff0987e9c1afbc1967721ff4999c5d381 (patch)
treef48e8017baae5ad901ff769a84dc51ad4dfeb38f /Lib
parent936654bce0444cad8259a7585722dcb06a0f1ec8 (diff)
downloadcpython-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')
-rw-r--r--Lib/email/Charset.py4
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