def __eq__(self, other):
    """Returns True if other is a Document with identical contents."""
    if not isinstance(other, type(self)):
      return NotImplemented
    else:
      return self._contents == other._contents
Returns True if other is a Document with identical contents.
concordia/document/document.py