diff options
author | Raymond Hettinger <python@rcn.com> | 2003-08-27 04:55:52 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-08-27 04:55:52 +0000 |
commit | a348f7ea76134e459bffcef8f8176e5d09ffe5dd (patch) | |
tree | 91bb5fef3286d04e0ed384a735b00fa8530e289d /Objects/stringobject.c | |
parent | f6bb624271e3eb1be3d05ba593dbc407b793ec18 (diff) | |
download | cpython-a348f7ea76134e459bffcef8f8176e5d09ffe5dd.tar.gz |
SF bug #795506: Wrong handling of string format code for float values.
Adding missing support for '%F'.
Will backport to 2.3.1.
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r-- | Objects/stringobject.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 31aeaa7c74..04c9c9887a 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -3921,8 +3921,11 @@ PyString_Format(PyObject *format, PyObject *args) case 'e': case 'E': case 'f': + case 'F': case 'g': case 'G': + if (c == 'F') + c = 'f'; pbuf = formatbuf; len = formatfloat(pbuf, sizeof(formatbuf), flags, prec, c, v); |