Skip to main content

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

NameTypeDescription
*variablesstrA 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

TypeDescription
functionA decorator function that wraps the target function and marks its variables as sensitive.