[pypy-commit] pypy matrixmath: Simply kill descr_new_flatiter

fijal noreply at buildbot.pypy.org
Mon Nov 28 07:22:51 CET 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: matrixmath
Changeset: r49871:bf8cd0d22563
Date: 2011-11-28 08:22 +0200
http://bitbucket.org/pypy/pypy/changeset/bf8cd0d22563/

Log:	Simply kill descr_new_flatiter

diff --git a/pypy/module/micronumpy/interp_numarray.py b/pypy/module/micronumpy/interp_numarray.py
--- a/pypy/module/micronumpy/interp_numarray.py
+++ b/pypy/module/micronumpy/interp_numarray.py
@@ -1345,13 +1345,6 @@
     reshape = interp2app(BaseArray.descr_reshape),
 )
 
-def descr_new_flatiter(space, w_object):
-    if not isinstance(w_object, BaseArray):
-        raise OperationError(space.w_TypeError, space.wrap(
-             "cannot create 'numpypy.flatiter' instances"))
-    i = FlatIterator(w_object)
-    return i
-
 
 class FlatIterator(Wrappable):
     _attrs_ = ["next"]
@@ -1373,6 +1366,5 @@
 
 FlatIterator.typedef = TypeDef(
     'flatiter',
-    __new__ = interp2app(descr_new_flatiter),
     next = interp2app(FlatIterator.descr_next),
 )


More information about the pypy-commit mailing list