Strange problem with C API

John Machin sjmachin at
Wed Feb 27 06:10:04 EST 2002

sjmachin at (John Machin) wrote in message news:<c76ff6fc.0202261402.10060a2 at>...
> amrit040 at (Amrit) wrote in message news:<71c0a06e.0202260513.4b67841f at>...

>> >       PyArg_Parse (obj[i], "f", &x[i]);
> (1) This is most likely what is causing the exception that you are
> getting -- the first arg to this function should be a *tuple*.

I was wrong -- the first arg can be a single object. However you
should be testing the returned value from PyArg_Parse()...

if (!PyArg_Parse(obj[i], "f", &x[i])) return NULL;

More information about the Python-list mailing list