functions don't have a __name__ attribute
diff --git a/Lib/profile.py b/Lib/profile.py
index 35ed63e..f41a8ae 100755
--- a/Lib/profile.py
+++ b/Lib/profile.py
@@ -406,7 +406,7 @@
 
 	# 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)