[Python-Dev] list.extend
David Abrahams
David Abrahams" <david.abrahams@rcn.com
Fri, 28 Jun 2002 00:01:34 -0400
From: "Tim Peters" <tim@zope.com>
> Thanks for the loan of the eyeballs!
As long as I'm eyeballin' (and you're thankin'), I notice in PyInt_AsLong:
if (op == NULL || (nb = op->ob_type->tp_as_number) == NULL ||
nb->nb_int == NULL) {
PyErr_SetString(PyExc_TypeError, "an integer is required");
return -1;
}
But really, an integer isn't required; Any type with a tp_as_number section
and a conversion to int will do. Should the error say "a numeric type
convertible to int is required"?
-Dave