PEP 3114: rename .next() to .__next__() and add next() builtin.
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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