Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r61460:63a6abfa0512
Date: 2013-02-19 10:55 -0800
http://bitbucket.org/pypy/pypy/changeset/63a6abfa0512/

Log:    revert the 'reset to g' from 52765baaf1aa, as we're backed by
        rpython's rfloat.double_to_string we need 'r'

diff --git a/pypy/objspace/std/newformat.py b/pypy/objspace/std/newformat.py
--- a/pypy/objspace/std/newformat.py
+++ b/pypy/objspace/std/newformat.py
@@ -935,9 +935,9 @@
             tp = self._type
             self._get_locale(tp)
             if tp == "\0":
+                flags |= rfloat.DTSF_ADD_DOT_0
                 tp = "r"
                 default_precision = 0
-                flags |= rfloat.DTSF_ADD_DOT_0
             elif tp == "n":
                 tp = "g"
             value = space.float_w(w_float)
@@ -949,8 +949,6 @@
                 add_pct = False
             if self._precision == -1:
                 self._precision = default_precision
-            if tp == "r":
-                type = "g"
             result, special = rfloat.double_to_string(value, tp,
                                                       self._precision, flags)
             if add_pct:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to