[Tutor] Argument values in C extension functions

Bob Lunney bob_lunney@yahoo.com
Wed, 31 Oct 2001 10:13:30 -0800 (PST)


I've inherited a (very cool) piece of Python code that
uses a C extension library.  In the library code are
checks to determine if the extension function is
receiving anything in the PyObject* args tuple.  It
checks this by seeing if args != NULL.  If so, it
bales out.  This particular function requires keyword
arguments, and the PyMethodDef struct is set up to use
METH_KEYWORDS.  

My question is:  will args necessarily be NULL (in
Python 2.1) when using keyword argument passing.  This
worked in Python 1.5.1, but no longer works in Python
2.1.  If the extension function calling protocol has
changed between the two Python versions will someone
please give me a synopsis of the changes or point me
to the appropriate resource material?

Thanks in advance,

Bob Lunney

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com