

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

dataset/ETHPy150Open jek/flatland/flatland/util/base.py named_int_factory/VarMisuse@31/66 `name`->`self`