Message195164
In Objects/unicodeobject.c when it gets into mainformatlong, an IntEnum is recognized as an integer (passes PyLong_Check) and goes into formatlong. There, in the cases of 'd', 'i', 'u' it has:
case 'u':
/* Special-case boolean: we want 0/1 */
if (PyBool_Check(val))
result = PyNumber_ToBase(val, 10);
else
result = Py_TYPE(val)->tp_str(val);
break;
So tp_str is invoked... |
|
Date |
User |
Action |
Args |
2013-08-14 13:59:12 | eli.bendersky | set | recipients:
+ eli.bendersky, barry, eric.smith, ethan.furman, serhiy.storchaka |
2013-08-14 13:59:12 | eli.bendersky | set | messageid: <1376488752.77.0.227229442864.issue18738@psf.upfronthosting.co.za> |
2013-08-14 13:59:12 | eli.bendersky | link | issue18738 messages |
2013-08-14 13:59:12 | eli.bendersky | create | |
|