summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-03-26 09:32:46 (GMT)
committerGeorg Brandl <georg@python.org>2008-03-26 09:32:46 (GMT)
commit27f43740b1bbccc04a308b61e990265a0e88a049 (patch)
treef3b1b2923a656f0d5865e0667543d8e53b596810 /Doc
parent7ddd10dff9ad1363edb229438783aafcad833f5c (diff)
downloadcpython-27f43740b1bbccc04a308b61e990265a0e88a049.zip
cpython-27f43740b1bbccc04a308b61e990265a0e88a049.tar.gz
cpython-27f43740b1bbccc04a308b61e990265a0e88a049.tar.bz2
Add an example for an RFC 822 continuation.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/configparser.rst14
1 files changed, 8 insertions, 6 deletions
diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst
index 96c001f..911f8dc 100644
--- a/Doc/library/configparser.rst
+++ b/Doc/library/configparser.rst
@@ -29,18 +29,20 @@ easily.
The configuration file consists of sections, led by a ``[section]`` header and
followed by ``name: value`` entries, with continuations in the style of
-:rfc:`822`; ``name=value`` is also accepted. Note that leading whitespace is
-removed from values. The optional values can contain format strings which refer
-to other values in the same section, or values in a special ``DEFAULT`` section.
-Additional defaults can be provided on initialization and retrieval. Lines
-beginning with ``'#'`` or ``';'`` are ignored and may be used to provide
-comments.
+:rfc:`822` (see section 3.1.1, "LONG HEADER FIELDS"); ``name=value`` is also
+accepted. Note that leading whitespace is removed from values. The optional
+values can contain format strings which refer to other values in the same
+section, or values in a special ``DEFAULT`` section. Additional defaults can be
+provided on initialization and retrieval. Lines beginning with ``'#'`` or
+``';'`` are ignored and may be used to provide comments.
For example::
[My Section]
foodir: %(dir)s/whatever
dir=frob
+ long: this value continues
+ in the next line
would resolve the ``%(dir)s`` to the value of ``dir`` (``frob`` in this case).
All reference expansions are done on demand.