def named_int_factory(name, value, doc=''):
    report_name = lambda self: name
    cls = type(name, (int,), dict(
        __doc__=doc, __str__=report_name, __repr__=report_name))
    return cls(value)
Return a unique integer *value* with a str() and repr() of *name*.
dataset/ETHPy150Open jek/flatland/flatland/util/base.py/named_int_factory