def func_info(func_object):
    """
    @type func_object: function
    """
    if func_object is None:
        raise TypeError("func_info needs function")

    fname = func_object.__code__.co_filename
    linenr = func_object.__code__.co_firstlineno
    funcname = func_object.__code__.co_name
    return fname, funcname, linenr
def func_info ( func_object ) : if func_object is None : raise TypeError ( "func_info needs function" ) fname = func_object . __code__ . co_filename linenr = func_object . __code__ . co_firstlineno funcname = func_object . __code__ . co_name return fname , funcname , linenr
@type func_object: function