From: Barry Warsaw Date: Sat, 28 Sep 2002 20:41:39 +0000 (+0000) Subject: is_multipart(): Use isinstance() instead of type equality. X-Git-Tag: v2.3c1~3956 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4ece778bbc5bbb2408bc7494bf58924039d5eaa4;p=thirdparty%2FPython%2Fcpython.git is_multipart(): Use isinstance() instead of type equality. --- diff --git a/Lib/email/Message.py b/Lib/email/Message.py index db4b9a2872db..49ab26609022 100644 --- a/Lib/email/Message.py +++ b/Lib/email/Message.py @@ -107,7 +107,7 @@ class Message: def is_multipart(self): """Return True if the message consists of multiple parts.""" - if type(self._payload) is ListType: + if isinstance(self._payload, ListType): return True return False