From 81f547c56bb9608349e4dedc79d0ff70860528bb Mon Sep 17 00:00:00 2001 From: Hernan Grecco Date: Thu, 7 Jan 2016 21:55:01 -0300 Subject: [PATCH] Fixes for Python 2.X compatibility in SourceIterator --- pint/util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pint/util.py b/pint/util.py index 010e37b..dd9cd04 100644 --- a/pint/util.py +++ b/pint/util.py @@ -693,6 +693,8 @@ class SourceIterator(object): self.last = lineno, line return lineno, line + next = __next__ + def block_iter(self): """Iterate block including header. """ @@ -723,3 +725,5 @@ class BlockIterator(SourceIterator): raise DefinitionSyntaxError('cannot nest @ directives', lineno=lineno) return lineno, line + + next = __next__