コード例 #1
0
ファイル: ish.py プロジェクト: snoack/ish
 def __eq__(self, other):
     if self._is_image(other):
         return detect_and_predict_face_emotion(other) == self._type
     raise Maybe(other)
コード例 #2
0
ファイル: ish.py プロジェクト: guybles/stupid-python-tricks
 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))