[Python-3000] have zip() raise exception for sequences of different lengths
Georg Brandl
g.brandl at gmx.net
Thu Aug 31 19:34:59 CEST 2006
Raymond Hettinger wrote:
>>How about a keyword-only argument called finish which is a callable to
>>deal with the problem? When any sequence is exhausted, its position
>>is filled with StopIteration, and then finish(result) is returned.
>>
>>
>>
>
> How about we resist the urge to complicate the snot out of a basic
> looping construct. Hypergeneralization is more of a sin than premature
> optimization.
>
> It is important that zip() be left as dirt simple as possible.
Added to PEP 3099.
Georg
More information about the Python-3000
mailing list