class documentation

class IdMapper: (source)

View In Hierarchy

Generate integer ids for objects.

Unlike id(), these start from 0 and increment by 1, and ids won't get reused across the life-time of IdMapper.

Assume objects don't redefine __eq__ or __hash__.

Method __init__ Undocumented
Method id Undocumented
Instance Variable id​_map Undocumented
Instance Variable next​_id Undocumented
def __init__(self): (source)

Undocumented

def id(self, o): (source)

Undocumented

Parameters
o:objectUndocumented
Returns
intUndocumented
id_map: Dict[object, int] = (source)

Undocumented

next_id: int = (source)

Undocumented