File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,16 @@ def iter_with(iterable, context_manager):
167167
168168
169169def izip_longest (* iterables , ** kwargs ):
170+ '''
171+ izip_longest(iter1 [,iter2 [...]], [fillvalue=None]) --> izip_longest object
172+
173+ Return an `izip_longest` object whose `.next()` method returns a `tuple`
174+ where the i-th element comes from the i-th iterable argument. The `.next()`
175+ method continues until the longest iterable in the argument sequence is
176+ exhausted and then it raises `StopIteration`. When the shorter iterables
177+ are exhausted, `fillvalue` is substituted in their place. The `fillvalue`
178+ defaults to `None` or can be specified by a keyword argument.
179+ '''
170180 # This is a really obfuscated algorithm, simplify and/or explain
171181 fill_value = kwargs .get ('fillvalue' , None )
172182 def sentinel (counter = ([fill_value ] * (len (iterables ) - 1 )).pop ):
You can’t perform that action at this time.
0 commit comments