diff options
author | Martin Matusiak <numerodix@gmail.com> | 2014-03-07 21:33:43 +0100 |
---|---|---|
committer | Martin Matusiak <numerodix@gmail.com> | 2014-03-07 21:33:43 +0100 |
commit | 2c8562eecea32f89b76f09a72ee76352d65b8c89 (patch) | |
tree | ea2bdad890640afc8b18d7149259198e897f26ca /ansicolor | |
parent | d31eadc26af0e9ba58435275cb0c19a434f86c5c (diff) | |
download | ansicolor-2c8562eecea32f89b76f09a72ee76352d65b8c89.tar.gz |
use next(g) over g.next() for generator
Diffstat (limited to 'ansicolor')
-rw-r--r-- | ansicolor/ansicolor.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ansicolor/ansicolor.py b/ansicolor/ansicolor.py index 2845c7f..a472fb3 100644 --- a/ansicolor/ansicolor.py +++ b/ansicolor/ansicolor.py @@ -209,7 +209,7 @@ def colordiff(x, y, color_x=Colors.Cyan, color_y=Colors.Green, debug=False): g = ((i,e) for (i,e) in enumerate(it)) def f(): try: - return g.next() + return next(g) except StopIteration: return (-1, None) return f |