Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Universo(str):
- def __gt__(self, other): return 'Um universo nunca será maior que o outro...' if type(other) == type(self) else True
- def __lt__(self, other): return 'Um universo nunca será menor que o outro...' if type(other) == type(self) else False
- def __eq__(self, other): return True
- def __ne__(self, other): return False
- universo_a = Universo()
- universo_b = Universo()
- print(universo_b > universo_a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement