DEV: true if self is an answer from other
557321
def answers(self, other):
        """"""
        if other.__class__ == self.__class__:
            return (other.service + 0x40) == self.service or \
                   (self.service == 0x7f and
                    self.request_service_id == other.service)
        return False
993309
def thanks(self, answer, thanks=True):
        
        from .answer import Answer
        if isinstance(answer, Answer) is False:
            raise ValueError('argument answer need to be Zhihu.Answer object.')
        if answer.author.url == self.url:
                return False
        data = {
            '_xsrf': answer.xsrf,
            'aid': answer.aid
        }
        res = self._session.post(Thanks_Url if thanks else Cancel_Thanks_Url,
                                 data=data)
        return res.json()['r'] == 0
1006655
def respond_to?(method, *args, &block)
      const_methods = @constructor.class.instance_methods(false)
      if const_methods.include? method
        true
      else
        super
      end
    end
1165745
def answers(self, other):
        """"""
        if other.__class__ == self.__class__:
            return (other.service + 0x40) == self.service or \
                   (self.service == 0x7f and
                    (self.requestServiceId == other.service))
        return 0
992592
def is_correctness_available(self, question_id):
        """"""
        response = self.get_response(question_id)
        if response.is_answered():
            item = self._get_item(response.get_item_id())
            return item.is_correctness_available_for_response(response)
        return False
1258870
def is_equal(self, other):
        
        other = StringCell.coerce(other)
        empties = [None,'']
        if self.value in empties and other.value in empties:
            return True
        return self.value == other.value
36719
def match(self, *args):
        """"""
        if self.fall or not args:
            return True
        elif self.value in args: # changed for v1.5, see below
            self.fall = True
            return True
        else:
            return False
1145665
def answered_by(self, rec):
        """"""
        return self.clazz == rec.clazz and \
                (self.type == rec.type or self.type == _TYPE_ANY) and \
                self.name == rec.name
314080
def _eq(self, other):
        """"""
        return (self.type, self.children) == (other.type, other.children)
1235693
def is_correct(self, question_id):
        """"""
        response = self.get_response(question_id=question_id)
        if response.is_answered():
            item = self._get_item(response.get_item_id())
            return item.is_response_correct(response)
        raise errors.IllegalState()
1131242
def has_response?(answer_sheet = nil)
      if answer_sheet.present?
        answers = responses(answer_sheet)
      else
        answers = Answer.where(:question_id => self.id)
      end
      return false if answers.length == 0
      answers.each do |answer|   # loop through Answers
        value = answer.is_a?(Answer) ? answer.value : answer
        return true if (value.is_a?(FalseClass) && value === false) || value.present? 
      end
      return false
    end
92334
def equality(self, other):
        """"""
        if not len(self) == len(other):
            return False
        return super().equality(other)
770883
def is_entailed_by(self, other):
        
        other = BoolCell.coerce(other)
        if self.value == U or other.value == self.value:
            return True
        return False
973687
def answer(self):
        
        if self.ringing:
            self._gsmModem.write('ATA')
            self.ringing = False
            self.answered = True
        return self
1348491
def check(self):
        
        for character, followers in self.items():
            for follower in followers:
                if follower not in self:
                    return False
        return True
1372421
def parent_of?(child)
      page = self
      if child
        if page.id == child.parent_id
          true
        else
          child.parent.nil? ? false : page.parent_of?(child.parent)
        end
      end
    end
943396
def is_equal(self, other):
        
        print type(self.prototype), type(other.prototype)
        if not self.prototype.is_equal(other.prototype):
            print "Different prototypes"
            return False
        if self.exclude != other.exclude:
            print "Different excludes"
            return False
        if self.include != other.include:
            print "Different includes"
            return False
        return True