On 04/30/2020 07:58 AM, Christopher Barker wrote:
On 04/29/2020 10:51 PM, Stephen J. Turnbull wrote:
I think that the issue of searchability and signature are pretty
compelling reasons for such a simple feature to be part of the
function name.
I would absolutely agree with that if all three function were in the same
namespace (like the string methods referred to earlier), but in this case, one
is a built in and the others will not be — which makes a huge difference in
discoverability.
Imagine someone that uses zip() in code that works for a while, and then
discovers a bug triggered by unequal length inputs.
If it’s a flag, they look at the zip docstring, and find the flag, and their
problem is solved.
So update the `zip` docstring with a reference to `zip_longest`, `zip_equal`,
and `zip_whatever`.
-1 on using a flag.
--
~Ethan~
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/T7OGRPXEU2UHGGL6FW42DIK7ZVHCMDUS/
Code of Conduct: http://python.org/psf/codeofconduct/