MCPcopy Index your code
hub / github.com/RustPython/RustPython / __setitem__

Method __setitem__

Lib/test/test_ordered_dict.py:1076–1081  ·  view source on GitHub ↗
(self, key, value)

Source from the content-addressed store, hash-verified

1074 return value
1075
1076 def __setitem__(self, key, value):
1077 self.counts['set'] += 1
1078 while key not in self and len(self) >= self.size:
1079 self.popitem(last=False)
1080 super().__setitem__(key, value)
1081 self.move_to_end(key)
1082
1083 def __delitem__(self, key):
1084 self.counts['del'] += 1

Callers 1

test_dict_setitemMethod · 0.45

Calls 4

lenFunction · 0.85
superClass · 0.85
move_to_endMethod · 0.80
popitemMethod · 0.45

Tested by

no test coverage detected