functions don't have a __name__ attribute

This commit is contained in:
Guido van Rossum 1995-06-22 18:52:35 +00:00
parent f71c79bb85
commit 8afa8245bb
1 changed files with 1 additions and 1 deletions

View File

@ -406,7 +406,7 @@ class Profile:
# This method is more useful to profile a single function call.
def runcall(self, func, *args):
self.set_cmd(func.__name__)
self.set_cmd(`func`)
sys.setprofile(self.trace_dispatch)
try:
apply(func, args)