should be:
`type(self) == type(other) and self.ttype == other.ttype`

then you can remove line 55-56