Methods of built-in types now properly check for keyword arguments

(formerly these were silently ignored).  The only built-in methods
that take keyword arguments are __call__, __init__ and __new__.
This commit is contained in:
Guido van Rossum 2001-10-22 00:43:43 +00:00
parent d6bebce5e5
commit c8e5645f15
5 changed files with 45 additions and 12 deletions

View file

@ -14,15 +14,22 @@ typedef struct PyGetSetDef {
typedef PyObject *(*wrapperfunc)(PyObject *self, PyObject *args,
void *wrapped);
typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args,
void *wrapped, PyObject *kwds);
struct wrapperbase {
char *name;
int offset;
void *function;
wrapperfunc wrapper;
char *doc;
int flags;
PyObject *name_strobj;
};
/* Flags for above struct */
#define PyWrapperFlag_KEYWORDS 1 /* wrapper function takes keyword args */
/* Various kinds of descriptor objects */
#define PyDescr_COMMON \