MCPcopy Create free account
hub / github.com/apify/crawlee-python / __eq__

Method __eq__

src/crawlee/sessions/_session.py:88–92  ·  view source on GitHub ↗

Compare two sessions for equality.

(self, other: object)

Source from the content-addressed store, hash-verified

86 return f'<{self.__class__.__name__} {self.get_state(as_dict=False)}>'
87
88 def __eq__(self, other: object) -> bool:
89 """Compare two sessions for equality."""
90 if not isinstance(other, Session):
91 return NotImplemented
92 return self.get_state(as_dict=True) == other.get_state(as_dict=True)
93
94 def __hash__(self) -> int:
95 """Return hash based on the session state."""

Callers

nothing calls this directly

Calls 1

get_stateMethod · 0.95

Tested by

no test coverage detected