Exemple #1
0
 def __hrepr__(self, H, hrepr):
     if len(self.inputs) == 2 and \
             isinstance(self.inputs[0], Constant) and \
             self.inputs[0].value is primops.return_:
         return hrepr.hrepr_nowrap(self.inputs[1])['node-return']
     else:
         return super(Apply, self).__hrepr__(H, hrepr)
Exemple #2
0
 def __hrepr__(self, H, hrepr):
     if (len(self.inputs) == 2 and isinstance(self.inputs[0], Constant)
             and self.inputs[0].value is primops.return_):
         if hasattr(hrepr, "hrepr_nowrap"):
             return hrepr.hrepr_nowrap(self.inputs[1])["node-return"]
         else:
             return hrepr(self.inputs[1])["node-return"]
     else:
         return super(Apply, self).__hrepr__(H, hrepr)