summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2011-07-04 04:05:25 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2011-07-04 04:05:25 (GMT)
commitbc9d8f838b604565da23fba8ae97e0cd23aa7414 (patch)
treed30430823303393470c721e7bb35f4685a82a5a9 /Objects
parent401d197657550f0ac155e96213b328a70724d2fa (diff)
parent9ebe08d2f6c3b8bca5148e909cc89efeb7a01ad1 (diff)
downloadcpython-bc9d8f838b604565da23fba8ae97e0cd23aa7414.zip
cpython-bc9d8f838b604565da23fba8ae97e0cd23aa7414.tar.gz
cpython-bc9d8f838b604565da23fba8ae97e0cd23aa7414.tar.bz2
merge from 3.2
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 4361908..7043599 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -9761,8 +9761,6 @@ PyUnicode_Format(PyObject *format, PyObject *args)
case 'o':
case 'x':
case 'X':
- if (c == 'i')
- c = 'd';
isnumok = 0;
if (PyNumber_Check(v)) {
PyObject *iobj=NULL;
@@ -9777,7 +9775,7 @@ PyUnicode_Format(PyObject *format, PyObject *args)
if (iobj!=NULL) {
if (PyLong_Check(iobj)) {
isnumok = 1;
- temp = formatlong(iobj, flags, prec, c);
+ temp = formatlong(iobj, flags, prec, (c == 'i'? 'd': c));
Py_DECREF(iobj);
if (!temp)
goto onError;