[Python-Dev] Round Bug in Python 1.6?
Ka-Ping Yee
ping@lfw.org
Thu, 13 Apr 2000 04:22:56 -0700 (PDT)
On Wed, 12 Apr 2000, Andrew M. Kuchling wrote:
> Ka-Ping Yee writes:
> >Here is what i have in mind: provide two hooks
> > __builtins__.display(object)
> >and
> > __builtins__.displaytb(traceback, exception)
>
> Shouldn't these be in sys, along with sys.ps1 and sys.ps2? We don't
> want to add new display() and displaytb() built-ins, do we?
Yes, you're right, they belong in sys. For a while i was under the
delusion that you could customize more than one sub-interpreter by
giving each one a different modified __builtins__, but that's an
rexec thing and completely the wrong approach. Looks like the right
approach to customizing sub-interpreters is to generalize the
interface of code.InteractiveInterpreter and add more options to
code.InteractiveConsole.
sys.display and sys.displaytb would then be specifically for
tweaking the main interactive interpreter only (just like sys.ps1
and sys.ps2). Still quite worth it, i believe, so i'll proceed.
-- ?!ng
"You should either succeed gloriously or fail miserably. Just getting
by is the worst thing you can do."
-- Larry Smith