MCPcopy Create free account
hub / github.com/grantjenks/python-sortedcontainers / insert_right

Method insert_right

tests/sortedcollection.py:154–159  ·  view source on GitHub ↗

Insert a new item. If equal keys are found, add to the right

(self, item)

Source from the content-addressed store, hash-verified

152 self._items.insert(i, item)
153
154 def insert_right(self, item):
155 'Insert a new item. If equal keys are found, add to the right'
156 k = self._key(item)
157 i = bisect_right(self._keys, k)
158 self._keys.insert(i, k)
159 self._items.insert(i, item)
160
161 def remove(self, item):
162 'Remove first occurence of item. Raise ValueError if not found'

Callers 1

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected