def __eq__(self, other):
    'Compare two objects (skip parent)'
    if (type(other) != type(self)):
        return False
    if (other.mat_type != self.mat_type):
        return False
    if (other.type_magnetization != self.type_magnetization):
        return False
    if (other.Lmag != self.Lmag):
        return False
    return True
Compare two objects (skip parent)
def __eq__(self, other):
    
    if (type(other) != type(self)):
        return False
    if (other.mat_type != self.mat_type):
        return False
    if (other.type_magnetization != self.type_magnetization):
        return False
    if (other.Lmag != self.Lmag):
        return False
    return True