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

Nov. 5, 2015
3:35 a.m.
Placing current working directory at the beginning of sys.path or the end of sys.path is a tradeoff between two debugging tasks given the error message, `AttributeError: 'module' object has no attribute 'blah'`. The traceback tells you the name of the module. Which would you prefer: (1) needing to notice that you made a module of the same name, or (2) needing to notice that somewhere in the cryptic locations on sys.path there's a module of the same name? I'll pick option 1. Sure, it's tricky the first time it happens, but I've seen complete beginners figure it out after a few minutes.
3422
Age (days ago)
3422
Last active (days ago)
0 comments
1 participants
participants (1)
-
Michael Selik