PyListObject & C Modules

Martin v. Loewis martin at v.loewis.de
Thu Sep 5 14:24:41 EDT 2002


jggramlich at yahoo.com (Joshua Gramlich) writes:

>   if(!PyArg_ParseTuple(args, "!O", &list))
[...]
> TypeError: argument 1 must be impossible<bad format char>, not tuple

The format string is in error. "O" means "arbitrary object". "O!"
means "object of required type" (which you have to provide to
ParseTuple as well), "!O" is meaningless.

Regards,
Martin




More information about the Python-list mailing list