A source of constant headache when tracking down bugs in my Python code are seemingly innocuous snippets like this:
list = ['a', 'b', 'c', 'c']
list(set(list))
This fails because I've overwritten the function list() with the variable list.
A contrived example obviously, but the point is Python happily lets me overwrite built-in functions with variables. I realise this is a crucial feature in Python but I would quite like it if the interpreter would warn me when I do it in my code as I usually don't mean to do this.
Can anyone suggest a solution (other than just being more careful) - as I keep tripping over this problem?