def __hash__(self): if self.args: if isinstance(self.args, dict): sargs = encoder.encode(self.args) else: sargs = ', '.join(encoder.encode(a) for a in self.args) else: sargs = None return hash((hasattr(self, 'src') and self.src or '') + (sargs or ''))
def prepare(self): if not self.src: args = '' if isinstance(self.args, dict): args = encoder.encode(self.args) elif self.args: args = ', '.join(encoder.encode(a) for a in self.args) self.src = '%s(%s)' % (self.function, args) super(_JSFuncCall, self).prepare()