Neil> In interactive mode, you are normally interested in the values of Neil> things, not their formatting so it does the right thing. >>> class Dumb: ... def __init__(self, val): ... self.val = val ... def __str__(self): ... return "<Dumb val=%s>" % self.val ... >>> d = Dumb(5) >>> d <__main__.Dumb instance at 0x11042d8> >>> print d <Dumb val=5> It's just repr() vs. str(), but the difference can be significant in many circumstances. Skip
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