The source of the constant headache when tracking errors in my Python code is seemingly harmless snippets like this:
list = ['a', 'b', 'c', 'c'] list(set(list))
This fails because I rewrote the list of functions () using a list of variables.
A contrived example, obviously, but the Python dot happily allows me to overwrite inline functions with variables. I understand that this is a very important function in Python, but I would really like the interpreter to warn me when I do this in my code, because I usually do not want to do this.
Can someone suggest a solution (other than being more careful) - how do I keep stumbling about this problem?
function python builtin
Nick loman
source share