Consider the following code:
def localize(value, localize=None):
# do something with the localize argument
The localize
variable contains information whether the global localization setting should be respected or not. It is called by the same name through three layers of code. What's the lesser evil,
- shadow the function name with the argument name, or
- use a different name in this function than in all the rest of the code base, despite them having absolutely the same meaning?
The localize
function doesn't use recursion, so not being able to call itself is not a problem.
/edit: changing the function name is out of the question, since it's public API. The only wiggle room is in the argument name.