[issue1707] probable bug in code.py with Python 3.0a2
Guido van Rossum added the comment: Good catch! Committed revision 59659. I wonder how many other places have the same problem... -- nosy: +gvanrossum resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1707 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1707] probable bug in code.py with Python 3.0a2
Changes by Andre Roberge: __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1707 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1707] probable bug in code.py with Python 3.0a2
Andre Roberge added the comment: I did a quick search on the *.py files in the distribution. I only found two questionable places. 1. site.py has raw_input (python 2.5, line 311) replaced by the more complicated 3 lines (python 3.0a2, lines 313-315) rather than the simpler one-liner replacement. However, I do not see any reason why this could cause problems. 2. pydoc.py: raw_input is still present in 3.0a2 on line 1711; it should be replaced by input imo. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1707 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1707] probable bug in code.py with Python 3.0a2
Guido van Rossum added the comment: site.py is already fixed in svn; it actually did cause problems, see issue #1667. I fixed pydoc.py. Committed revision 59660. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1707 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1707] probable bug in code.py with Python 3.0a2
New submission from Andre Roberge: There appears to be a bug in code.py in Python 3.0a2/a1. I believe that the body of InteractiveConsole().raw_input() should be changed from sys.stdout.write(prompt) sys.stdout.flush() return sys.stdin.readline() to return input(prompt) Here's a sample session. Python 3.0a1 (py3k, Nov 27 2007, 07:40:26) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type help, copyright, credits or license for more information. import code console = code.InteractiveConsole() console.interact() Python 3.0a1 (py3k, Nov 27 2007, 07:40:26) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type help, copyright, credits or license for more information. (InteractiveConsole) for i in range(3): ... print(i) 0 1 2 # Notice how I could only enter one line inside the loop. # Let's try again, with a different definition of raw_input() import code console = code.InteractiveConsole() console.raw_input = input console.interact() Python 3.0a1 (py3k, Nov 27 2007, 07:40:26) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type help, copyright, credits or license for more information. (InteractiveConsole) for i in range(3): ... print(i) ... 0 1 2 # Notice how I had to enter an empty line to end the loop - as it should be. The same problem affects function definitions - it is impossible to define a function body with more than one line when running code.interact() -- components: Library (Lib) messages: 59030 nosy: aroberge severity: normal status: open title: probable bug in code.py with Python 3.0a2 versions: Python 3.0 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1707 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com