> I was planning to submit a patch that adds the built-in routines > > sys.display > sys.displaytb > > sys.__display__ > sys.__displaytb__ > > 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. Good idea. > 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/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4