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
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
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