Replaced foo.next() by next(foo).

This new syntax for next() has been introduced in Python 2.6 and is
compatible with Python 3.
This commit is contained in:
Claude Paroz 2012-05-10 20:14:04 +02:00
parent 1c1a229632
commit 169b1a404c
20 changed files with 73 additions and 73 deletions

View file

@ -26,7 +26,7 @@ def wrap(text, width):
text = force_unicode(text)
def _generator():
it = iter(text.split(' '))
word = it.next()
word = next(it)
yield word
pos = len(word) - word.rfind('\n') - 1
for word in it: