def __eq__(self, other): if self._is_image(other): return detect_and_predict_face_emotion(other) == self._type raise Maybe(other)
def __eq__(self, other): if detect_and_predict_face_emotion is not None and _is_image(other): return detect_and_predict_face_emotion(other) == 0 raise ValueError( "Maybe! ({!r} is not recognised)".format(other))