In Python we care about the behavior of an object more than the type of an object. We say, "if it looks like a duck and walks like a duck, it's a duck." This idea is called duck typing.| www.pythonmorsels.com
Want to customize what "equality" means for your class instances in Python? Implement a __eq__ method! Make sure to return NotImplemented as appropriate though.| www.pythonmorsels.com