MCPcopy Create free account
hub / github.com/python-hyper/uritemplate / __init__

Method __init__

uritemplate/orderedset.py:27–32  ·  view source on GitHub ↗
(self, iterable: t.Optional[t.Iterable[str]] = None)

Source from the content-addressed store, hash-verified

25 # an OrderedSet.
26
27 def __init__(self, iterable: t.Optional[t.Iterable[str]] = None):
28 self.__root = root = Link() # sentinel node for doubly linked list
29 root.prev = root.next = root
30 self.__map: t.MutableMapping[str, Link] = {} # key --> link
31 if iterable is not None:
32 self |= iterable # type: ignore
33
34 def __len__(self) -> int:
35 return len(self.__map)

Callers

nothing calls this directly

Calls 1

LinkClass · 0.85

Tested by

no test coverage detected