diff options
author | Xiang Zhang <angwerzx@126.com> | 2018-03-10 18:58:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-10 18:58:52 (GMT) |
commit | c10b288f345aaef66d2c844924b9a576f9ea4f8b (patch) | |
tree | 30d64745d62c991b5d18bfc1c381f31b165c7c4d /Doc | |
parent | 67ee07795bcd84b679c000780212d4d81a1490a3 (diff) | |
download | cpython-c10b288f345aaef66d2c844924b9a576f9ea4f8b.zip cpython-c10b288f345aaef66d2c844924b9a576f9ea4f8b.tar.gz cpython-c10b288f345aaef66d2c844924b9a576f9ea4f8b.tar.bz2 |
bpo-30249: Improve struct.unpack_from() error messages (GH-6059)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/struct.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/struct.rst b/Doc/library/struct.rst index 2d0866c..d6a3cb7 100644 --- a/Doc/library/struct.rst +++ b/Doc/library/struct.rst @@ -74,8 +74,8 @@ The module defines the following exception and functions: Unpack from *buffer* starting at position *offset*, according to the format string *format*. The result is a tuple even if it contains exactly one - item. The buffer's size in bytes, minus *offset*, must be at least - the size required by the format, as reflected by :func:`calcsize`. + item. The buffer's size in bytes, starting at position *offset*, must be at + least the size required by the format, as reflected by :func:`calcsize`. .. function:: iter_unpack(format, buffer) @@ -428,7 +428,7 @@ The :mod:`struct` module also defines the following type: .. method:: unpack_from(buffer, offset=0) Identical to the :func:`unpack_from` function, using the compiled format. - The buffer's size in bytes, minus *offset*, must be at least + The buffer's size in bytes, starting at position *offset*, must be at least :attr:`size`. |