From: Benjamin Peterson Date: Sun, 5 Apr 2009 01:04:38 +0000 (+0000) Subject: compare types with is X-Git-Tag: v2.7a1~1573 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d22d00e97f62c79c58b03603824aa254d712708;p=python compare types with is --- diff --git a/Lib/pickle.py b/Lib/pickle.py index 9667781a8c..abed1ca4fa 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -501,7 +501,7 @@ class Pickler: self.memoize(obj) dispatch[UnicodeType] = save_unicode - if StringType == UnicodeType: + if StringType is UnicodeType: # This is true for Jython def save_string(self, obj, pack=struct.pack): unicode = obj.isunicode()