mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
merge
This commit is contained in:
@@ -43,8 +43,8 @@ except ImportError: # Python < 2.6 or >= 3.0
|
||||
except ImportError:
|
||||
from itertools import izip, repeat, chain
|
||||
# this code has been taken from the Python itertools documentation
|
||||
def izip_longest(*args, **kwds):
|
||||
# izip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-
|
||||
def zip_longest(*args, **kwds):
|
||||
# zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-
|
||||
fillvalue = kwds.get('fillvalue')
|
||||
def sentinel(counter = ([fillvalue]*(len(args)-1)).pop):
|
||||
yield counter() # yields the fillvalue, or raises IndexError
|
||||
|
||||
Reference in New Issue
Block a user