@@ -62,25 +62,25 @@ The module defines the following exception and functions:
6262
6363 Unpack from the buffer *buffer * (presumably packed by ``pack(fmt, ...) ``)
6464 according to the format string *fmt *. The result is a tuple even if it
65- contains exactly one item. The buffer must contain exactly the amount of
66- data required by the format (`` len(bytes) `` must equal `` calcsize(fmt) ``) .
65+ contains exactly one item. The buffer's size in bytes must match the
66+ size required by the format, as reflected by :func: ` calcsize ` .
6767
6868
6969.. function :: unpack_from(fmt, buffer, offset=0)
7070
7171 Unpack from *buffer * starting at position *offset *, according to the format
7272 string *fmt *. The result is a tuple even if it contains exactly one
73- item. * buffer * must contain at least the amount of data required by the
74- format (`` len(buffer[offset:]) `` must be at least `` calcsize(fmt) ``) .
73+ item. The buffer's size in bytes, minus * offset *, must be at least
74+ the size required by the format, as reflected by :func: ` calcsize ` .
7575
7676
7777.. function :: iter_unpack(fmt, buffer)
7878
7979 Iteratively unpack from the buffer *buffer * according to the format
8080 string *fmt *. This function returns an iterator which will read
8181 equally-sized chunks from the buffer until all its contents have been
82- consumed. The buffer's size in bytes must be a multiple of the amount
83- of data required by the format, as reflected by :func: `calcsize `.
82+ consumed. The buffer's size in bytes must be a multiple of the size
83+ required by the format, as reflected by :func: `calcsize `.
8484
8585 Each iteration yields a tuple as specified by the format string.
8686
@@ -389,7 +389,7 @@ The :mod:`struct` module also defines the following type:
389389 .. method :: pack(v1, v2, ...)
390390
391391 Identical to the :func: `pack ` function, using the compiled format.
392- (``len(result) `` will equal :attr: `self. size `.)
392+ (``len(result) `` will equal :attr: `size `.)
393393
394394
395395 .. method :: pack_into(buffer, offset, v1, v2, ...)
@@ -400,19 +400,20 @@ The :mod:`struct` module also defines the following type:
400400 .. method :: unpack(buffer)
401401
402402 Identical to the :func: `unpack ` function, using the compiled format.
403- (`` len( buffer) `` must equal :attr: `self. size `) .
403+ The buffer's size in bytes must equal :attr: `size `.
404404
405405
406406 .. method :: unpack_from(buffer, offset=0)
407407
408408 Identical to the :func: `unpack_from ` function, using the compiled format.
409- (``len(buffer[offset:]) `` must be at least :attr: `self.size `).
409+ The buffer's size in bytes, minus *offset *, must be at least
410+ :attr: `size `.
410411
411412
412413 .. method :: iter_unpack(buffer)
413414
414415 Identical to the :func: `iter_unpack ` function, using the compiled format.
415- (`` len( buffer) `` must be a multiple of :attr: `self. size `) .
416+ The buffer's size in bytes must be a multiple of :attr: `size `.
416417
417418 .. versionadded :: 3.4
418419
0 commit comments