> So we could have: > > >>> repr(r) > '3/5r' # or 'rat(3, 6)' Surely you meant 'rat(3, 5)'. :-) > >>> str(r) > '3/5' I'd like at least one of those return '0.6' or '0.6r'. I think str(r) should return '0.6', and then repr(r) could return '3/5r'. For values that require approximation as decimal, I'd say use the same number of digits that str() of a float currently uses (about 12 I believe). So str(1/3r) should be '0.333333333333'. --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