Jim Benson <jbenson at lowell.edu> wrote in message news:<mailman.1907.1092865845.5135.python-list at python.org>... > > How does one get the class and method name from within > a method? >>> import sys >>> class C: ... def foo(self): ... print self.__class__.__name__, sys._getframe().f_code.co_name ... >>> C().foo() C foo Neal