Easily build a great vocabulary without studying! Now on the App Store!
Click here for more info about the app

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'

Short and sweet!

Tagged w/ #python #shortcuts #tips #methods #dynamic programming