MCPcopy Create free account
hub / github.com/nodejs/node / __getitem__

Method __getitem__

tools/inspector_protocol/jinja2/runtime.py:299–306  ·  view source on GitHub ↗

Lookup a variable or raise `KeyError` if the variable is undefined.

(self, key)

Source from the content-addressed store, hash-verified

297 return name in self.vars or name in self.parent
298
299 def __getitem__(self, key):
300 """Lookup a variable or raise `KeyError` if the variable is
301 undefined.
302 """
303 item = self.resolve_or_missing(key)
304 if item is missing:
305 raise KeyError(key)
306 return item
307
308 def __repr__(self):
309 return '<%s %s of %r>' % (

Callers

nothing calls this directly

Calls 1

resolve_or_missingMethod · 0.95

Tested by

no test coverage detected