diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-02-07 23:06:11 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-02-07 23:06:11 (GMT) |
commit | c4b813d05dbf8b1bc1ab3c27198b397152deb4a3 (patch) | |
tree | 8411861dabd76cbbd1890225dc642d61641270c6 /Doc/c-api/arg.rst | |
parent | d5db14794bdeb4646ede5881aed43dd1838ffe7a (diff) | |
download | cpython-c4b813d05dbf8b1bc1ab3c27198b397152deb4a3.zip cpython-c4b813d05dbf8b1bc1ab3c27198b397152deb4a3.tar.gz cpython-c4b813d05dbf8b1bc1ab3c27198b397152deb4a3.tar.bz2 |
Issue #26198: Fixed error messages for some argument parsing errors.
Fixed the documented about buffer overflow error for "es#" and "et#" format
units.
Diffstat (limited to 'Doc/c-api/arg.rst')
-rw-r--r-- | Doc/c-api/arg.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst index caceb40..f2bb8c6 100644 --- a/Doc/c-api/arg.rst +++ b/Doc/c-api/arg.rst @@ -206,7 +206,8 @@ Unless otherwise stated, buffers are not NUL-terminated. :c:func:`PyArg_ParseTuple` will use this location as the buffer and interpret the initial value of *\*buffer_length* as the buffer size. It will then copy the encoded data into the buffer and NUL-terminate it. If the buffer is not large - enough, a :exc:`ValueError` will be set. + enough, a :exc:`TypeError` will be set. + Note: starting from Python 3.6 a :exc:`ValueError` will be set. In both cases, *\*buffer_length* is set to the length of the encoded data without the trailing NUL byte. |