diff options
| author | shimizukawa <shimizukawa@gmail.com> | 2014-04-29 21:54:25 +0900 |
|---|---|---|
| committer | shimizukawa <shimizukawa@gmail.com> | 2014-04-29 21:54:25 +0900 |
| commit | af372f6aceb77cf0586fdb786a674cdfd72c547d (patch) | |
| tree | 84954c829424b1ec103b36787e0ca0b7f5488fe8 /sphinx/pycode | |
| parent | 7ffd869ddc9a0b14a441ea31f52347a71e876e20 (diff) | |
| download | sphinx-af372f6aceb77cf0586fdb786a674cdfd72c547d.tar.gz | |
provide __next__() and use native next() to support py2/py3 in one source. refs #1350.
Diffstat (limited to 'sphinx/pycode')
| -rw-r--r-- | sphinx/pycode/pgen2/pgen.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/pycode/pgen2/pgen.py b/sphinx/pycode/pgen2/pgen.py index 3ecb60fa..3c37b139 100644 --- a/sphinx/pycode/pgen2/pgen.py +++ b/sphinx/pycode/pgen2/pgen.py @@ -324,9 +324,9 @@ class ParserGenerator(object): return value def gettoken(self): - tup = self.generator.next() + tup = next(self.generator) while tup[0] in (tokenize.COMMENT, tokenize.NL): - tup = self.generator.next() + tup = next(self.generator) self.type, self.value, self.begin, self.end, self.line = tup #print token.tok_name[self.type], repr(self.value) |
