trying to get class name with self

This commit is contained in:
Dave Schuyler 2005-01-27 00:49:15 +00:00
parent 22a4972fe0
commit e1ee811d5d

View File

@ -108,7 +108,10 @@ def traceFunctionCall(frame):
n = co.co_argcount n = co.co_argcount
if co.co_flags & 4: n = n+1 if co.co_flags & 4: n = n+1
if co.co_flags & 8: n = n+1 if co.co_flags & 8: n = n+1
r=f.f_code.co_name+'(' r=''
if dict.has_key('self'):
r = '%s.'%(dict['self'].__class__.__name__, )
r+="%s("%(f.f_code.co_name, )
comma=0 # formatting, whether we should type a comma. comma=0 # formatting, whether we should type a comma.
for i in range(n): for i in range(n):
name = co.co_varnames[i] name = co.co_varnames[i]