mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-123446: Fix empty function names in TypeError
s in _csv
module (#123462)
This commit is contained in:
parent
303f92a9ce
commit
58ce131037
1 changed files with 3 additions and 3 deletions
|
@ -1072,7 +1072,7 @@ csv_reader(PyObject *module, PyObject *args, PyObject *keyword_args)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "_csv.reader", 1, 2, &iterator, &dialect)) {
|
if (!PyArg_UnpackTuple(args, "reader", 1, 2, &iterator, &dialect)) {
|
||||||
Py_DECREF(self);
|
Py_DECREF(self);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -1519,7 +1519,7 @@ csv_writer(PyObject *module, PyObject *args, PyObject *keyword_args)
|
||||||
|
|
||||||
self->error_obj = Py_NewRef(module_state->error_obj);
|
self->error_obj = Py_NewRef(module_state->error_obj);
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "_csv.writer", 1, 2, &output_file, &dialect)) {
|
if (!PyArg_UnpackTuple(args, "writer", 1, 2, &output_file, &dialect)) {
|
||||||
Py_DECREF(self);
|
Py_DECREF(self);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -1571,7 +1571,7 @@ csv_register_dialect(PyObject *module, PyObject *args, PyObject *kwargs)
|
||||||
_csvstate *module_state = get_csv_state(module);
|
_csvstate *module_state = get_csv_state(module);
|
||||||
PyObject *dialect;
|
PyObject *dialect;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "_csv.register_dialect", 1, 2, &name_obj, &dialect_obj))
|
if (!PyArg_UnpackTuple(args, "register_dialect", 1, 2, &name_obj, &dialect_obj))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (!PyUnicode_Check(name_obj)) {
|
if (!PyUnicode_Check(name_obj)) {
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue