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

Method __getitem__

Lib/test/test_ordered_dict.py:1068–1072  ·  view source on GitHub ↗
(self, item)

Source from the content-addressed store, hash-verified

1066 self.counts = dict.fromkeys(('get', 'set', 'del'), 0)
1067
1068 def __getitem__(self, item):
1069 self.counts['get'] += 1
1070 value = super().__getitem__(item)
1071 self.move_to_end(item)
1072 return value
1073
1074 def __setitem__(self, key, value):
1075 self.counts['set'] += 1

Callers

nothing calls this directly

Calls 2

superClass · 0.85
move_to_endMethod · 0.80

Tested by

no test coverage detected