Moshe proposes to add an overridable function sys.displayhook(obj) which will be called by the interpreter for the PRINT_EXPR opcode, instead of hardcoding the behavior. The default implementation will of course have the current behavior, but this makes it much simpler to experiment with alternatives, e.g. using str() instead of repr() (or to choose between str() and repr() based on the type). Moshe has asked me to pronounce on this PEP. I've thought about it, and I'm now all for it. Moshe (or anyone else), please submit a patch to SF that shows the complete implementation! --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