[Python-checkins] python/dist/src/Doc/lib libcodecs.tex, 1.34.2.1, 1.34.2.2

loewis@users.sourceforge.net loewis at users.sourceforge.net
Wed Aug 24 09:38:46 CEST 2005


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24772/Doc/lib

Modified Files:
      Tag: release24-maint
	libcodecs.tex 
Log Message:
Return complete lines from codec stream readers
even if there is an exception in later lines, resulting in
correct line numbers for decoding errors in source code. Fixes #1178484.


Index: libcodecs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcodecs.tex,v
retrieving revision 1.34.2.1
retrieving revision 1.34.2.2
diff -u -d -r1.34.2.1 -r1.34.2.2
--- libcodecs.tex	1 Jan 2005 00:34:53 -0000	1.34.2.1
+++ libcodecs.tex	24 Aug 2005 07:38:36 -0000	1.34.2.2
@@ -394,7 +394,7 @@
   be extended with \function{register_error()}.
 \end{classdesc}
 
-\begin{methoddesc}{read}{\optional{size\optional{, chars}}}
+\begin{methoddesc}{read}{\optional{size\optional{, chars, \optional{firstline}}}}
   Decodes data from the stream and returns the resulting object.
 
   \var{chars} indicates the number of characters to read from the
@@ -408,12 +408,16 @@
   decode as much as possible.  \var{size} is intended to prevent having
   to decode huge files in one step.
 
+  \var{firstline} indicates that it would be sufficient to only return
+  the first line, if there are decoding errors on later lines.
+
   The method should use a greedy read strategy meaning that it should
   read as much data as is allowed within the definition of the encoding
   and the given size, e.g.  if optional encoding endings or state
   markers are available on the stream, these should be read too.
 
   \versionchanged[\var{chars} argument added]{2.4}
+  \versionchanged[\var{firstline} argument added]{2.4.2}
 \end{methoddesc}
 
 \begin{methoddesc}{readline}{\optional{size\optional{, keepends}}}



More information about the Python-checkins mailing list