Author: Dusty Phillips <[email protected]>
Branch: py3k
Changeset: r53482:9c66cd0282f9
Date: 2012-03-13 13:15 -0700
http://bitbucket.org/pypy/pypy/changeset/9c66cd0282f9/
Log: Use next builtin instead of calling __next__ directly
diff --git a/pypy/module/_continuation/test/test_generator.py
b/pypy/module/_continuation/test/test_generator.py
--- a/pypy/module/_continuation/test/test_generator.py
+++ b/pypy/module/_continuation/test/test_generator.py
@@ -16,11 +16,11 @@
gen.switch(m*2)
#
g = f(10)
- res = g.__next__()
+ res = next(g)
assert res == 11
- res = g.__next__()
+ res = next(g)
assert res == 24
- res = g.__next__()
+ res = next(g)
assert res == 13
raises(StopIteration, g.__next__)
@@ -65,6 +65,6 @@
return "foo"
#
g = f(10)
- res = g.__next__()
+ res = next(g)
assert res == 11
raises(TypeError, g.__next__)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit