sensitive_variables
Indicate which variables used in the decorated function are sensitive so that those variables can later be treated in a special way, for example by hiding them when logging unhandled exceptions.
def sensitive_variables(
*variables: str
) - > function
Indicate which variables used in the decorated function are sensitive so that those variables can later be treated in a special way, for example by hiding them when logging unhandled exceptions.
Parameters
| Name | Type | Description |
|---|---|---|
| *variables | str | A variable-length list of strings representing the names of local variables to be treated as sensitive. If no names are provided, all variables in the function are considered sensitive. |
Returns
| Type | Description |
|---|---|
function | A decorator function that wraps the target function and marks its variables as sensitive. |