[issue37822] Add math.as_integer_ratio()

Raymond Hettinger report at bugs.python.org
Sun Aug 11 13:03:28 EDT 2019


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

-1 for having this spill into the math module.   We're already started down a different path; otherwise, there would have been no need to add the as_integer_ratio method to int/bool.  That was done so that x.as_integer_ratio() would work for all the concrete classes where it made sense.  Right now, the only concrete class that is missing the method is Fractions.  Adding it there is trivial and it doesn't garbage-up the math module with a pass-through function.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37822>
_______________________________________


More information about the Python-bugs-list mailing list