Author: mattip <[email protected]>
Branch: 
Changeset: r72421:746c98100008
Date: 2014-07-11 23:09 +1000
http://bitbucket.org/pypy/pypy/changeset/746c98100008/

Log:    revert scalar __iter__ since it causes test failures (test_ndarray)

diff --git a/pypy/module/micronumpy/boxes.py b/pypy/module/micronumpy/boxes.py
--- a/pypy/module/micronumpy/boxes.py
+++ b/pypy/module/micronumpy/boxes.py
@@ -153,10 +153,12 @@
         raise OperationError(space.w_IndexError, space.wrap(
             "invalid index to scalar variable"))
 
+    '''    
     def descr_iter(self, space):
         # Making numpy scalar non-iterable with a valid __getitem__ method
         raise oefmt(space.w_TypeError,
                     "'%T' object is not iterable", self)
+    '''
 
     def descr_str(self, space):
         return space.wrap(self.get_dtype(space).itemtype.str_format(self))
@@ -560,7 +562,7 @@
     __new__ = interp2app(W_GenericBox.descr__new__.im_func),
 
     __getitem__ = interp2app(W_GenericBox.descr_getitem),
-    __iter__ = interp2app(W_GenericBox.descr_iter),
+    #__iter__ = interp2app(W_GenericBox.descr_iter),
     __str__ = interp2app(W_GenericBox.descr_str),
     __repr__ = interp2app(W_GenericBox.descr_str),
     __format__ = interp2app(W_GenericBox.descr_format),
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to