How to parse (in the C code) a tuple not sent as an argument?
Fred L. Drake, Jr.
fdrake at acm.org
Fri Dec 10 12:00:44 EST 1999
Wojciech Zabolotny writes:
> I have to parse in my C extension module a rather complicated tuple,
> which is not send as an argument.
> Is it correct and safe to use the PyArg_ParseTuple for this purpose?
This is perfectly reasonable. You can use the ';' format character
to specify an error message to use when a TypeError is raised because
the tuple being parsed doesn't match the format specifier.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
Corporation for National Research Initiatives
More information about the Python-list
mailing list