[pypy-commit] pypy numpypy-axisops: some immutable fields

fijal noreply at buildbot.pypy.org
Fri Jan 13 22:38:59 CET 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: numpypy-axisops
Changeset: r51299:a6fc54ab906e
Date: 2012-01-13 23:36 +0200
http://bitbucket.org/pypy/pypy/changeset/a6fc54ab906e/

Log:	some immutable fields

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
@@ -771,6 +771,8 @@
     """
     Intermediate class for performing binary operations.
     """
+    _immutable_fields_ = ['left', 'right']
+    
     def __init__(self, ufunc, name, shape, calc_dtype, res_dtype, left, right):
         VirtualArray.__init__(self, name, shape, res_dtype)
         self.ufunc = ufunc
@@ -828,6 +830,8 @@
     encounter such things in the wild. Remove this comment
     when we'll make AxisReduce lazy
     """
+    _immutable_fields_ = ['left', 'right']
+    
     def __init__(self, ufunc, name, shape, dtype, left, right, dim):
         Call2.__init__(self, ufunc, name, shape, dtype, dtype,
                        left, right)


More information about the pypy-commit mailing list