Extension Doc bug
Michael P. Reilly
arcege at shore.net
Fri Apr 30 16:36:37 EDT 1999
Michael P. Reilly <arcege at shore.net> wrote:
: Fred L. Drake <fdrake at cnri.reston.va.us> wrote:
: : Michael P. Reilly writes:
: : > I just spent the morning trying to find a very obscure bug related to
: : > the passing keyword arguments to a builtin method/function.
: : Michael,
: : You didn't post your original code that exhibited the bug, so I
: : can't be sure of my conclusions. If you can send source for enough of
: : your extension module that someone can compile it, that would be
: : helpful.
: : My first inclination, however, is that you passed in illegal
: : arguments to PyArg_ParseTupleAndKeywords(). Passing NULL for the
: : keywords dictionary is allowed; I've been looking at the
: : implementation and don't see a way for that to be a problem (but I
: : might have missed something).
Some additional information: the exc_value that I got was 'bad argument
to internal function' which is set by PyErr_BadInternalCall(). The
only location inside the calling routines for this exception to be
raised is inside ceval.c:call_function() (true for 1.5.1 and 1.5.2):
if (kw != NULL && !PyDict_Check(kw)) {
PyErr_BadInternalCall();
return NULL;
}
Hopefully, I will be able to recreate and debug this further this
weekend.
-Arcege
More information about the Python-list
mailing list