[issue39225] Python should warn when a global/local has the same name as a builtin

2020-01-06 Thread Brett Cannon
Brett Cannon added the comment: I agree with Eric that this is the realm of linters as there are legitimate reasons sometimes to mask and redefine built-ins. Thanks for the idea, Reuven, but I'm closing the issue. -- nosy: +brett.cannon resolution: -> rejected stage: -> resolved

[issue39225] Python should warn when a global/local has the same name as a builtin

2020-01-05 Thread Eric V. Smith
Eric V. Smith added the comment: On the other hand, this would generate a lot of warnings for users of libraries, who aren't able to do anything about it. I've got tons of existing code that uses the names of builtins as locals, to no harm. And as builtins are added, new warnings would pop

[issue39225] Python should warn when a global/local has the same name as a builtin

2020-01-05 Thread Reuven Lerner
New submission from Reuven Lerner : Newcomers to Python are often frustrated and surprised when they define variables such as "sum" and "list", only to discover that they've masked access builtins of the same name. External code checkers do help, but those don't work in Jupyter or other