mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Disallow keyword arguments for type constructors that don't use them.
(fixes bug #1119418)
This commit is contained in:
parent
bd77da6dab
commit
02c42871cf
13 changed files with 100 additions and 13 deletions
|
@ -95,6 +95,9 @@ deque_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
dequeobject *deque;
|
||||
block *b;
|
||||
|
||||
if (!_PyArg_NoKeywords("deque()", kwds))
|
||||
return NULL;
|
||||
|
||||
/* create dequeobject structure */
|
||||
deque = (dequeobject *)type->tp_alloc(type, 0);
|
||||
if (deque == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue