File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -505,6 +505,18 @@ Otherwise it might very well be worth your time and effort to port your tests
505505to :mod: `unittest `.
506506
507507
508+ Update `map ` for imbalanced input sequences
509+ '''''''''''''''''''''''''''''''''''''''''''
510+
511+ With Python 2, `map ` would pad input sequences of unequal length with
512+ `None ` values, returning a sequence as long as the longest input sequence.
513+
514+ With Python 3, if the input sequences to `map ` are of unequal length, `map `
515+ will stop at the termination of the shortest of the sequences. For full
516+ compatibility with `map ` from Python 2.x, also wrap the sequences in
517+ :func: `itertools.zip_longest `, e.g. ``map(func, *sequences) `` becomes
518+ ``list(map(func, itertools.zip_longest(*sequences))) ``.
519+
508520Eliminate ``-3 `` Warnings
509521-------------------------
510522
You can’t perform that action at this time.
0 commit comments