ppperry added the comment:

Another example of this overzealous removing is when you create a module named 
rpc, run, RemoteDebugger, or bdb. 
For example (in this environment, a file in the current directory named rpc.py 
exists and refers to the undefined name "bar"):
>>>import rpc
Traceback (most recent call last):
  File "<pyshell#x>", line 1, in <module>
    import rpc
NameError: name 'bar' is not defined

The correct traceback is:
Traceback (most recent call last):
  File "<pyshell#x>", line 1, in <module>
  File "rpc.py", line 2, in <module>
    bar
NameError: name 'bar' is not defined

The IDLE debugger also refuses to debug code in the above file (only if it is 
named "rpc" not any of the other names).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24252>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to