is_multipart(): Use isinstance() instead of type equality.

This commit is contained in:
Barry Warsaw 2002-09-28 20:41:39 +00:00
parent c494549566
commit 4ece778bbc

View file

@ -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