File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -270,3 +270,21 @@ \section{Standard Module \module{pickle}}
270270
271271\seemodule {shelve}{indexed databases of objects; uses \module {pickle}}
272272\end {seealso }
273+
274+
275+ \section {Built-in Module \module {cPickle} }
276+ \bimodindex {cPickle}
277+ \label {module-cPickle }
278+
279+ % This section was written by Fred L. Drake, Jr. <[email protected] >280+
281+ The \module {cPickle} module provides a similar interface and identical
282+ functionality as the \module {pickle} module, but can be up to 1000
283+ times faster since it is implemented in \C {}. The only other
284+ important difference to note is that \function {Pickler()} and
285+ \function {Unpickler()} are functions and not classes, and so cannot be
286+ subclassed. This should not be an issue in most cases.
287+
288+ The format of the pickle data is identical to that produced using the
289+ \module {pickle} module, so it is possible to use \module {pickle} and
290+ \module {cPickle} interchangably with existing pickles.
Original file line number Diff line number Diff line change @@ -24,3 +24,19 @@ \section{Standard Module \module{StringIO}}
2424\begin {methoddesc }{close}{}
2525Free the memory buffer.
2626\end {methoddesc }
27+
28+
29+ \section {Built-in Module \module {cStringIO} }
30+ \bimodindex {cStringIO}
31+ \label {module-cStringIO }
32+
33+ % This section was written by Fred L. Drake, Jr. <[email protected] >34+
35+ The module \module {cStringIO} provides an interface similar to that of
36+ the \module {StringIO} module. Heavy use of \class {StringIO.StringIO}
37+ objects can be made more efficient by using the function
38+ \function {StringIO()} from this module instead.
39+
40+ Since this module provides a factory function which returns objects of
41+ built-in types, there's no way to build your own version using
42+ subclassing. Use the original \module {StringIO} module in that case.
Original file line number Diff line number Diff line change @@ -7,17 +7,6 @@ \chapter{Undocumented Modules}
77posting by Fredrik Lundh; I have revised some modules' status.)
88
99
10- \section {Fundamental, and pretty straightforward to document }
11-
12- \begin {description }
13- \item [cPickle.c]
14- --- mostly the same as pickle but no subclassing
15-
16- \item [cStringIO.c]
17- --- mostly the same as StringIO but no subclassing
18- \end {description }
19-
20-
2110\section {Frameworks; somewhat harder to document, but well worth the effort }
2211
2312\begin {description }
Original file line number Diff line number Diff line change @@ -270,3 +270,21 @@ \section{Standard Module \module{pickle}}
270270
271271\seemodule {shelve}{indexed databases of objects; uses \module {pickle}}
272272\end {seealso }
273+
274+
275+ \section {Built-in Module \module {cPickle} }
276+ \bimodindex {cPickle}
277+ \label {module-cPickle }
278+
279+ % This section was written by Fred L. Drake, Jr. <[email protected] >280+
281+ The \module {cPickle} module provides a similar interface and identical
282+ functionality as the \module {pickle} module, but can be up to 1000
283+ times faster since it is implemented in \C {}. The only other
284+ important difference to note is that \function {Pickler()} and
285+ \function {Unpickler()} are functions and not classes, and so cannot be
286+ subclassed. This should not be an issue in most cases.
287+
288+ The format of the pickle data is identical to that produced using the
289+ \module {pickle} module, so it is possible to use \module {pickle} and
290+ \module {cPickle} interchangably with existing pickles.
Original file line number Diff line number Diff line change @@ -24,3 +24,19 @@ \section{Standard Module \module{StringIO}}
2424\begin {methoddesc }{close}{}
2525Free the memory buffer.
2626\end {methoddesc }
27+
28+
29+ \section {Built-in Module \module {cStringIO} }
30+ \bimodindex {cStringIO}
31+ \label {module-cStringIO }
32+
33+ % This section was written by Fred L. Drake, Jr. <[email protected] >34+
35+ The module \module {cStringIO} provides an interface similar to that of
36+ the \module {StringIO} module. Heavy use of \class {StringIO.StringIO}
37+ objects can be made more efficient by using the function
38+ \function {StringIO()} from this module instead.
39+
40+ Since this module provides a factory function which returns objects of
41+ built-in types, there's no way to build your own version using
42+ subclassing. Use the original \module {StringIO} module in that case.
Original file line number Diff line number Diff line change @@ -7,17 +7,6 @@ \chapter{Undocumented Modules}
77posting by Fredrik Lundh; I have revised some modules' status.)
88
99
10- \section {Fundamental, and pretty straightforward to document }
11-
12- \begin {description }
13- \item [cPickle.c]
14- --- mostly the same as pickle but no subclassing
15-
16- \item [cStringIO.c]
17- --- mostly the same as StringIO but no subclassing
18- \end {description }
19-
20-
2110\section {Frameworks; somewhat harder to document, but well worth the effort }
2211
2312\begin {description }
You can’t perform that action at this time.
0 commit comments