On 4/21/2020 7:07 PM, Antoine Pitrou wrote:
On Wed, 22 Apr 2020 08:34:56 +1000
Steven D'Aprano <st...@pearwood.info> wrote:
On Tue, Apr 21, 2020 at 12:09:44PM +0300, Serhiy Storchaka wrote:
21.04.20 11:15, Antoine Pitrou пише:
Of course, the fact that zip() is the shorter form that everyone is
used to means that, even if a `strict` argument is added, few people
will bother adding it.
The possible solution is to introduce zip_shortest() with the current
behavior of zip(), make zip() emitting a pending deprecation warning
when some data is ignored, and after long period of deprecation make it
raising an exception if some data is ignored.
Wait, are suggesting that zip should raise by default (after a suitable
deprecation period)?
"if some data is ignored"
Even so, I don't think we could ever change the default to be to "raise
unless all of the iterables are the same length". There's just too much
code that would break.
Eric
_______________________________________________
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/JRN5DAPCYJ3CZUGHYHXTM4LABGT3JRXZ/
Code of Conduct: http://python.org/psf/codeofconduct/