Mercurial > hg-stable
diff hgext/highlight.py @ 6196:fc9535ae6fe2
highlight: use iter() instead of generator comprehension
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Fri, 29 Feb 2008 11:13:50 -0800 |
parents | fe54e7501de1 |
children | f6565f7d9489 |
line wrap: on
line diff
--- a/hgext/highlight.py Fri Feb 29 09:54:28 2008 +0100 +++ b/hgext/highlight.py Fri Feb 29 11:13:50 2008 -0800 @@ -73,7 +73,7 @@ # strip wrapping div colorized = colorized[:colorized.find('\n</pre>')] colorized = colorized[colorized.find('<span'):] - coloriter = (l for l in colorized.splitlines()) + coloriter = iter(colorized.splitlines()) filters['colorize'] = lambda x: coloriter.next()