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

Class A

Lib/test/test_collections.py:77–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75
76 def test_dict_missing(self):
77 class A(UserDict):
78 def __missing__(self, key):
79 return 456
80 self.assertEqual(A()[123], 456)
81 # get() ignores __missing__ on dict
82 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