diff options
author | Georg Brandl <georg@python.org> | 2014-03-01 08:08:16 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-03-01 08:08:16 +0100 |
commit | 4ea37b595fb92c6e1f7f9f952ac2c59100a9b648 (patch) | |
tree | b827ca74310a9455c51b2355e079f787c090dc20 /sphinx/util/pycompat.py | |
parent | 529519275eda2912fdd4a300769f56af4ddf1d85 (diff) | |
parent | f3dba82564ed76fc8016051a949859aa26d3cc2e (diff) | |
download | sphinx-git-4ea37b595fb92c6e1f7f9f952ac2c59100a9b648.tar.gz |
merge
Diffstat (limited to 'sphinx/util/pycompat.py')
-rw-r--r-- | sphinx/util/pycompat.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sphinx/util/pycompat.py b/sphinx/util/pycompat.py index 1e5ea3145..5f6e59eeb 100644 --- a/sphinx/util/pycompat.py +++ b/sphinx/util/pycompat.py @@ -48,6 +48,8 @@ if sys.version_info >= (3, 0): # try to match ParseError details with SyntaxError details raise SyntaxError(err.msg, (filepath, lineno, offset, err.value)) return unicode(tree) + from itertools import zip_longest # Python 3 name + import builtins else: # Python 2 @@ -69,6 +71,9 @@ else: # error handler import locale sys_encoding = locale.getpreferredencoding() + # use Python 3 name + from itertools import izip_longest as zip_longest + import __builtin__ as builtins def execfile_(filepath, _globals): |