Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

> I'd similarly prefer to see recipes in the docs.

Can you elaborate on why you prefer having this in the docs rather than as 
built-in functionality?

For me, the rounded case would be the most common.  I don't think I'm 
better-off writing a wrapper with a semi-opaque trick, having to give it a 
different name and having it run more slowly than built in functionality. Also 
as builtin, I can be assured that it is maintained, documented, and well-tested.

Writing "y = isqrt(x, 'rounded')" is clear, fast, and convenient. I don't see 
the advantage is putting that functionality a little more out of reach.

The string options have been successful elsewhere in Python. For example, 
str.encode() has the error modes: "strict", "ignore", and "replace" which as 
clear, fast, and much better than users having to write their own wrappers.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46187>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to