Moshe Zadka writes: > 1. I'm not sure what to call this function. Currently, I call it > __print_expr__, but I'm not sure it's a good name It's not. ;) How about printresult? Another thing to think about is interface; formatting a result and "printing" it may be different, and you may want to overload them separately in an environment like IDLE. Some people may want to just say: import sys sys.formatresult = str I'm inclined to think that level of control may be better left to the application; if one hook is provided as you've described, the application can build different layers as appropriate. > 2. I haven't yet supplied a default in __builtin__, so the user *must* > override this. This is unacceptable, of course. You're right! But a default is easy enough to add. I'd put it in sys instead of __builtin__ though. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> Corporation for National Research Initiatives
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