Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
> I'm with Raymond here; I don't think this change is desirable for the math > module, either with or without the leading underscore in the name. Could you please explain what is wrong in adding a helper function which will help to convert different types of numbers to integer ratio correctly? Currently you need to write a complex code if you need to convert a general number to integer ratio: try: as_integer_ratio = x.as_integer_ratio except AttributeError: n = x.numerator d = x.denominator else: n, d = as_integer_ratio() (and maybe even more complex if you want to add fast path for int). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37884> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com