[Python-checkins] CVS: python/nondist/peps pep-0217.txt,1.2,1.3

Moshe Zadka python-dev@python.org
Thu, 2 Nov 2000 00:05:41 -0800


Update of /cvsroot/python/python/nondist/peps
In directory slayer.i.sourceforge.net:/tmp/cvs-serv24852

Modified Files:
	pep-0217.txt 
Log Message:
Added some more meat to the PEP
Added a section about Jython issues.


Index: pep-0217.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0217.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** pep-0217.txt	2000/08/23 05:50:32	1.2
--- pep-0217.txt	2000/11/02 08:05:38	1.3
***************
*** 2,6 ****
  Title: Display Hook for Interactive Use
  Version: $Revision$
! Author: moshez@math.huji.ac.il (Moshe Zadka)
  Status: Draft
  Type: Standards Track
--- 2,6 ----
  Title: Display Hook for Interactive Use
  Version: $Revision$
! Author: peps@zadka.site.co.il (Moshe Zadka)
  Status: Draft
  Type: Standards Track
***************
*** 21,24 ****
--- 21,44 ----
      interactive interpreter.
  
+ Solution
+ 
+     The bytecode PRINT_EXPR will call sys.displayhook(POP())
+     A displayhook() will be added to the sys builtin module, which is
+     equivalent to
+ 
+     import __builtin__
+     def displayhook(o):
+         if o is None:
+             return
+         __builtin__._ = o
+         print o
+         
+ Jython Issues
+ 
+     The author knows too little about Jython, but it is very important
+     to be compatible with it. displayhook will have to be added to sys,
+     but since Jython works with Java bytecodes, the compiler would have
+     to be changed too, or maybe not.
+     Barry?