class Symbol:

    def __init__(self, value):
        self.value = value

def __eq__(self, other):
    return isinstance(other, Symbol) and other.value == self.value

def __repr__(self):
    return '<sym: %r>' % self.value

def __str__(self):
    pass
Proper way of having a unique identifier in Python?