MCPcopy
hub / github.com/encode/httpx / __eq__

Method __eq__

httpx/_models.py:356–364  ·  view source on GitHub ↗
(self, other: typing.Any)

Source from the content-addressed store, hash-verified

354 return len(self._list)
355
356 def __eq__(self, other: typing.Any) -> bool:
357 try:
358 other_headers = Headers(other)
359 except ValueError:
360 return False
361
362 self_list = [(key, value) for _, key, value in self._list]
363 other_list = [(key, value) for _, key, value in other_headers._list]
364 return sorted(self_list) == sorted(other_list)
365
366 def __repr__(self) -> str:
367 class_name = self.__class__.__name__

Callers

nothing calls this directly

Calls 1

HeadersClass · 0.85

Tested by

no test coverage detected