parameters: (self, voter_answers, result, is_delegated)
docstring: Add to the count a vote from a voter
docstring_summary: Add to the count a vote from a voter
docstring_tokens: Add to the count a vote from a voter
function: def add_vote(self, voter_answers, result, is_delegated):
          '''
          Add to the count a vote from a voter
          '''
          answers = [self.answer2id(a) for a in voter_answers[self.question_num]['choices']]
  
          # we got ourselves an invalid vote, don't count it
          if -1 in answers:
              return
  
          ballot = self.find_ballot(answers)
          # if ballot found, increment the count. Else, create a ballot and add it
          if ballot:
              ballot['votes'] += 1
          else:
              self.ballots.append(dict(votes=1, answers=answers))
function_tokens: def add_vote ( self , voter_answers , result , is_delegated ) : answers = [ self . answer2id ( a ) for a in voter_answers [ self . question_num ] [ 'choices' ] ] # we got ourselves an invalid vote, don't count it if - 1 in answers : return ballot = self . find_ballot ( answers ) # if ballot found, increment the count. Else, create a ballot and add it if ballot : ballot [ 'votes' ] += 1 else : self . ballots . append ( dict ( votes = 1 , answers = answers ) )