MCPcopy Index your code
hub / github.com/clips/pattern / push

Method push

pattern/text/search.py:192–198  ·  view source on GitHub ↗

Adds a new item from the given (key, value)-tuple. If the key exists, pushes the updated item to the head of the dict.

(self, (k, v))

Source from the content-addressed store, hash-verified

190 return cls((k, v) for k in keys)
191
192 def push(self, (k, v)):
193 """ Adds a new item from the given (key, value)-tuple.
194 If the key exists, pushes the updated item to the head of the dict.
195 """
196 if k in self:
197 self.__delitem__(k)
198 self.__setitem__(k, v)
199 append = push
200
201 def __iter__(self):

Callers 11

canvas.jsFile · 0.45
gridFunction · 0.45
blendFunction · 0.45
widgetFunction · 0.45
QFunction · 0.45
graph.jsFile · 0.45
edgesFunction · 0.45
flattenFunction · 0.45
appendMethod · 0.45
processFunction · 0.45
test_odictMethod · 0.45

Calls 2

__delitem__Method · 0.95
__setitem__Method · 0.95

Tested by 1

test_odictMethod · 0.36