(self, other: object)
| 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) |