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

Method insert

tests/sortedcollection.py:147–152  ·  view source on GitHub ↗

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

(self, item)

Source from the content-addressed store, hash-verified

145 return self._items[i:j].count(item)
146
147 def insert(self, item):
148 'Insert a new item. If equal keys are found, add to the left'
149 k = self._key(item)
150 i = bisect_left(self._keys, k)
151 self._keys.insert(i, k)
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'

Callers 5

updateMethod · 0.95
context.pyFile · 0.45
order_kindsFunction · 0.45
insert_rightMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected