On Mon, 4 May 2020 21:07:26 +0200 Alex Hall <alex.moj...@gmail.com> wrote:
> Yes. We're starting to go in circles here, but I'm arguing that it's > OK for people to be mildly inconvenienced sometimes having to > preemptively trim their inputs in exchange for less confusing, > invisible, frustrating bugs. I'd like people to use this feature as > often as possible, and I think the benefits easily outweigh the > problem you describe. Going crazy trying to debug something is > probably the thing programmers complain about the most, I'd like to > reduce that. [...] > If an API accepts some iterables intending to zip them, I feel pretty > safe guessing that 90% of the users of that API will pass iterables > that they intend to be of equal length. Occasionally someone might > want to pass an infinite stream or something, but really most users > will just use lists constructed in a boring manner. I can't imagine > ever designing an API thinking "I'd better not make this strict, I'm > sure this particular API will be used quite differently from most > other similar APIs and users will want to pass different lengths > unusually often". But even if I grant that such occasions exist, I see > no reason to believe that they will occur most often when a user is > feeling too lazy to import itertools. The correlation you propose is > highly suspect. Is a Warning the right compromise? Turn it on by default, and let that 10% (where did that number come from?) turn if off because they actually do know better. Dan -- “Atoms are not things.” – Werner Heisenberg Dan Sommers, http://www.tombstonezero.net/dan _______________________________________________ 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/H2BZ5IT7FHSSWIPSZ5AHXJJHZKXX3PL5/ Code of Conduct: http://python.org/psf/codeofconduct/