[Python-3000] have zip() raise exception for sequences of different lengths (original) (raw)
Ron Adam rrr at ronadam.com
Thu Aug 31 03:26:55 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 ]
Guido van Rossum wrote:
Perhaps a compromise could be to add a keyword parameter to request such an exception? (We could even add three options: truncate, pad, error, with truncate being the default, and pad being the old map() and filter() behavior.)
Maybe it can be done with just two optional keywords.
If 'match' is True, raise an error if iterables are mismatched.
if a 'pad' is specified then pad, else truncate.
The current truncating behavior would be the default.
Ron- 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 ]