summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-04-06 11:46:39 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-04-15 08:44:49 -0600
commitc6de09799decbb22bb2d7a44036f53c30356edda (patch)
treecdd392afe5ecd5cc185c45b1387c54712e93ca2c /doc
parent6c47259eec0ec20c1150c2b29994de59a3158964 (diff)
downloadnumpy-c6de09799decbb22bb2d7a44036f53c30356edda.tar.gz
2to3: Apply next fixer.
The next builtin has been available since Python 2.6 and allows `it.next()` to be replaced by `next(it)`. In Python 3 the `next` method is gone entirely, replaced entirely by the `__next__` method. The next fixer changes all the `it.next()` calls to the new form and renames the `next` methods to `__next__`. In order to keep Numpy code backwards compatible with Python 2, a `next` method was readded to all the Numpy iterators after the fixer was run so they all contain both methods. The presence of the appropriate method could have been made version dependent, but that looked unduly complicated. Closes #3072.
Diffstat (limited to 'doc')
-rw-r--r--doc/sphinxext/numpydoc/comment_eater.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/sphinxext/numpydoc/comment_eater.py b/doc/sphinxext/numpydoc/comment_eater.py
index 8b57c4b7a..8cddd3305 100644
--- a/doc/sphinxext/numpydoc/comment_eater.py
+++ b/doc/sphinxext/numpydoc/comment_eater.py
@@ -106,7 +106,7 @@ class CommentBlocker(object):
def new_comment(self, string, start, end, line):
""" Possibly add a new comment.
-
+
Only adds a new comment if this comment is the only thing on the line.
Otherwise, it extends the noncomment block.
"""