Strange problem with C API
sjmachin at lexicon.net
Wed Feb 27 12:10:04 CET 2002
sjmachin at lexicon.net (John Machin) wrote in message news:<c76ff6fc.0202261402.10060a2 at posting.google.com>...
> amrit040 at yahoo.com (Amrit) wrote in message news:<71c0a06e.0202260513.4b67841f at posting.google.com>...
>> > 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