[pypy-commit] pypy default: simplify

bdkearns noreply at buildbot.pypy.org
Fri Apr 18 18:45:35 CEST 2014


Author: Brian Kearns <bdkearns at gmail.com>
Branch: 
Changeset: r70757:aba89d1880eb
Date: 2014-04-18 12:35 -0400
http://bitbucket.org/pypy/pypy/changeset/aba89d1880eb/

Log:	simplify

diff --git a/pypy/module/micronumpy/nditer.py b/pypy/module/micronumpy/nditer.py
--- a/pypy/module/micronumpy/nditer.py
+++ b/pypy/module/micronumpy/nditer.py
@@ -10,20 +10,7 @@
                                             shape_agreement, shape_agreement_multiple)
 
 
-class AbstractIterator(object):
-    def done(self):
-        raise NotImplementedError("Abstract Class")
-
-    def next(self):
-        raise NotImplementedError("Abstract Class")
-
-    def getitem(self, space, array):
-        raise NotImplementedError("Abstract Class")
-
-
-class IteratorMixin(object):
-    _mixin_ = True
-
+class BaseIterator(object):
     def __init__(self, nditer, it, op_flags):
         self.nditer = nditer
         self.it = it
@@ -43,11 +30,11 @@
         xxx
 
 
-class BoxIterator(IteratorMixin, AbstractIterator):
+class BoxIterator(BaseIterator):
     index = 0
 
 
-class ExternalLoopIterator(IteratorMixin, AbstractIterator):
+class ExternalLoopIterator(BaseIterator):
     index = 1
 
 


More information about the pypy-commit mailing list