summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2017-12-01 19:53:30 -0800
committerJon Dufresne <jon.dufresne@gmail.com>2017-12-01 19:57:37 -0800
commitf5703dc3e55008b03aad4db8d8f3c5fa12dbae86 (patch)
treeafbb7a1f165ddf529fc95376397dfa02bee383c8 /doc/src
parenta51160317c680662c52e4a1a6b4d11beae37f205 (diff)
downloadpsycopg2-f5703dc3e55008b03aad4db8d8f3c5fa12dbae86.tar.gz
Use builtin function next() throughout project
Available since Python 2.6. Use of .next() is deprecated and not supported in Python 3. Forward compatible with modern Python. https://docs.python.org/2/library/functions.html#next
Diffstat (limited to 'doc/src')
-rwxr-xr-xdoc/src/tools/stitch_text.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/doc/src/tools/stitch_text.py b/doc/src/tools/stitch_text.py
index c9ed99a..9b5d917 100755
--- a/doc/src/tools/stitch_text.py
+++ b/doc/src/tools/stitch_text.py
@@ -19,10 +19,7 @@ def main():
def iter_file_base(fn):
f = open(fn)
- if sys.version_info[0] >= 3:
- have_line = iter(f).__next__
- else:
- have_line = iter(f).next
+ have_line = iter(f).__next__
while not have_line().startswith('.. toctree'):
pass