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

Class MyOD

Lib/test/test_ordered_dict.py:487–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485 OrderedDict = self.OrderedDict
486 # Verify that subclasses can override update() without breaking __init__()
487 class MyOD(OrderedDict):
488 def update(self, *args, **kwds):
489 raise Exception()
490 items = [('a', 1), ('c', 3), ('b', 2)]
491 self.assertEqual(list(MyOD(items).items()), items)
492

Callers 2

test_override_updateMethod · 0.85

Calls

no outgoing calls

Tested by 2

test_override_updateMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…