Runtime Data Attributes

method.__name__

Short name of the underlying function, exposed through a Python bound method. It need not match the attribute name used to access the method.

Formal Syntax & Structure

python syntaxpython
method.__name__

Return Value

str

Value exposed by this attribute; availability and mutability depend on the owner as described.

Working Example

Example Snippetpython
class C:    def f(self): return 7    alias = fm = C().aliasprint(m.__name__)
Python Reference