MCPcopy Create free account
hub / github.com/Mew233/pairwise / __init__

Method __init__

pairwise/utilitis.py:572–578  ·  view source on GitHub ↗
(self, items)

Source from the content-addressed store, hash-verified

570class Mapping():
571
572 def __init__(self, items):
573 self.item2idx={}
574 self.idx2item=[]
575
576 for idx, item in enumerate(items):
577 self.item2idx[item]=idx
578 self.idx2item.append(item)
579
580 def add(self,item):
581 if item not in self.idx2item:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected