summaryrefslogtreecommitdiffstats
path: root/Doc/library/struct.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/struct.rst')
-rw-r--r--Doc/library/struct.rst34
1 files changed, 17 insertions, 17 deletions
diff --git a/Doc/library/struct.rst b/Doc/library/struct.rst
index 924cb60..a1832a1 100644
--- a/Doc/library/struct.rst
+++ b/Doc/library/struct.rst
@@ -242,37 +242,37 @@ The :mod:`struct` module also defines the following type:
since the format string only needs to be compiled once.
-Compiled Struct objects support the following methods and attributes:
+ Compiled Struct objects support the following methods and attributes:
-.. method:: Struct.pack(v1, v2, ...)
+ .. method:: pack(v1, v2, ...)
- Identical to the :func:`pack` function, using the compiled format.
- (``len(result)`` will equal :attr:`self.size`.)
+ Identical to the :func:`pack` function, using the compiled format.
+ (``len(result)`` will equal :attr:`self.size`.)
-.. method:: Struct.pack_into(buffer, offset, v1, v2, ...)
+ .. method:: pack_into(buffer, offset, v1, v2, ...)
- Identical to the :func:`pack_into` function, using the compiled format.
+ Identical to the :func:`pack_into` function, using the compiled format.
-.. method:: Struct.unpack(string)
+ .. method:: unpack(string)
- Identical to the :func:`unpack` function, using the compiled format.
- (``len(string)`` must equal :attr:`self.size`).
+ Identical to the :func:`unpack` function, using the compiled format.
+ (``len(string)`` must equal :attr:`self.size`).
-.. method:: Struct.unpack_from(buffer[, offset=0])
+ .. method:: unpack_from(buffer[, offset=0])
- Identical to the :func:`unpack_from` function, using the compiled format.
- (``len(buffer[offset:])`` must be at least :attr:`self.size`).
+ Identical to the :func:`unpack_from` function, using the compiled format.
+ (``len(buffer[offset:])`` must be at least :attr:`self.size`).
-.. attribute:: Struct.format
+ .. attribute:: format
- The format string used to construct this Struct object.
+ The format string used to construct this Struct object.
-.. attribute:: Struct.size
+ .. attribute:: size
- The calculated size of the struct (and hence of the string) corresponding
- to :attr:`format`.
+ The calculated size of the struct (and hence of the string) corresponding
+ to :attr:`format`.