Author: Armin Rigo <[email protected]>
Branch: generator-in-rpython
Changeset: r50830:c73c899880d8
Date: 2011-12-23 12:26 +0100
http://bitbucket.org/pypy/pypy/changeset/c73c899880d8/

Log:    Mark the test classes as _immutable_=True, to showcase what a real
        implementation would look like.

diff --git a/pypy/rpython/test/test_generator.py 
b/pypy/rpython/test/test_generator.py
--- a/pypy/rpython/test/test_generator.py
+++ b/pypy/rpython/test/test_generator.py
@@ -21,9 +21,11 @@
         # merging two different generators is not supported
         # right now, but we can use workarounds like here
         class MyGen:
+            _immutable_ = True
             def next(self):
                 raise NotImplementedError
         class MyG1(MyGen):
+            _immutable_ = True
             def __init__(self, a):
                 self._gen = self.g1(a)
             def next(self):
@@ -33,6 +35,7 @@
                 yield a + 1
                 yield a + 2
         class MyG2(MyGen):
+            _immutable_ = True
             def __init__(self):
                 self._gen = self.g2()
             def next(self):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to