Get Method Name as String in Python
Here is how to get the string representation of a method in Python def my_method_name(): print "Hello World" my_method_name.__name__ # => 'my_method_name' Short and sweet!
Written by Sean Behan on 03/04/2017