Index: Python/Python-ast.c =================================================================== --- Python/Python-ast.c (revision 62050) +++ Python/Python-ast.c (working copy) @@ -378,7 +378,7 @@ fields = PyObject_GetAttrString((PyObject*)Py_TYPE(self), "_fields"); if (!fields) PyErr_Clear(); - if (fields) { + if (fields && fields != Py_None) { numfields = PySequence_Size(fields); if (numfields == -1) goto cleanup; @@ -388,7 +388,7 @@ if (numfields != PyTuple_GET_SIZE(args)) { PyErr_Format(PyExc_TypeError, "%.400s constructor takes either 0 or " "%d positional argument%s", Py_TYPE(self)->tp_name, - numfields, numfields == 1 ? "" : "s"); + (int)numfields, numfields == 1 ? "" : "s"); res = -1; goto cleanup; }