diff Modules/arraymodule.c @ 40682:77e0f4718a7c legacy-trunk

Bug #1486663: don't reject keyword arguments for subclasses of builtin types.
author Georg Brandl <georg@python.org>
date Sun, 21 Jan 2007 10:28:43 +0000
parents a88bc3bad651
children f764a7552162
line wrap: on
line diff
--- a/Modules/arraymodule.c	Sun Jan 21 09:33:07 2007 +0000
+++ b/Modules/arraymodule.c	Sun Jan 21 10:28:43 2007 +0000
@@ -1797,7 +1797,7 @@
 	PyObject *initial = NULL, *it = NULL;
 	struct arraydescr *descr;
 	
-	if (!_PyArg_NoKeywords("array.array()", kwds))
+	if (type == &Arraytype && !_PyArg_NoKeywords("array.array()", kwds))
 		return NULL;
 
 	if (!PyArg_ParseTuple(args, "c|O:array", &c, &initial))