summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-02-22 18:28:34 (GMT)
committerGitHub <noreply@github.com>2022-02-22 18:28:34 (GMT)
commita7af34d407b344de7f138c002854a3e16ecb9db5 (patch)
tree33a066883f5aac636f079d59fc01287e3e098eae
parentd04fb9213a547def5604fbc60b0554c176d4c998 (diff)
downloadcpython-a7af34d407b344de7f138c002854a3e16ecb9db5.zip
cpython-a7af34d407b344de7f138c002854a3e16ecb9db5.tar.gz
cpython-a7af34d407b344de7f138c002854a3e16ecb9db5.tar.bz2
[3.10] bpo-20923 : [doc] Explain ConfigParser 'valid section name' and .SECTCRE (GH-31413) (GH-31506)
(cherry picked from commit bba8008f99d615a02984422a3825082bb5621f5a) Co-authored-by: vidhya <96202776+Vidhyavinu@users.noreply.github.com> Automerge-Triggered-By: GH:iritkatriel
-rw-r--r--Doc/library/configparser.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst
index 1ebda53..323dd2a 100644
--- a/Doc/library/configparser.rst
+++ b/Doc/library/configparser.rst
@@ -267,6 +267,9 @@ out. Values can also span multiple lines, as long as they are indented deeper
than the first line of the value. Depending on the parser's mode, blank lines
may be treated as parts of multiline values or ignored.
+By default, a valid section name can be any string that does not contain '\\n' or ']'.
+To change this, see :attr:`ConfigParser.SECTCRE`.
+
Configuration files may include comments, prefixed by specific
characters (``#`` and ``;`` by default [1]_). Comments may appear on
their own on an otherwise empty line, possibly indented. [1]_