def __eq__(self, other):
    'testing if we are working in the same field'
    try:
        return (self.p == other.p)
    except:
        return False
testing if we are working in the same field
def __eq__(self, other):
    
    try:
        return (self.p == other.p)
    except:
        return False