#NEWLINE# def sensitive_variables( * variables ) : #NEWLINE# #INDENT# "\n    Indicates which variables used in the decorated function are sensitive, so\n    that those variables can later be treated in a special way, for example\n    by hiding them when logging unhandled exceptions.\n\n    Two forms are accepted:\n\n    * with specified variable names:\n\n        @sensitive_variables('user', 'password', 'credit_card')\n        def my_function(user):\n            password = user.pass_word\n            credit_card = user.credit_card_number\n            ...\n\n    * without any specified variable names, in which case it is assumed that\n      all variables are considered sensitive:\n\n        @sensitive_variables()\n        def my_function()\n            ...\n    " #NEWLINE# def decorator( func ) : #NEWLINE# #INDENT# @ functools . wraps ( func ) #NEWLINE# def sensitive_variables_wrapper( * func_args , **func_kwargs ) : #NEWLINE# #INDENT# if variables : #NEWLINE# #INDENT# sensitive_variables_wrapper . sensitive_variables = variables #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# sensitive_variables_wrapper . sensitive_variables = '__ALL__' #NEWLINE# #UNINDENT# return func ( * func_args , ** func_kwargs ) #NEWLINE# #UNINDENT# return sensitive_variables_wrapper #NEWLINE# #UNINDENT# return decorator