head_from_fun
Generate signature function from actual function.
def head_from_fun(
fun: Callable[..., Any],
bound: bool = False
) - > str
Generate signature function from actual function.
Parameters
| Name | Type | Description |
|---|---|---|
| fun | Callable[..., Any] | The source function, method, or callable object from which to extract the signature. |
| bound | bool = False | If True, returns a partial function with a dummy object prepended to the arguments, simulating a bound method. |
Returns
| Type | Description |
|---|---|
str | A new function object with an empty body that mimics the original function's signature, including its source definition stored in the _source attribute. |