From 5c8b04dacb3e89f173d0795b83ef035061a08d9e Mon Sep 17 00:00:00 2001 From: pedronis Date: Tue, 25 Nov 2008 18:32:05 +0100 Subject: [PATCH] [svn r60140] simplification, Source will invoke inspect.getsource on its own --HG-- branch : trunk --- py/code/code.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/py/code/code.py b/py/code/code.py index 422425295..147bb3433 100644 --- a/py/code/code.py +++ b/py/code/code.py @@ -90,8 +90,7 @@ class Code(object): """ return a py.code.Source object for the code object's source only """ # return source only for that part of code - import inspect - return py.code.Source(inspect.getsource(self.raw)) + return py.code.Source(self.raw) def getargs(self): """ return a tuple with the argument names for the code object