[pypy-svn] r9313 - pypy/branch/dist-interpapp/pypy/module/sys2

arigo at codespeak.net arigo at codespeak.net
Fri Feb 18 18:45:30 CET 2005


Author: arigo
Date: Fri Feb 18 18:45:29 2005
New Revision: 9313

Modified:
   pypy/branch/dist-interpapp/pypy/module/sys2/hook.py
Log:
sys.displayhook() needs to print the repr() of its argument.
(How do we write a test for that?)



Modified: pypy/branch/dist-interpapp/pypy/module/sys2/hook.py
==============================================================================
--- pypy/branch/dist-interpapp/pypy/module/sys2/hook.py	(original)
+++ pypy/branch/dist-interpapp/pypy/module/sys2/hook.py	Fri Feb 18 18:45:29 2005
@@ -5,7 +5,7 @@
         space.setitem(space.builtin.w_dict, space.wrap('_'), w_obj)
         # NB. this is slightly more complicated in CPython,
         # see e.g. the difference with  >>> print 5,; 8
-        print_item_to(space, w_obj, sys_stdout(space))
+        print_item_to(space, space.repr(w_obj), sys_stdout(space))
         print_newline_to(space, sys_stdout(space))
 
 __displayhook__ = displayhook  # this is exactly like in CPython



More information about the Pypy-commit mailing list