[Python-3000] have zip() raise exception for sequences of different lengths (original) (raw)
Raymond Hettinger rhettinger at ewtllc.com
Thu Aug 31 01:58:04 CEST 2006
- Previous message: [Python-3000] have zip() raise exception for sequences of different lengths
- Next message: [Python-3000] have zip() raise exception for sequences of different lengths
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
If changing zip()'s behavior to match the most common use case is totally out, the stdlib code at least argues for adding something like itertools.izipexact().
I open to that.
For this time being, let's do this. Add itertools.izip_longest() in Py2.5 and include a recipe for izip_exact() and see if anyone cares enough to ever use it. The new any() and all() functions started out as recipes and graduated when their popularity was shown. If izip_exact() proves its worth, then I would be happy to add it as a tool.
Raymond
- Previous message: [Python-3000] have zip() raise exception for sequences of different lengths
- Next message: [Python-3000] have zip() raise exception for sequences of different lengths
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]