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

Class F

Lib/test/test_dict.py:856–859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

854 self.assertEqual(c.exception.args, (42,))
855
856 class F(dict):
857 def __init__(self):
858 # An instance variable __missing__ should have no effect
859 self.__missing__ = lambda key: None
860 f = F()
861 with self.assertRaises(KeyError) as c:
862 f[42]

Callers 1

test_missingMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_missingMethod · 0.56