> If zip were being designed today, I'm sure most people wouldn't mind if it 
> were always strict or strict by default.

Again, I'd like to stress that I think the current default behavior is fine. I 
have no desire to change it, even over an extended deprecation period.

> But given how it is, how many people would care enough to go out of their way 
> to pass an extra argument...

In response to this specific question, I'll again say that I know that I, and 
everyone on my team, would use it. ;)

> ...or import a special version of zip to get strict behaviour?

Honestly, I would be much less likely to use this. Passing a boolean keyword 
argument is much lighter than importing something from somewhere to wrap a 
builtin purely as a defensive measure. As proof, I don't have any "toolbox" 
version of a strict zip, even though it's not very hard to make.

For example, I often pass `sep='\t'` to the built-in `print` function. I'd 
probably sooner just use `print('\t'.join(map(str, args))` than import 
`print_tab_sep` from somewhere, even if it makes the call site cleaner. Not 
100% sure why, but I think it just comes down to friction. I like using the 
builtins and don't like importing (especially in interactive sessions)... but 
maybe (probably) that's just me. :)

I can't speak for any larger group, but I'm almost certain that users in 
general would be much more enthusiastic to use *either* option than to roll 
their own using a sentinel and `zip_longest`.
_______________________________________________
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/WQAL4MGC3SKUECKJIY2EYNATJ43LODP5/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to