MCPcopy Index your code
hub / github.com/RustPython/RustPython / A

Class A

Lib/test/test_collections.py:76–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75 def test_dict_missing(self):
76 class A(UserDict):
77 def __missing__(self, key):
78 return 456
79 self.assertEqual(A()[123], 456)
80 # get() ignores __missing__ on dict
81 self.assertIs(A().get(123), None)

Callers 3

test_dict_missingMethod · 0.70
test_reprMethod · 0.70

Calls

no outgoing calls

Tested by 3

test_dict_missingMethod · 0.56
test_reprMethod · 0.56