diff options
author | Fred Drake <fdrake@acm.org> | 1998-04-11 20:05:43 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1998-04-11 20:05:43 (GMT) |
commit | 9463de209293ebaec89f9a1fadde4bd036580d73 (patch) | |
tree | e91104f739e5c7a67468f9bcb1c3c24fcb7a6862 /Doc | |
parent | 10032ebb48b4e9b8b2eb7c378d3a579da36204d6 (diff) | |
download | cpython-9463de209293ebaec89f9a1fadde4bd036580d73.zip cpython-9463de209293ebaec89f9a1fadde4bd036580d73.tar.gz cpython-9463de209293ebaec89f9a1fadde4bd036580d73.tar.bz2 |
Document cPickle and cStringIO.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libpickle.tex | 18 | ||||
-rw-r--r-- | Doc/lib/libstrio.tex | 16 | ||||
-rw-r--r-- | Doc/lib/libundoc.tex | 11 | ||||
-rw-r--r-- | Doc/libpickle.tex | 18 | ||||
-rw-r--r-- | Doc/libstrio.tex | 16 | ||||
-rw-r--r-- | Doc/libundoc.tex | 11 |
6 files changed, 68 insertions, 22 deletions
diff --git a/Doc/lib/libpickle.tex b/Doc/lib/libpickle.tex index 038b763..65075b9 100644 --- a/Doc/lib/libpickle.tex +++ b/Doc/lib/libpickle.tex @@ -270,3 +270,21 @@ registration} \seemodule{shelve}{indexed databases of objects; uses \module{pickle}} \end{seealso} + + +\section{Built-in Module \module{cPickle}} +\bimodindex{cPickle} +\label{module-cPickle} + +% This section was written by Fred L. Drake, Jr. <fdrake@acm.org> + +The \module{cPickle} module provides a similar interface and identical +functionality as the \module{pickle} module, but can be up to 1000 +times faster since it is implemented in \C{}. The only other +important difference to note is that \function{Pickler()} and +\function{Unpickler()} are functions and not classes, and so cannot be +subclassed. This should not be an issue in most cases. + +The format of the pickle data is identical to that produced using the +\module{pickle} module, so it is possible to use \module{pickle} and +\module{cPickle} interchangably with existing pickles. diff --git a/Doc/lib/libstrio.tex b/Doc/lib/libstrio.tex index 0088ec3..86ebf46 100644 --- a/Doc/lib/libstrio.tex +++ b/Doc/lib/libstrio.tex @@ -24,3 +24,19 @@ Retrieve the entire contents of the ``file'' at any time before the \begin{methoddesc}{close}{} Free the memory buffer. \end{methoddesc} + + +\section{Built-in Module \module{cStringIO}} +\bimodindex{cStringIO} +\label{module-cStringIO} + +% This section was written by Fred L. Drake, Jr. <fdrake@acm.org> + +The module \module{cStringIO} provides an interface similar to that of +the \module{StringIO} module. Heavy use of \class{StringIO.StringIO} +objects can be made more efficient by using the function +\function{StringIO()} from this module instead. + +Since this module provides a factory function which returns objects of +built-in types, there's no way to build your own version using +subclassing. Use the original \module{StringIO} module in that case. diff --git a/Doc/lib/libundoc.tex b/Doc/lib/libundoc.tex index 601d750..99386fe 100644 --- a/Doc/lib/libundoc.tex +++ b/Doc/lib/libundoc.tex @@ -7,17 +7,6 @@ them! (The idea and most contents for this chapter were taken from a posting by Fredrik Lundh; I have revised some modules' status.) -\section{Fundamental, and pretty straightforward to document} - -\begin{description} -\item[cPickle.c] ---- mostly the same as pickle but no subclassing - -\item[cStringIO.c] ---- mostly the same as StringIO but no subclassing -\end{description} - - \section{Frameworks; somewhat harder to document, but well worth the effort} \begin{description} diff --git a/Doc/libpickle.tex b/Doc/libpickle.tex index 038b763..65075b9 100644 --- a/Doc/libpickle.tex +++ b/Doc/libpickle.tex @@ -270,3 +270,21 @@ registration} \seemodule{shelve}{indexed databases of objects; uses \module{pickle}} \end{seealso} + + +\section{Built-in Module \module{cPickle}} +\bimodindex{cPickle} +\label{module-cPickle} + +% This section was written by Fred L. Drake, Jr. <fdrake@acm.org> + +The \module{cPickle} module provides a similar interface and identical +functionality as the \module{pickle} module, but can be up to 1000 +times faster since it is implemented in \C{}. The only other +important difference to note is that \function{Pickler()} and +\function{Unpickler()} are functions and not classes, and so cannot be +subclassed. This should not be an issue in most cases. + +The format of the pickle data is identical to that produced using the +\module{pickle} module, so it is possible to use \module{pickle} and +\module{cPickle} interchangably with existing pickles. diff --git a/Doc/libstrio.tex b/Doc/libstrio.tex index 0088ec3..86ebf46 100644 --- a/Doc/libstrio.tex +++ b/Doc/libstrio.tex @@ -24,3 +24,19 @@ Retrieve the entire contents of the ``file'' at any time before the \begin{methoddesc}{close}{} Free the memory buffer. \end{methoddesc} + + +\section{Built-in Module \module{cStringIO}} +\bimodindex{cStringIO} +\label{module-cStringIO} + +% This section was written by Fred L. Drake, Jr. <fdrake@acm.org> + +The module \module{cStringIO} provides an interface similar to that of +the \module{StringIO} module. Heavy use of \class{StringIO.StringIO} +objects can be made more efficient by using the function +\function{StringIO()} from this module instead. + +Since this module provides a factory function which returns objects of +built-in types, there's no way to build your own version using +subclassing. Use the original \module{StringIO} module in that case. diff --git a/Doc/libundoc.tex b/Doc/libundoc.tex index 601d750..99386fe 100644 --- a/Doc/libundoc.tex +++ b/Doc/libundoc.tex @@ -7,17 +7,6 @@ them! (The idea and most contents for this chapter were taken from a posting by Fredrik Lundh; I have revised some modules' status.) -\section{Fundamental, and pretty straightforward to document} - -\begin{description} -\item[cPickle.c] ---- mostly the same as pickle but no subclassing - -\item[cStringIO.c] ---- mostly the same as StringIO but no subclassing -\end{description} - - \section{Frameworks; somewhat harder to document, but well worth the effort} \begin{description} |