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

Moshe Zadka python-dev@python.org
Thu, 2 Nov 2000 15:53:53 -0800


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

Modified Files:
	pep-0217.txt 
Log Message:
Added Jython solution
Added abstract interface specification.
(Motivation is in the abstract)


Index: pep-0217.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0217.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pep-0217.txt	2000/11/02 08:05:38	1.3
--- pep-0217.txt	2000/11/02 23:53:51	1.4
***************
*** 21,24 ****
--- 21,35 ----
      interactive interpreter.
  
+ Interface
+ 
+     The current Python solution has worked for many users, and this
+     should not break it. Therefore, in the default configuration,
+     nothing will change in the REPL loop. To change the way the
+     interpreter prints interactively entered expressions, users
+     will have to rebind sys.displayhook to a callable object.
+     The result of calling this object with the result of the
+     interactively entered expression should be print-able,
+     and this is what will be printed on sys.stdout.
+ 
  Solution
  
***************
*** 31,44 ****
          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?
  
  
--- 42,52 ----
          if o is None:
              return
+         __builtin__._ = None
+         print `o`
          __builtin__._ = o
          
  Jython Issues
  
!     The method Py.printResult will be similarily changed.