Author: Maciej Fijalkowski <fij...@gmail.com> Branch: missing-ndarray-attributes Changeset: r60813:8f8c69368f76 Date: 2013-02-01 22:04 +0200 http://bitbucket.org/pypy/pypy/changeset/8f8c69368f76/
Log: make those staticmethods again diff --git a/pypy/module/micronumpy/types.py b/pypy/module/micronumpy/types.py --- a/pypy/module/micronumpy/types.py +++ b/pypy/module/micronumpy/types.py @@ -383,7 +383,7 @@ def str_format(self, box): return str(self.for_computation(self.unbox(box))) - #@staticmethod #v can be all kinds of int + @staticmethod def for_computation(self, v): return widen(v) @@ -649,7 +649,7 @@ return float2string(self.for_computation(self.unbox(box)), "g", rfloat.DTSF_STR_PRECISION) - #@staticmethod #v can be a longfloat + @staticmethod def for_computation(self, v): return float(v) @@ -966,6 +966,7 @@ fval = unpack_float(s, native_is_bigendian) return self.box(fval) + @staticmethod def for_computation(self, v): return float(v) @@ -1070,6 +1071,7 @@ op = '+' if imag >= 0 else '' return ''.join(['(', real_str, op, imag_str, ')']) + @staticmethod def for_computation(self, v): return float(v[0]), float(v[1]) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit