MCPcopy Create free account
hub / github.com/python/cpython / BadStr

Class BadStr

Lib/test/test_functools.py:569–573  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

567
568 def test_str_subclass_error(self):
569 class BadStr(str):
570 def __eq__(self, other):
571 raise RuntimeError
572 def __hash__(self):
573 return str.__hash__(self)
574
575 def f(**kwargs):
576 return kwargs

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…