[3.8] bpo-37034: Display argument name on errors with keyword arguments with Argument Clinic. (GH-13593). by serhiy-storchaka · Pull Request #15599 · python/cpython
Expand Up
@@ -21,11 +21,11 @@ _io__BufferedIOBase_readinto(PyObject *self, PyObject *arg)
if (PyObject_GetBuffer(arg, &buffer, PyBUF_WRITABLE) < 0) { PyErr_Clear(); _PyArg_BadArgument("readinto", 0, "read-write bytes-like object", arg); _PyArg_BadArgument("readinto", "argument", "read-write bytes-like object", arg); goto exit; } if (!PyBuffer_IsContiguous(&buffer, 'C')) { _PyArg_BadArgument("readinto", 0, "contiguous buffer", arg); _PyArg_BadArgument("readinto", "argument", "contiguous buffer", arg); goto exit; } return_value = _io__BufferedIOBase_readinto_impl(self, &buffer); Expand Down Expand Up @@ -58,11 +58,11 @@ _io__BufferedIOBase_readinto1(PyObject *self, PyObject *arg)
if (PyObject_GetBuffer(arg, &buffer, PyBUF_WRITABLE) < 0) { PyErr_Clear(); _PyArg_BadArgument("readinto1", 0, "read-write bytes-like object", arg); _PyArg_BadArgument("readinto1", "argument", "read-write bytes-like object", arg); goto exit; } if (!PyBuffer_IsContiguous(&buffer, 'C')) { _PyArg_BadArgument("readinto1", 0, "contiguous buffer", arg); _PyArg_BadArgument("readinto1", "argument", "contiguous buffer", arg); goto exit; } return_value = _io__BufferedIOBase_readinto1_impl(self, &buffer); Expand Down Expand Up @@ -243,11 +243,11 @@ _io__Buffered_readinto(buffered *self, PyObject *arg)
if (PyObject_GetBuffer(arg, &buffer, PyBUF_WRITABLE) < 0) { PyErr_Clear(); _PyArg_BadArgument("readinto", 0, "read-write bytes-like object", arg); _PyArg_BadArgument("readinto", "argument", "read-write bytes-like object", arg); goto exit; } if (!PyBuffer_IsContiguous(&buffer, 'C')) { _PyArg_BadArgument("readinto", 0, "contiguous buffer", arg); _PyArg_BadArgument("readinto", "argument", "contiguous buffer", arg); goto exit; } return_value = _io__Buffered_readinto_impl(self, &buffer); Expand Down Expand Up @@ -280,11 +280,11 @@ _io__Buffered_readinto1(buffered *self, PyObject *arg)
if (PyObject_GetBuffer(arg, &buffer, PyBUF_WRITABLE) < 0) { PyErr_Clear(); _PyArg_BadArgument("readinto1", 0, "read-write bytes-like object", arg); _PyArg_BadArgument("readinto1", "argument", "read-write bytes-like object", arg); goto exit; } if (!PyBuffer_IsContiguous(&buffer, 'C')) { _PyArg_BadArgument("readinto1", 0, "contiguous buffer", arg); _PyArg_BadArgument("readinto1", "argument", "contiguous buffer", arg); goto exit; } return_value = _io__Buffered_readinto1_impl(self, &buffer); Expand Down Expand Up @@ -538,7 +538,7 @@ _io_BufferedWriter_write(buffered *self, PyObject *arg) goto exit; } if (!PyBuffer_IsContiguous(&buffer, 'C')) { _PyArg_BadArgument("write", 0, "contiguous buffer", arg); _PyArg_BadArgument("write", "argument", "contiguous buffer", arg); goto exit; } return_value = _io_BufferedWriter_write_impl(self, &buffer); Expand Down Expand Up @@ -672,4 +672,4 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } /*[clinic end generated code: output=b22b4aedd53c340a input=a9049054013a1b77]*/ /*[clinic end generated code: output=7246104f6c7d3167 input=a9049054013a1b77]*/
if (PyObject_GetBuffer(arg, &buffer, PyBUF_WRITABLE) < 0) { PyErr_Clear(); _PyArg_BadArgument("readinto", 0, "read-write bytes-like object", arg); _PyArg_BadArgument("readinto", "argument", "read-write bytes-like object", arg); goto exit; } if (!PyBuffer_IsContiguous(&buffer, 'C')) { _PyArg_BadArgument("readinto", 0, "contiguous buffer", arg); _PyArg_BadArgument("readinto", "argument", "contiguous buffer", arg); goto exit; } return_value = _io__BufferedIOBase_readinto_impl(self, &buffer); Expand Down Expand Up @@ -58,11 +58,11 @@ _io__BufferedIOBase_readinto1(PyObject *self, PyObject *arg)
if (PyObject_GetBuffer(arg, &buffer, PyBUF_WRITABLE) < 0) { PyErr_Clear(); _PyArg_BadArgument("readinto1", 0, "read-write bytes-like object", arg); _PyArg_BadArgument("readinto1", "argument", "read-write bytes-like object", arg); goto exit; } if (!PyBuffer_IsContiguous(&buffer, 'C')) { _PyArg_BadArgument("readinto1", 0, "contiguous buffer", arg); _PyArg_BadArgument("readinto1", "argument", "contiguous buffer", arg); goto exit; } return_value = _io__BufferedIOBase_readinto1_impl(self, &buffer); Expand Down Expand Up @@ -243,11 +243,11 @@ _io__Buffered_readinto(buffered *self, PyObject *arg)
if (PyObject_GetBuffer(arg, &buffer, PyBUF_WRITABLE) < 0) { PyErr_Clear(); _PyArg_BadArgument("readinto", 0, "read-write bytes-like object", arg); _PyArg_BadArgument("readinto", "argument", "read-write bytes-like object", arg); goto exit; } if (!PyBuffer_IsContiguous(&buffer, 'C')) { _PyArg_BadArgument("readinto", 0, "contiguous buffer", arg); _PyArg_BadArgument("readinto", "argument", "contiguous buffer", arg); goto exit; } return_value = _io__Buffered_readinto_impl(self, &buffer); Expand Down Expand Up @@ -280,11 +280,11 @@ _io__Buffered_readinto1(buffered *self, PyObject *arg)
if (PyObject_GetBuffer(arg, &buffer, PyBUF_WRITABLE) < 0) { PyErr_Clear(); _PyArg_BadArgument("readinto1", 0, "read-write bytes-like object", arg); _PyArg_BadArgument("readinto1", "argument", "read-write bytes-like object", arg); goto exit; } if (!PyBuffer_IsContiguous(&buffer, 'C')) { _PyArg_BadArgument("readinto1", 0, "contiguous buffer", arg); _PyArg_BadArgument("readinto1", "argument", "contiguous buffer", arg); goto exit; } return_value = _io__Buffered_readinto1_impl(self, &buffer); Expand Down Expand Up @@ -538,7 +538,7 @@ _io_BufferedWriter_write(buffered *self, PyObject *arg) goto exit; } if (!PyBuffer_IsContiguous(&buffer, 'C')) { _PyArg_BadArgument("write", 0, "contiguous buffer", arg); _PyArg_BadArgument("write", "argument", "contiguous buffer", arg); goto exit; } return_value = _io_BufferedWriter_write_impl(self, &buffer); Expand Down Expand Up @@ -672,4 +672,4 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } /*[clinic end generated code: output=b22b4aedd53c340a input=a9049054013a1b77]*/ /*[clinic end generated code: output=7246104f6c7d3167 input=a9049054013a1b77]*/