New submission from Jeff Zemla: I've found a rather simple bug in the default CPython implementation on Mac OS X 10.9.5
1) Create a new .py file containing: def a(): print q x=5 2) Open Python and run using execfile() then a(). Receive error as expected: File "test.py", line 2, in a print q NameError: global name 'q' is not defined 3) Edit file so that "print q" is not "print x", and save. 4) Run a() (Do not use execfile!) 5) Error: File "test.py", line 2, in a print x NameError: global name 'q' is not defined EXPECTED: Traceback should say "print q" NOT "print x". It is reading from the file. Actually, the error in the file has been corrected-- it is the copy of the program in memory that is faulty. Python 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin ---------- components: Macintosh messages: 237293 nosy: Jeff Zemla, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Wrong variable name in traceback type: compile error versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23594> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com