mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #635: add missing "next" method to idgen() on Python 3.
This commit is contained in:
parent
896b575cdc
commit
b07bf400a7
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user