Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 30216:7ab1a41f16da legacy-trunk
SF bug #795506: Wrong handling of string format code for float values.
Adding missing support for '%F'.
Will backport to 2.3.1.
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Wed, 27 Aug 2003 04:55:52 +0000 |
| parents | 7cb4ad5932e6 |
| children | 784e38abed82 cd0c3f916b34 |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Tue Aug 26 11:59:27 2003 +0000 +++ b/Objects/unicodeobject.c Wed Aug 27 04:55:52 2003 +0000 @@ -6540,8 +6540,11 @@ case 'e': case 'E': case 'f': + case 'F': case 'g': case 'G': + if (c == 'F') + c = 'f'; pbuf = formatbuf; len = formatfloat(pbuf, sizeof(formatbuf)/sizeof(Py_UNICODE), flags, prec, c, v);
