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_bsddb.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_bsddb.py')
-rwxr-xr-x | Lib/test/test_bsddb.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/test/test_bsddb.py b/Lib/test/test_bsddb.py index 3a62f9c..876a100 100755 --- a/Lib/test/test_bsddb.py +++ b/Lib/test/test_bsddb.py @@ -72,7 +72,7 @@ class TestBSDDB(unittest.TestCase): di = iter(self.d) while 1: try: - key = di.next() + key = next(di) self.d[key] = 'modified '+key except StopIteration: break @@ -83,7 +83,7 @@ class TestBSDDB(unittest.TestCase): fi = iter(self.f) while 1: try: - key = fi.next() + key = next(fi) self.f[key] = 'modified '+key except StopIteration: break @@ -97,7 +97,7 @@ class TestBSDDB(unittest.TestCase): di = iter(self.d.items()) while 1: try: - k, v = di.next() + k, v = next(di) self.d[k] = 'modified '+v except StopIteration: break @@ -108,7 +108,7 @@ class TestBSDDB(unittest.TestCase): fi = iter(self.f.items()) while 1: try: - k, v = fi.next() + k, v = next(fi) self.f[k] = 'modified '+v except StopIteration: break @@ -160,13 +160,13 @@ class TestBSDDB(unittest.TestCase): if hasattr(self.f, 'iteritems'): if debug: print("D") i = iter(self.f.items()) - k,v = i.next() + k,v = next(i) if debug: print("E") self.f[k] = "please don't deadlock" if debug: print("F") while 1: try: - k,v = i.next() + k,v = next(i) except StopIteration: break if debug: print("F2") @@ -176,7 +176,7 @@ class TestBSDDB(unittest.TestCase): while i: try: if debug: print("H") - k = i.next() + k = next(i) if debug: print("I") self.f[k] = "deadlocks-r-us" if debug: print("J") @@ -201,7 +201,7 @@ class TestBSDDB(unittest.TestCase): i = iter(self.f.iteritems()) nc2 = len(self.f._cursor_refs) # use the iterator (should run to the first yield, creating the cursor) - k, v = i.next() + k, v = next(i) nc3 = len(self.f._cursor_refs) # destroy the iterator; this should cause the weakref callback # to remove the cursor object from self.f._cursor_refs |