MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / __eq__

Method __eq__

example_code/item_051.py:360–364  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

358
359
360 def __eq__(self, other):
361 return (
362 type(self) == type(other)
363 and self._astuple() == other._astuple()
364 )
365
366
367print("Example 38")

Callers

nothing calls this directly

Calls 1

_astupleMethod · 0.95

Tested by

no test coverage detected