A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-checkins/2002-October/030376.html below:

[Python-checkins] python/dist/src/Doc/lib libcfgparser.tex,1.23,1.24

[Python-checkins] python/dist/src/Doc/lib libcfgparser.tex,1.23,1.24fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Fri, 25 Oct 2002 13:21:02 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv18331

Modified Files:
	libcfgparser.tex 
Log Message:
Update to reflect the refactoring into the RawConfigParser and
ConfigParser classes.


Index: libcfgparser.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcfgparser.tex,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** libcfgparser.tex	27 Sep 2002 15:49:56 -0000	1.23
--- libcfgparser.tex	25 Oct 2002 20:20:58 -0000	1.24
***************
*** 23,27 ****
  The optional values can contain format strings which refer to other
  values in the same section, or values in a special
! \code{DEFAULT} section.  Additional defaults can be provided upon
  initialization and retrieval.  Lines beginning with \character{\#} or
  \character{;} are ignored and may be used to provide comments.
--- 23,27 ----
  The optional values can contain format strings which refer to other
  values in the same section, or values in a special
! \code{DEFAULT} section.  Additional defaults can be provided on
  initialization and retrieval.  Lines beginning with \character{\#} or
  \character{;} are ignored and may be used to provide comments.
***************
*** 30,33 ****
--- 30,34 ----
  
  \begin{verbatim}
+ [My Section]
  foodir: %(dir)s/whatever
  dir=frob
***************
*** 43,50 ****
  others.
  
  \begin{classdesc}{ConfigParser}{\optional{defaults}}
! Return a new instance of the \class{ConfigParser} class.  When
! \var{defaults} is given, it is initialized into the dictionary of
! intrinsic defaults.  The keys must be strings, and the values must be 
  appropriate for the \samp{\%()s} string interpolation.  Note that
  \var{__name__} is an intrinsic default; its value is the section name,
--- 44,58 ----
  others.
  
+ \begin{classdesc}{RawConfigParser}{\optional{defaults}}
+ The basic configuration object.  When \var{defaults} is given, it is
+ initialized into the dictionary of intrinsic defaults.  This class
+ does not support the magical interpolation behavior.
+ \versionadded{2.3}
+ \end{classdesc}
+ 
  \begin{classdesc}{ConfigParser}{\optional{defaults}}
! Derived class of \class{RawConfigParser} that implements the magical
! interpolation feature and adds optional arguments the \method{get()}
! and \method{items()} methods.  The values in \var{defaults} must be
  appropriate for the \samp{\%()s} string interpolation.  Note that
  \var{__name__} is an intrinsic default; its value is the section name,
***************
*** 87,92 ****
  \begin{datadesc}{MAX_INTERPOLATION_DEPTH}
  The maximum depth for recursive interpolation for \method{get()} when
! the \var{raw} parameter is false.  Setting this does not change the
! allowed recursion depth.
  \end{datadesc}
  
--- 95,100 ----
  \begin{datadesc}{MAX_INTERPOLATION_DEPTH}
  The maximum depth for recursive interpolation for \method{get()} when
! the \var{raw} parameter is false.  This is relevant only for the
! \class{ConfigParser} class.
  \end{datadesc}
  
***************
*** 99,105 ****
  
  
! \subsection{ConfigParser Objects \label{ConfigParser-objects}}
  
! \class{ConfigParser} instances have the following methods:
  
  \begin{methoddesc}{defaults}{}
--- 107,113 ----
  
  
! \subsection{RawConfigParser Objects \label{RawConfigParser-objects}}
  
! \class{RawConfigParser} instances have the following methods:
  
  \begin{methoddesc}{defaults}{}
***************
*** 163,171 ****
  \end{methoddesc}
  
! \begin{methoddesc}{get}{section, option\optional{, raw\optional{, vars}}}
! Get an \var{option} value for the provided \var{section}.  All the
! \character{\%} interpolations are expanded in the return values, based on
! the defaults passed into the constructor, as well as the options
! \var{vars} provided, unless the \var{raw} argument is true.
  \end{methoddesc}
  
--- 171,176 ----
  \end{methoddesc}
  
! \begin{methoddesc}{get}{section, option}
! Get an \var{option} value for the named \var{section}.
  \end{methoddesc}
  
***************
*** 190,198 ****
  \end{methoddesc}
  
! \begin{methoddesc}{items}{section\optional{, raw\optional{, vars}}}
! Create a generator which will return a tuple \code{(name, value)} for
! each option in the given \var{section}. Optional arguments have the
! same meaning as for the \code{get()} method.
! \versionadded{2.3}
  \end{methoddesc}
  
--- 195,201 ----
  \end{methoddesc}
  
! \begin{methoddesc}{items}{section}
! Return a list of \code{(\var{name}, \var{value})} pairs for each
! option in the given \var{section}.
  \end{methoddesc}
  
***************
*** 231,233 ****
--- 234,256 ----
  behavior.  Setting this to \function{str()}, for example, would make
  option names case sensitive.
+ \end{methoddesc}
+ 
+ 
+ \subsection{ConfigParser Objects \label{ConfigParser-objects}}
+ 
+ The \class{ConfigParser} class extends some methods of the
+ \class{RawConfigParser} interface, adding some optional arguments.
+ 
+ \begin{methoddesc}{get}{section, option\optional{, raw\optional{, vars}}}
+ Get an \var{option} value for the named \var{section}.  All the
+ \character{\%} interpolations are expanded in the return values, based
+ on the defaults passed into the constructor, as well as the options
+ \var{vars} provided, unless the \var{raw} argument is true.
+ \end{methoddesc}
+ 
+ \begin{methoddesc}{items}{section\optional{, raw\optional{, vars}}}
+ Create a generator which will return a tuple \code{(name, value)} for
+ each option in the given \var{section}. Optional arguments have the
+ same meaning as for the \code{get()} method.
+ \versionadded{2.3}
  \end{methoddesc}





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4