[Python-checkins] CVS: python/dist/src/Doc/lib libcodecs.tex,1.1,1.2

Fred Drake python-dev@python.org
Thu, 6 Apr 2000 12:10:02 -0400


Update of /projects/cvsroot/python/dist/src/Doc/lib
In directory seahag.cnri.reston.va.us:/home/fdrake/projects/python/Doc/lib
Modified Files:
	libcodecs.tex 
Log Message:
Make sure the \declaremodule uses the right name for the module!
Clean up several markup problems & inconsistencies.
Index: libcodecs.tex
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/lib/libcodecs.tex,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** libcodecs.tex	2000年04月06日 14:21:58	1.1
--- libcodecs.tex	2000年04月06日 16:09:59	1.2
***************
*** 1,6 ****
 \section{\module{codecs} ---
! Python codec registry and base classes}
 
! \declaremodule{standard}{codec}
 \modulesynopsis{Encode and decode data and streams.}
 \moduleauthor{Marc-Andre Lemburg}{mal@lemburg.com}
--- 1,6 ----
 \section{\module{codecs} ---
! Codec registry and base classes}
 
! \declaremodule{standard}{codecs}
 \modulesynopsis{Encode and decode data and streams.}
 \moduleauthor{Marc-Andre Lemburg}{mal@lemburg.com}
***************
*** 36,53 ****
 factory functions providing the following interface:
 
! 	\code{factory(\var{stream},\var{errors}='strict')}
 
 The factory functions must return objects providing the interfaces
! defined by the base classes
! \class{StreamWriter}/\class{StreamReader} resp. Stream codecs can
! maintain state.
! 
! Possible values for errors are 'strict' (raise an exception in case
! of an encoding error), 'replace' (replace malformed data with a
! suitable replacement marker, e.g. '?') and 'ignore' (ignore
! malformed data and continue without further notice).
 
 In case a search function cannot find a given encoding, it should
! return None.
 \end{funcdesc}
 
--- 36,54 ----
 factory functions providing the following interface:
 
! 	\code{factory(\var{stream}, \var{errors}='strict')}
 
 The factory functions must return objects providing the interfaces
! defined by the base classes \class{StreamWriter} and
! \class{StreamReader}, respectively. Stream codecs can maintain
! state.
! 
! Possible values for errors are \code{'strict'} (raise an exception
! in case of an encoding error), \code{'replace'} (replace malformed
! data with a suitable replacement marker, such as \character{?}) and
! \code{'ignore'} (ignore malformed data and continue without further
! notice).
 
 In case a search function cannot find a given encoding, it should
! return \code{None}.
 \end{funcdesc}
 
***************
*** 58,63 ****
 Encodings are first looked up in the registry's cache. If not found,
 the list of registered search functions is scanned. If no codecs tuple
! is found, a LookupError is raised. Otherwise, the codecs tuple is
! stored in the cache and returned to the caller.
 \end{funcdesc}
 
--- 59,64 ----
 Encodings are first looked up in the registry's cache. If not found,
 the list of registered search functions is scanned. If no codecs tuple
! is found, a \exception{LookupError} is raised. Otherwise, the codecs
! tuple is stored in the cache and returned to the caller.
 \end{funcdesc}
 
***************
*** 65,75 ****
 also defines these utility functions:
 
! \begin{funcdesc}{open}{filename, mode\optional{, encoding=None, errors='strict', buffering=1}}
 Open an encoded file using the given \var{mode} and return
 a wrapped version providing transparent encoding/decoding.
 
! Note: The wrapped version will only accept the object format defined
! by the codecs, i.e. Unicode objects for most builtin codecs. Output is
! also codec dependent and will usually by Unicode as well.
 
 \var{encoding} specifies the encoding which is to be used for the
--- 66,77 ----
 also defines these utility functions:
 
! \begin{funcdesc}{open}{filename, mode\optional{, encoding=None\optional{, errors='strict'\optional{, buffering=1}}}}
 Open an encoded file using the given \var{mode} and return
 a wrapped version providing transparent encoding/decoding.
 
! \strong{Note:} The wrapped version will only accept the object format
! defined by the codecs, i.e. Unicode objects for most builtin
! codecs. Output is also codec dependent and will usually by Unicode as
! well.
 
 \var{encoding} specifies the encoding which is to be used for the
***************
*** 80,88 ****
 an encoding error occurs.
 
! \var{buffering} has the same meaning as for the builtin open() API.
! It defaults to line buffered.
 \end{funcdesc}
 
! \begin{funcdesc}{EncodedFile}{file, input\optional{, output=None, errors='strict'}}
 
 Return a wrapped version of file which provides transparent
--- 82,90 ----
 an encoding error occurs.
 
! \var{buffering} has the same meaning as for the built-in
! \function{open()} function. It defaults to line buffered.
 \end{funcdesc}
 
! \begin{funcdesc}{EncodedFile}{file, input\optional{, output=None\optional{, errors='strict'}}}
 
 Return a wrapped version of file which provides transparent

AltStyle によって変換されたページ (->オリジナル) /