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

Method __missing__

Lib/test/test_dynamic.py:143–144  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

141 # https://github.com/python/cpython/issues/91625
142 class MyGlobals(dict):
143 def __missing__(self, key):
144 return int(key.removeprefix("_number_"))
145
146 # Need more than 256 variables to use EXTENDED_ARGS
147 variables = 400

Callers

nothing calls this directly

Calls 1

removeprefixMethod · 0.45

Tested by

no test coverage detected