Commit b11d91d9 authored by Victor Stinner's avatar Victor Stinner

Fix my previous commit: bool is a long, restore the specical case for bool

parent 92ff4e19
...@@ -13481,6 +13481,9 @@ formatlong(PyObject *val, int flags, int prec, int type) ...@@ -13481,6 +13481,9 @@ formatlong(PyObject *val, int flags, int prec, int type)
case 'd': case 'd':
case 'u': case 'u':
/* Special-case boolean: we want 0/1 */ /* Special-case boolean: we want 0/1 */
if (PyBool_Check(val))
result = PyNumber_ToBase(val, 10);
else
result = Py_TYPE(val)->tp_str(val); result = Py_TYPE(val)->tp_str(val);
break; break;
case 'o': case 'o':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment