On 05/17/2020 12:02 PM, Rob Cliffe via Python-ideas wrote:
On 17/05/2020 19:43, David Mertz wrote:

The API matter is really orthogonal to this.  My point here is that
 Nathan and some other discussants are operating under the assumption
 that: "Everyone really wants strict-zip but they just haven't had a
 way to express it conveniently. They all assume their iterables are
 the same length already, so this just adds a check."

I disagree strongly with that assumption.  I think that the actual
majority of my uses of zip are non-strict.

But a lot of users (including you, in a minority of cases) can, *if
they choose*, benefit from a 'strict' version.
So what is wrong (ceteribus paribus) with making it easy for them to
 do so?

Coefficient of friction.

Importing from a stdlib module is not a hardship, so going from the status quo to "from 
itertools import zip_strict" is already making it "easy for them to do so".

Adding it as a flag makes it too easy (temptingly easy according to the PEP) to 
use zip_strict, so now the pendulum will swing the other direction and we'll 
get spurious errors.  Nothing dissuades from proper safety consciousness like 
spurious errors and excessive warnings. (YMMV)

--
~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/G66HRMXREAPAPEQ2XKMQXPTWA5XOLEFT/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to