summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-13 19:18:27 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-09-13 19:18:27 (GMT)
commit3f996e7266113eed814015d977d50e221c3a421d (patch)
tree97fb0360dd86d9aa466d2bf39a18dd8aa7dcd025 /Objects
parentbafedecc06176e431c3050ba8bcf1d4039e605af (diff)
downloadcpython-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.c2
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 &&