Added some more meat to the PEP

Added a section about Jython issues.
This commit is contained in:
Moshe Zadka 2000-11-02 08:05:38 +00:00
parent 00cf9fa6f6
commit 466d2315fe
1 changed files with 21 additions and 1 deletions

View File

@ -1,7 +1,7 @@
PEP: 217
Title: Display Hook for Interactive Use
Version: $Revision$
Author: moshez@math.huji.ac.il (Moshe Zadka)
Author: peps@zadka.site.co.il (Moshe Zadka)
Status: Draft
Type: Standards Track
Python-Version: 2.1
@ -20,6 +20,26 @@ Abstract
Python, so users will have control over the output from the
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?
Local Variables: