On 16/05/2020 17:14, Guido van Rossum wrote:
On Sat, May 16, 2020 at 1:26 AM Steven D'Aprano<st...@pearwood.info>  wrote:

* zip(strict=True)       +1
* zip(mode='strict')     -0
* itertools.zip_strict() -0.5
* zip.strict()           -1  (but really, I'd like to make this -1e10)
I spent a significant amount of time and mental energy explaining in
detail why a boolean flag is a poor API and is objectively the wrong
interface here. This is not just a matter of personal taste: there are
reasons why a flag is wrong here.

Clearly it is not the objective truth, otherwise you would have an easier
way convincing everyone.:-)

OK, let's put some numbers on this. We only have 9 votes in, but aside from Brandt (whose position is fairly obvious from the PEP) that includes most of the people who have expressed strong opinions one way or another. Ignoring the nuances of +/-0, we end up with:

itertools.zip_strict(): +5.5
zip(strict=True):       +1
zip.strict():           -1.9
zip(mode='strict'):     -4

(I bet Steven is wishing he hadn't been so generous to the "strict=True" option now :-)

Now I'm not fool enough to mistake a public vote for an objective truth (::looks pointedly around world politics::) but there are some interesting conclusions here.

1) Nobody (aside from Steven) wants a "mode" keyword. I suspect this is because both of the two main camps (zip(strict=True) and zip_strict()) have solid reasons against it; for the first, it's an unnecessary distraction, and for the second the existence of zip_longest() argues against it.

2) People don't hate zip.strict() as much as I had expected.

3) The PEP needs to come up with an actual argument against itertools.zip_strict(). The current dismissal ain't going to cut it.


--
Rhodri James *-* Kynesim Ltd
_______________________________________________
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/N4QLALMOLUWHYFSLKEONJ7UYF2YBQY4R/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to