'Initialize a new set of vote effects.
If a dict of previously-determined effects are passed in as `effects`,
those will be used instead of calculating the effects.'

def __init__(self, vote, effects=None):

    self.note_codes = {}
    self.validator = None
    if effects:
        self.affects_score = effects.pop('affects_score')
        self.affects_karma = effects.pop('affects_karma')
        self.other_effects = effects
    else:
        hook = hooks.get_hook('vote.get_validator')
        self.validator = hook.call_until_return(vote=vote, effects=self)
        self.affects_score = self.determine_affects_score(vote)
        self.affects_karma = self.determine_affects_karma(vote)
        self.other_effects = self.determine_other_effects(vote)
    self.karma_change = 0
    if self.affects_karma:
        if vote.is_upvote:
            self.karma_change = 1
        elif vote.is_downvote:
            self.karma_change = (-1)
