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

Method __init__

pattern/text/search.py:178–186  ·  view source on GitHub ↗

A dictionary with ordered keys (first-in last-out).

(self, items=[])

Source from the content-addressed store, hash-verified

176class odict(dict):
177
178 def __init__(self, items=[]):
179 """ A dictionary with ordered keys (first-in last-out).
180 """
181 dict.__init__(self)
182 self._o = [] # List of ordered keys.
183 if isinstance(items, dict):
184 items = reversed(items.items())
185 for k, v in items:
186 self.__setitem__(k, v)
187
188 @classmethod
189 def fromkeys(cls, keys=[], v=None):

Callers

nothing calls this directly

Calls 3

__setitem__Method · 0.95
__init__Method · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected