4 ms·
Isn't zip_longest only useful for zipping sequences of different lengths? What exactly is it doing here that couldn't be done with plain zip? Also that code (I
by bheadmaster 2y ago
Isn't zip_longest only useful for zipping sequences of different lengths? What exactly is it doing here that couldn't be done with plain zip?
Also that code (IMHO, of course) still gives me a headache when I try to mentally parse it.
- deno 2y agoRegular zip works, I just don’t like the worst case because if one row has fewer columns the entire column will be quietly dropped since builtin zip works as zip_shortest rather than raise an exception. I never use bultin zip on input data.