On Mon, Mar 12, 2018 at 10:01 PM, Tim Peters <tim.peters at gmail.com> wrote: > At heart, the Fraction() constructor is _all about_ creating integer > ratios, so is the most natural place to put knowledge of how to do so. > A protocol for allowing new numeric types to get converted to Fraction > would be more generally useful than just a weird method only datetime > uses ;-) > Ironically, the various Fraction constructors *calls* as_integer_ratio() for floats and Decimals. From which follows IMO that the float and Decimal classes are the right place to encapsulate the knowledge on how to do it. -- --Guido van Rossum (python.org/~guido) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20180313/90969455/attachment.html>
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