[Python-ideas] [Python-Dev] If you shadow a module in the standard library that IDLE depends on, bad things happen

Chris Angelico rosuav at gmail.com
Sun Nov 1 08:44:27 EST 2015


On Mon, Nov 2, 2015 at 12:25 AM, Alexander Walters
<tritium-list at sdamon.com> wrote:
>   If you are worrying about shadowing ONLY the standard library - guess
> what?  those names don't change often, and are well known.  Don't use those
> names.

Well known? Okay. No cheating now! Which of these names will shadow
something from the standard library, and which don't?

code.py
cgi.py
chunk.py
cmd.py
cprofile.py
gc.py
html.py
imp.py
mailbox.py
numbers.py
test.py
this.py
types.py
wave.py

Every one of these is a reasonably plausible name for a quick
throw-away script (maybe a test script as you learn how to use
something). How many of them will be problematic?

ChrisA


More information about the Python-ideas mailing list