Esempio n. 1
0
 def source(self):
     if hasattr(self, "_source"):
         return self._source
     from rpython.tool.sourcetools import getsource
     self.func  # can raise AttributeError
     src = getsource(self.func)
     if src is None:
         raise AttributeError('source not found')
     return src
Esempio n. 2
0
 def source(self):
     if hasattr(self, "_source"):
         return self._source
     from rpython.tool.sourcetools import getsource
     self.func    # can raise AttributeError
     src = getsource(self.func)
     if src is None:
         raise AttributeError('source not found')
     return src