On 08/12/11 14:49, rail shafigulin wrote:
i created a class and in some instances when i use it call some of its
methods i need to print a method name.
I'm curious why you need this?
In most cases if you call a method you know its name...
myObj = MyClass()
myObj.spam()
print "Just called MyClass.spam()"
This would only be useful if you were creating references to methods
dynamically or using callbacks from asynchronous messages or something?
Just wondering what you are doing that requires this?
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor