MCPcopy Index your code
hub / github.com/python/cpython / SimpleUserDict

Class SimpleUserDict

Lib/test/mapping_tests.py:419–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417 self.assertEqual(d, {1:2, 2:4, 3:4, 5:6})
418
419 class SimpleUserDict:
420 def __init__(self):
421 self.d = {1:1, 2:2, 3:3}
422 def keys(self):
423 return self.d.keys()
424 def __getitem__(self, i):
425 return self.d[i]
426 d.clear()
427 d.update(SimpleUserDict())
428 self.assertEqual(d, {1:1, 2:2, 3:3})

Callers 2

test_updateMethod · 0.70
test_updateMethod · 0.70

Calls

no outgoing calls

Tested by 2

test_updateMethod · 0.56
test_updateMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…