class A():
def __init__(self, fn):
self.fn = fn
a1 = A('a')
a2 = A('a')
b = A('b')
print (a1==a2)
print (a1==b)
result should be True for first but False for second. I knew some way to implement singleton in Python. But all of them only generate one instance for every call. How do we link the __new__ method to __init__?