In order to support Python 3 requirements, when __eq__() is defined, __hash__() is also needed for consistency for checking object equality.