Author: Manuel Jacob Branch: remove-remaining-smm Changeset: r69329:ae5780334104 Date: 2014-02-24 03:31 +0100 http://bitbucket.org/pypy/pypy/changeset/ae5780334104/
Log: Move descr___getformat__(). diff --git a/pypy/objspace/std/floatobject.py b/pypy/objspace/std/floatobject.py --- a/pypy/objspace/std/floatobject.py +++ b/pypy/objspace/std/floatobject.py @@ -199,6 +199,16 @@ return w_obj @staticmethod + @unwrap_spec(kind=str) + def descr___getformat__(space, w_cls, kind): + if kind == "float": + return space.wrap(_float_format) + elif kind == "double": + return space.wrap(_double_format) + raise OperationError(space.w_ValueError, + space.wrap("only float and double are valid")) + + @staticmethod @unwrap_spec(s=str) def descr_fromhex(space, w_cls, s): length = len(s) @@ -573,16 +583,6 @@ def descr_get_imag(self, space): return space.wrap(0.0) - @staticmethod - @unwrap_spec(kind=str) - def descr___getformat__(space, w_cls, kind): - if kind == "float": - return space.wrap(_float_format) - elif kind == "double": - return space.wrap(_double_format) - raise OperationError(space.w_ValueError, - space.wrap("only float and double are valid")) - registerimplementation(W_FloatObject) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit