[Python-checkins] python/dist/src/Doc/lib libcfgparser.tex,1.28,1.29

esr@users.sourceforge.net esr@users.sourceforge.net
2002年12月31日 07:26:16 -0800


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv9845/Doc/lib
Modified Files:
	libcfgparser.tex 
Log Message:
Fixed a bug in writing of continuations that broke the reversibilty of
the write() operation by readfp(). Sections and options are now
guaranteed to be written out in the order they were read in. The
write method is now factored so that a _str_ method is supported.
Added optional capability to handle array values and multiline string
literals. Updated unit test and documentation appropriately.
Index: libcfgparser.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcfgparser.tex,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** libcfgparser.tex	31 Dec 2002 12:23:10 -0000	1.28
--- libcfgparser.tex	31 Dec 2002 15:26:12 -0000	1.29
***************
*** 32,36 ****
 \character{;} are ignored and may be used to provide comments.
 
! For example:
 
 \begin{verbatim}
--- 32,46 ----
 \character{;} are ignored and may be used to provide comments.
 
! If the \member{listbrackets} member has been set to a non-null value,
! comma-separated lists of tokens enclosed by the first and second
! elements of \member{listbrackets} are parsed into a list value.
! Interpolation is performed on each list element.
! 
! If the \member{stringquotes} member has been set, each character in it
! is recognized as a string delimiter. String delimiters are stripped 
! from values by the \method{getstring} method, and may bound multiline strings.
! 
! For example, assuming \member{listbrackets} has been initialized to "{}"
! and \member{stringquotes} to a string including a single quote:
 
 \begin{verbatim}
***************
*** 38,41 ****
--- 48,57 ----
 foodir: %(dir)s/whatever
 dir=frob
+ tokenlist={baz, qux, ; Comments in list values are ignored
+ fred, %(dir)s/barney}
+ multiline='
+ A sample of a
+ multiline string
+ '
 \end{verbatim}
 
***************
*** 206,209 ****
--- 222,231 ----
 \end{methoddesc}
 
+ \begin{methoddesc}{getstring}{section, option}
+ A convenience method which returns \var{option} in the specified
+ \var{section} after stripping any enclosing string quotes.
+ \versionadded{2.3}
+ \end{methoddesc}
+ 
 \begin{methoddesc}{getboolean}{section, option}
 A convenience method which coerces the \var{option} in the specified
***************
*** 230,234 ****
 Write a representation of the configuration to the specified file
 object. This representation can be parsed by a future \method{read()}
! call.
 \versionadded{1.6}
 \end{methoddesc}
--- 252,257 ----
 Write a representation of the configuration to the specified file
 object. This representation can be parsed by a future \method{read()}
! call. In versions 2.3 and later, sections and options are guaranteed
! to be written in the same order they were parsed.
 \versionadded{1.6}
 \end{methoddesc}
***************
*** 256,259 ****
--- 279,302 ----
 option names case sensitive.
 \end{methoddesc}
+ 
+ Instances of \class{ConfigParser} subclasses have some public instance
+ variables which either control lexical analysis or can be used for
+ debugging:
+ 
+ \begin{memberdesc}{listbrackets}{}
+ String containing open and close delimiters for list values.
+ Initially empty.
+ If this string is non-empty, the parsing algorithm changes 
+ to recognize these list values.
+ \versionadded{2.3}
+ \end{memberdesc}
+ 
+ \begin{memberdesc}{stringquotes}{}
+ String containing string quote characters.
+ Initially empty.
+ If this string is non-empty, the parsing algorithm changes 
+ to allow these characters to bound multiline strings.
+ \versionadded{2.3}
+ \end{memberdesc}
 
 

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