MCPcopy Create free account
hub / github.com/scanny/python-pptx / __eq__

Method __eq__

src/pptx/oxml/xmlchemy.py:66–76  ·  view source on GitHub ↗
(self, other: object)

Source from the content-addressed store, hash-verified

64 _xml_elm_line_patt = re.compile(r"( *</?[\w:]+)(.*?)(/?>)([^<]*</[\w:]+>)?")
65
66 def __eq__(self, other: object) -> bool:
67 if not isinstance(other, str):
68 return False
69 lines = self.splitlines()
70 lines_other = other.splitlines()
71 if len(lines) != len(lines_other):
72 return False
73 for line, line_other in zip(lines, lines_other):
74 if not self._eq_elm_strs(line, line_other):
75 return False
76 return True
77
78 def __ne__(self, other: object) -> bool:
79 return not self.__eq__(other)

Callers 1

__ne__Method · 0.95

Calls 1

_eq_elm_strsMethod · 0.95

Tested by

no test coverage detected