summaryrefslogtreecommitdiffstats
path: root/Objects/stringobject.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-08-27 04:55:52 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-08-27 04:55:52 (GMT)
commit9bfe533c6967e2813420d75d4830de3923db0627 (patch)
treeffbcd3cf8cc8973c899a35f5abbe1d676f221902 /Objects/stringobject.c
parent063606a0d5302d8a5530297a70494a9cad334e83 (diff)
downloadcpython-9bfe533c6967e2813420d75d4830de3923db0627.zip
cpython-9bfe533c6967e2813420d75d4830de3923db0627.tar.gz
cpython-9bfe533c6967e2813420d75d4830de3923db0627.tar.bz2
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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 31aeaa7..04c9c98 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);