Merged revisions 62490 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r62490 | benjamin.peterson | 2008-04-24 20:29:10 -0500 (Thu, 24 Apr 2008) | 2 lines
reformat some documentation of classes so methods and attributes are under the class directive
........
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 @@
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`.