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

This commit is contained in:
Georg Brandl 2011-09-19 08:31:37 +02:00
parent 896b575cdc
commit b07bf400a7

View File

@ -46,9 +46,10 @@ class idgen(object):
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):