def set_var(self, vardef):
        """ Set variable to global stylesheet context.
        """
        if not(vardef.default and self.cache['ctx'].get(vardef.name)):
            self.cache['ctx'][vardef.name] = vardef.expression.value
def set_var ( self , vardef ) : if not ( vardef . default and self . cache [ 'ctx' ] . get ( vardef . name ) ) : self . cache [ 'ctx' ] [ vardef . name ] = vardef . expression . value
Set variable to global stylesheet context.