diff --git a/h11/_headers.py b/h11/_headers.py index 31da3e2..171f7b5 100644 --- a/h11/_headers.py +++ b/h11/_headers.py @@ -108,7 +108,10 @@ def __bool__(self) -> bool: return bool(self._full_items) def __eq__(self, other: object) -> bool: - return list(self) == list(other) # type: ignore + try: + return list(self) == list(other) # type: ignore + except TypeError: + return NotImplemented def __len__(self) -> int: return len(self._full_items)