MCPcopy Index your code
hub / github.com/datacamp/pythonwhat / __init__

Method __init__

pythonwhat/State.py:279–286  ·  view source on GitHub ↗
(self, context_code="")

Source from the content-addressed store, hash-verified

277 _context_cache = dict()
278
279 def __init__(self, context_code=""):
280 self._parser_cache = dict()
281 context_ast = getattr(self._context_cache, context_code, None)
282 if context_ast is None:
283 context_ast = self._context_cache[context_code] = self.parse(context_code)[
284 1
285 ]
286 self.context_mappings = self._getx(FunctionParser, "mappings", context_ast)
287
288 def find(self, name, node, *args, **kwargs):
289 return getattr(self, name)(node)

Callers

nothing calls this directly

Calls 2

parseMethod · 0.95
_getxMethod · 0.95

Tested by

no test coverage detected