diff options
author | Georg Brandl <georg@python.org> | 2007-04-21 15:47:16 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-04-21 15:47:16 (GMT) |
commit | a18af4e7a2091d11478754eb66ae387a85535763 (patch) | |
tree | fea8015d656cfee937bb6f3d106e6ca0e9f19d78 /Lib/test/test_str.py | |
parent | 4d2adcca52ced412d4bdf131b872729c43520d58 (diff) | |
download | cpython-a18af4e7a2091d11478754eb66ae387a85535763.zip cpython-a18af4e7a2091d11478754eb66ae387a85535763.tar.gz cpython-a18af4e7a2091d11478754eb66ae387a85535763.tar.bz2 |
PEP 3114: rename .next() to .__next__() and add next() builtin.
Diffstat (limited to 'Lib/test/test_str.py')
-rw-r--r-- | Lib/test/test_str.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_str.py b/Lib/test/test_str.py index 226a168..0067bdb 100644 --- a/Lib/test/test_str.py +++ b/Lib/test/test_str.py @@ -22,10 +22,10 @@ class StrTest( def test_iterators(self): # Make sure str objects have an __iter__ method it = "abc".__iter__() - self.assertEqual(it.next(), "a") - self.assertEqual(it.next(), "b") - self.assertEqual(it.next(), "c") - self.assertRaises(StopIteration, it.next) + self.assertEqual(next(it), "a") + self.assertEqual(next(it), "b") + self.assertEqual(next(it), "c") + self.assertRaises(StopIteration, next, it) def test_conversion(self): # Make sure __str__() behaves properly |