[Python-Dev] At the interactive port
Guido van Rossum
Tue, 02 May 2000 07:53:10 -0400
> I was planning to submit a patch that adds the built-in routines
> sys.display(obj) would be implemented as 'print repr(obj)'
> and sys.displaytb(tb, exc) would call the same built-in
> traceback printer we all know and love.
Sure. Though I would recommend to separate the patch in two parts,
because their implementation is totally unrelated.
> I assumed that sys.__stdin__ was added to make it easier to
> restore sys.stdin to its original value. In the same vein,
> sys.__display__ and sys.__displaytb__ would be saved references
> to the original sys.display and sys.displaytb.
> I hate to contradict Guido, but i'll gently suggest why i
> like "display" better than "displayhook": "display" is a verb,
> and i prefer function names to be verbs rather than nouns
> describing what the functions are (e.g. "read" rather than
> "reader", etc.)
Good idea. But I hate the "displaytb" name (when I read your message
I had no idea what the "tb" stood for until you explained it).
Hm, perhaps we could do showvalue and showtraceback?
("displaytraceback" is a bit long.)
--Guido van Rossum (home page: http://www.python.org/~guido/)