def endPointVote(self):
self.getchan().msg("Voting has ended!")
- votelist = sorted(self.voteamounts.items(), key=lambda item: item[1]) #sort into list of tuples: [(option, number_of_votes), ...]
+ votelist = sorted(self.voteamounts.items(), key=lambda item: (item[1], -item[0])) #sort into list of tuples: [(option, number_of_votes), ...]
for i in range(len(votelist)-1):
item = votelist[i]
self.getchan().msg("%s place: %s (%s votes)" % (len(votelist)-i, item[0], item[1]))