[issue46187] Optionally support rounding for math.isqrt()
Raymond Hettinger
report at bugs.python.org
Sun Jan 2 15:36:28 EST 2022
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
> divmod() allows easy emulation of any division rounding mode
It could be used that way, but generally isn't.
Please consider my original request. Adding a keyword argument is easy, clear, and has almost no mental overhead.
It reads very well in code, `y = isqrt(x, 'ceil')` or `y = isqrt(x, 'round')`. The equivalents with isqrt_rem are awkward and don't read well (reminding me of my Fortran days).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46187>
_______________________________________
More information about the Python-bugs-list
mailing list