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

Method __missing__

Lib/test/test_dict.py:841–842  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

839 # (G) subclass doesn't define __missing__ at all
840 class D(dict):
841 def __missing__(self, key):
842 return 42
843 d = D({1: 2, 3: 4})
844 self.assertEqual(d[1], 2)
845 self.assertEqual(d[3], 4)

Callers 1

test_missingMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected