mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Disallow keyword args for exceptions.
This commit is contained in:
parent
008b861bf0
commit
861089fc49
2 changed files with 10 additions and 0 deletions
|
@ -32,6 +32,9 @@ BaseException_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
{
|
||||
PyBaseExceptionObject *self;
|
||||
|
||||
if (!_PyArg_NoKeywords("BaseException", kwds))
|
||||
return NULL;
|
||||
|
||||
self = (PyBaseExceptionObject *)type->tp_alloc(type, 0);
|
||||
/* the dict is created on the fly in PyObject_GenericSetAttr */
|
||||
self->message = self->dict = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue