_is_unicode(): Use UnicodeType instead of the unicode builtin for

Python 2.1 compatibility.
This commit is contained in:
Barry Warsaw 2002-06-01 03:56:07 +00:00
parent 936654bce0
commit bb98c8cff0
1 changed files with 3 additions and 1 deletions

View File

@ -7,8 +7,10 @@
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