I've fixed it so that it automatically converts it for you.
Here is the new version of getfloatdouble(), located in floatobject.c:
double
getfloatvalue(op)
object *op;
{
if (!is_floatobject(op)) {
if(!is_intobject(op)) {
err_badarg();
return -1;
} else return (double)((intobject *)op) -> ob_ival;
}
else
return ((floatobject *)op) -> ob_fval;
}
What the old version did was to see if the parameter being passed was
a float; if not, it returned an error. What I do now is before I
return, I see if it is an integer, and if it is, I convert it;
otherwise, there is still an error.
This could logically be extended to automatically convert strings,
etc.
Steve