[Python-checkins] python/dist/src/Doc/lib libbz2.tex,1.3,1.4
fdrake@users.sourceforge.net
fdrake@users.sourceforge.net
Fri, 15 Nov 2002 08:38:09 -0800
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv15127
Modified Files:
libbz2.tex
Log Message:
Minor revisions to clarify the status of xreadlines(), change the way
iteration support was documented; the docs for __iter__() were just
confusing.
Index: libbz2.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbz2.tex,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** libbz2.tex 5 Nov 2002 23:55:27 -0000 1.3
--- libbz2.tex 15 Nov 2002 16:38:06 -0000 1.4
***************
*** 18,22 ****
\begin{itemize}
\item \class{BZ2File} class implements a complete file interface, including
! \method{readline()}, \method{readlines()}, \method{xreadlines()},
\method{writelines()}, \method{seek()}, etc;
\item \class{BZ2File} class implements emulated \method{seek()} support;
--- 18,22 ----
\begin{itemize}
\item \class{BZ2File} class implements a complete file interface, including
! \method{readline()}, \method{readlines()},
\method{writelines()}, \method{seek()}, etc;
\item \class{BZ2File} class implements emulated \method{seek()} support;
***************
*** 48,59 ****
\var{compresslevel} is given, must be a number between \code{1} and
\code{9}; the default is \code{9}.
! Add a \code{'U'} to mode to open the file for input with universal newline
support. Any line ending in the input file will be seen as a
! \character{\textbackslash n}
! in Python. Also, a file so opened gains the attribute \member{newlines};
! the value for this attribute is one of \code{None} (no newline read yet),
! \code{'\textbackslash r'}, \code{'\textbackslash n'},
! \code{'\textbackslash r\textbackslash n'} or a tuple containing all the
! newline types seen. Universal newlines are available only when reading.
\end{classdesc}
--- 48,60 ----
\var{compresslevel} is given, must be a number between \code{1} and
\code{9}; the default is \code{9}.
! Add a \character{U} to mode to open the file for input with universal newline
support. Any line ending in the input file will be seen as a
! \character{\e n} in Python. Also, a file so opened gains the
! attribute \member{newlines}; the value for this attribute is one of
! \code{None} (no newline read yet), \code{'\e r'}, \code{'\e n'},
! \code{'\e r\e n'} or a tuple containing all the newline types
! seen. Universal newlines are available only when reading.
! Instances support iteration in the same way as normal \class{file}
! instances.
\end{classdesc}
***************
*** 83,93 ****
\begin{methoddesc}[BZ2File]{xreadlines}{}
For backward compatibility. \class{BZ2File} objects now include the
! performance optimizations previously implemented in the \module{xreadlines}
! module.
! \end{methoddesc}
!
! \begin{methoddesc}[BZ2File]{\_\_iter\_\_}{}
! Iterate through the file lines. Iteration optimization is implemented
! using the same readahead algorithm available in \class{file} objects.
\end{methoddesc}
--- 84,92 ----
\begin{methoddesc}[BZ2File]{xreadlines}{}
For backward compatibility. \class{BZ2File} objects now include the
! performance optimizations previously implemented in the
! \refmodule{xreadlines} module.
! \deprecated{2.3}{This exists only for compatibility with the method by
! this name on \class{file} objects, which is
! deprecated. Use \code{for line in file} instead.}
\end{methoddesc}