@@ -76,85 +76,9 @@ \section{Software Requirements}
7676% The preceding sections will have been written in a gentler,
7777% introductory style. You may also wish to include a reference
7878% section, documenting all the functions/exceptions/constants.
79- % The following is a model for such a reference section, for
80- % an extension module written in C.
79+ % Often, these will be placed in separate files and input like this:
8180
82- \section {Extension Module \module {spamsprock} }
83- \exmodindex {spamsprock} % Set the module name for the index
84- \label {module-spamsprock } % Create a label for cross-references
85-
86- A \C {} module is provided to perform spammification operations very
87- quickly. It exports a function, an exception, and some constants.
88-
89- % A function definition
90- \begin {funcdesc }{spammify}{sprocket\optional {, options}}
91- Spammify the sprocket given as \var {sprocket}. Flags my be
92- bitwise-ORed together and passed as \var {options}.
93- \end {funcdesc }
94-
95- % An exception definition
96- \begin {excdesc }{SpamError}
97- The exception that is raised when spammification fails, or just takes
98- too long.
99- \end {excdesc }
100-
101- % A definition of two constants
102- \begin {datadesc }{FROBNICATE}
103- Value to be used for the \var {options} parameter to
104- \function {spammify()} to indicate that the \var {sprocket} parameter to
105- that function should be frobnicated as well as spammified.
106- \end {datadesc }
107-
108- \begin {datadesc }{NO_FROBNICATE}
109- As with \constant {FROBNICATE}, but indicates that frobnication should
110- not be performed. The default is to frobnicate randomly.
111- \end {datadesc }
112-
113-
114- % The following section is a model for documenting modules written in
115- % Python.
116-
117- \section {Module \module {sprunkit} }
118- \modindex {ezspam}
119- \label {module-sprunkit }
120-
121- This module provides a high level interface to spammification
122- operations. It provides an interesting base class and an exception.
123-
124- % A class definition
125- \begin {classdesc }{SprunkSprocket}{\optional {path}}
126- A Python-only implementation of a persistent sprocket. The \var {path}
127- parameter should refer to a spocket definition file. If omitted, a
128- new sprocket is created.
129- \end {classdesc }
130-
131- % An exception definition
132- \begin {excdesc }{PersistenceError}
133- Exception raised when the \method {save()} method of a
134- \class {SprunkSprockit} instance fails.
135- \end {excdesc }
136-
137-
138- \subsection {\class {SprunkSprocket} Objects }
139-
140- \class {SprunkSprocket} objects have the following methods:
141-
142- \begin {funcdesc }{save}{\optional {path}}
143- Save the sprocket in the file specified by \var {path}. If \var {path}
144- is omitted, the \var {path} specified to the constructor is used. If
145- neither was specified, raises the \exception {PersistenceError}
146- exception.
147- \end {funcdesc }
148-
149-
150- \begin {funcdesc }{persist}{path}
151- Set the default file name that the \method {save()} method will use.
152- \end {funcdesc }
153-
154-
155- \begin {funcdesc }{insist}{}
156- Make the sprocket assert itself. This method cannot fail.
157- \end {funcdesc }
81+ \input {module }
15882
15983
16084\appendix
0 commit comments