Commits

Georg Brandl committed 0b84eb0

Fix #635: add missing "next" method to idgen() on Python 3.

Comments (0)

Files changed (1)

sphinx/jinja2glue.py

         self.id = 0
     def current(self):
         return self.id
-    def next(self):
+    def __next__(self):
         self.id += 1
         return self.id
+    next = __next__  # Python 2/Jinja compatibility
 
 
 class SphinxFileSystemLoader(FileSystemLoader):