def _formatter_class(name, value):
    """Format the "klass" variable and value on class methods.
    """
    __mname = value.__module__
    if __mname != '__main__':
        return "%s = <type '%s.%s'>" % (name, __mname, value.__name__)
    else:
        return "%s = <type '%s'>" % (name, value.__name__)
Format the "klass" variable and value on class methods.
    
recipes/Python/577551_Trace_decorator_for_debugging/recipe-577551.py