17 Jul
2000
17 Jul
'00
8:22 p.m.
Barry A. Warsaw wrote: [PEP 201, Parallel Iteration]
Open Issues
- What should "zip(a)" do? Given
a = (1, 2, 3); zip(a)
three outcomes are possible.
How about a fourth: zip(a) is the same as zip(a, []) ? Look at it this way: what should zip(a, pad=None) return? Obviously: [(1, None), (2, None), (3, None)] So what should zip(a) return? Don't special case it, just return []. With only one arg, zip has clearly lost meaning. That is, it's clearly a degenerate case, and not worth a bunch of special casing. although-we-do-special-case-Barry-ly y'rs - Gordon