MCPcopy Create free account
hub / github.com/bpython/bpython / __getitem__

Method __getitem__

bpython/test/test_simpleeval.py:51–52  ·  view source on GitHub ↗
(self, index)

Source from the content-addressed store, hash-verified

49
50 class TrickyDict(dict):
51 def __getitem__(self, index):
52 self.fail("doing key lookup isn't safe")
53
54 with self.assertRaises(ValueError):
55 simple_eval("a[1]", {"a": TrickyDict()})

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected