name_of_callable

menpo.base.name_of_callable(c)[source]

Return the name of a callable (function or callable class) as a string. Recurses on partial function to attempt to find the wrapped methods actual name.

Parameters

c (callable) – A callable class or function, or any valid Python object that can be wrapped with partial.

Returns

name (str) – The name of the passed object.