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

Method __getitem__

Lib/test/test_descr.py:427–428  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

425 for k, v in list(kw.items()):
426 self_local[v] = k
427 def __getitem__(self, key):
428 return self.get(key, 0)
429 def __setitem__(self_local, key, value):
430 self.assertIsInstance(key, int)
431 dict.__setitem__(self_local, key, value)

Callers 4

test_slicesMethod · 0.45
__getitem__Method · 0.45
__getitem__Method · 0.45
__getitem__Method · 0.45

Calls 1

getMethod · 0.95

Tested by

no test coverage detected