summaryrefslogtreecommitdiff
path: root/py/objstr.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-05-28 14:22:12 +0000
committerDamien George <damien.p.george@gmail.com>2015-05-28 14:22:12 +0000
commit79474c6b164fb66a8d348bfa57613f9dbf5af4e8 (patch)
treed449229d7ee01f114d092a624943bb42d79a72a5 /py/objstr.c
parent2cae0f62908812b6cd925943ee70e7e0bef0387e (diff)
py: Remove unnecessary extra handling of padding of nan/inf.
C's printf will pad nan/inf differently to CPython. Our implementation originally conformed to C, now it conforms to CPython's way. Tests for this are also added in this patch.
Diffstat (limited to 'py/objstr.c')
-rw-r--r--py/objstr.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/py/objstr.c b/py/objstr.c
index 0246262a5..d11f097fc 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -1200,7 +1200,6 @@ mp_obj_t mp_obj_str_format(mp_uint_t n_args, const mp_obj_t *args, mp_map_t *kwa
type = 'g';
}
- flags |= PF_FLAG_PAD_NAN_INF; // '{:06e}'.format(float('-inf')) should give '-00inf'
switch (type) {
#if MICROPY_PY_BUILTINS_FLOAT
case 'e':