Minor markup and wording fixups.
This commit is contained in:
parent
d73be67c3f
commit
04129748ae
|
@ -1273,9 +1273,9 @@ configparser
|
||||||
The :mod:`configparser` module was modified to improve usability and
|
The :mod:`configparser` module was modified to improve usability and
|
||||||
predictability of the default parser and its supported INI syntax. The old
|
predictability of the default parser and its supported INI syntax. The old
|
||||||
:class:`ConfigParser` class was removed in favor of :class:`SafeConfigParser`
|
:class:`ConfigParser` class was removed in favor of :class:`SafeConfigParser`
|
||||||
which has in turn been renamed to :class:`ConfigParser`. Support for inline
|
which has in turn been renamed to :class:`~configparser.ConfigParser`. Support
|
||||||
comments is now turned off by default and section or option duplicates are not
|
for inline comments is now turned off by default and section or option
|
||||||
allowed in a single configuration source.
|
duplicates are not allowed in a single configuration source.
|
||||||
|
|
||||||
Config parsers gained a new API based on the mapping protocol::
|
Config parsers gained a new API based on the mapping protocol::
|
||||||
|
|
||||||
|
@ -1299,14 +1299,14 @@ Config parsers gained a new API based on the mapping protocol::
|
||||||
>>> 'british' in section
|
>>> 'british' in section
|
||||||
True
|
True
|
||||||
|
|
||||||
The new API is implemented on top of the classical API e.g. custom parser
|
The new API is implemented on top of the classical API so custom parser
|
||||||
subclasses should be able to use it without modifications.
|
subclasses should be able to use it without modifications.
|
||||||
|
|
||||||
The INI file structure accepted by config parsers can now be customized. Users
|
The INI file structure accepted by config parsers can now be customized. Users
|
||||||
are able to specify alternative option/value delimiters and comment prefixes,
|
can specify alternative option/value delimiters and comment prefixes, change the
|
||||||
change the name of the DEFAULT section or switch the interpolation syntax.
|
name of the *DEFAULT* section or switch the interpolation syntax. Along with
|
||||||
Along with support for pluggable interpolation, an additional buildout-like
|
support for pluggable interpolation, an additional interpolation handler
|
||||||
interpolation handler (ExtendedInterpolation) was introduced::
|
:class:`~configparser.ExtendedInterpolation` was introduced::
|
||||||
|
|
||||||
>>> parser = ConfigParser(interpolation=ExtendedInterpolation())
|
>>> parser = ConfigParser(interpolation=ExtendedInterpolation())
|
||||||
>>> parser.read_dict({'buildout': {'directory': '/home/ambv/zope9'},
|
>>> parser.read_dict({'buildout': {'directory': '/home/ambv/zope9'},
|
||||||
|
@ -1339,8 +1339,8 @@ interpolation handler (ExtendedInterpolation) was introduced::
|
||||||
'/opt/zope'
|
'/opt/zope'
|
||||||
|
|
||||||
A number of smaller features were also introduced, like support for specifying
|
A number of smaller features were also introduced, like support for specifying
|
||||||
encoding in read operations, specifying fallback values in getters, or reading
|
encoding in read operations, specifying fallback values for get-functions, or
|
||||||
directly from dictionaries and strings.
|
reading directly from dictionaries and strings.
|
||||||
|
|
||||||
(All changes contributed by Łukasz Langa.)
|
(All changes contributed by Łukasz Langa.)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue