mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
merge from 3.2
This commit is contained in:
commit
bc9d8f838b
2 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue