diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-09-13 19:18:27 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-09-13 19:18:27 (GMT) |
commit | 3f996e7266113eed814015d977d50e221c3a421d (patch) | |
tree | 97fb0360dd86d9aa466d2bf39a18dd8aa7dcd025 /Objects | |
parent | bafedecc06176e431c3050ba8bcf1d4039e605af (diff) | |
download | cpython-3f996e7266113eed814015d977d50e221c3a421d.zip cpython-3f996e7266113eed814015d977d50e221c3a421d.tar.gz cpython-3f996e7266113eed814015d977d50e221c3a421d.tar.bz2 |
type_call(): Change in policy. The keyword args (if any) are now passed
on to the tp_new slot (if non-NULL), as well as to the tp_init slot (if
any). A sane type implementing both tp_new and tp_init should probably
pay attention to the arguments in only one of them.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 430e68c..0d154d9 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -151,7 +151,7 @@ type_call(PyTypeObject *type, PyObject *args, PyObject *kwds) return NULL; } - obj = type->tp_new(type, args, NULL); + obj = type->tp_new(type, args, kwds); if (obj != NULL) { type = obj->ob_type; if (type->tp_init != NULL && |