def update_score(self, node, addToScore):
        """\
        adds a score to the gravityScore Attribute we put on divs
        we'll get the current score then add the score
        we're passing in to the current
        """
        current_score = 0
        score_string = self.parser.getAttribute(node, 'gravityScore')
        if score_string:
            current_score = int(score_string)

        new_score = current_score + addToScore
        self.parser.setAttribute(node, "gravityScore", str(new_score))
def update_score ( self , node , addToScore ) : current_score = 0 score_string = self . parser . getAttribute ( node , 'gravityScore' ) if score_string : current_score = int ( score_string ) new_score = current_score + addToScore self . parser . setAttribute ( node , "gravityScore" , str ( new_score ) )
\
        adds a score to the gravityScore Attribute we put on divs
        we'll get the current score then add the score
        we're passing in to the current