From 466d2315feadd5482f0471e6ffc48b31086d1b41 Mon Sep 17 00:00:00 2001 From: Moshe Zadka Date: Thu, 2 Nov 2000 08:05:38 +0000 Subject: [PATCH] Added some more meat to the PEP Added a section about Jython issues. --- pep-0217.txt | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/pep-0217.txt b/pep-0217.txt index 4533bc326..f524ae692 100644 --- a/pep-0217.txt +++ b/pep-0217.txt @@ -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: