Why no warnings when re-assigning builtin names?

Philip Semanchuk philip at semanchuk.com
Wed Aug 17 04:16:49 CEST 2011


On Aug 16, 2011, at 9:29 PM, Steven D'Aprano wrote:

> I have no objection to lint tools. But separation of concerns should apply:
> the Python compiler should just compile what I tell it to, the linter
> should warn me if I'm running with scissors.

This point (also made by Ethan) I can agree with. I haven't looked through all the warnings the Python compiler emits, but it seems like it currently doesn't dispense advice (unlike, say, gcc). It only warns about changes in the language & standard library. In that context, asking it to warn about shadowing builtins would be an expansion of scope. 

bye,
Philip


More information about the Python-list mailing list