def remove_token(self, token_stack, token):
        """Remove last occurance of token from stack"""
        token_stack.reverse()
        try:
            token_stack.remove(token)
            retval = True
        except ValueError:
            retval = False
        token_stack.reverse()
        return retval
def remove_token ( self , token_stack , token ) : token_stack . reverse ( ) try : token_stack . remove ( token ) retval = True except ValueError : retval = False token_stack . reverse ( ) return retval
Remove last occurance of token from stack