summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvidhya <96202776+Vidhyavinu@users.noreply.github.com>2022-02-22 18:06:41 (GMT)
committerGitHub <noreply@github.com>2022-02-22 18:06:41 (GMT)
commitbba8008f99d615a02984422a3825082bb5621f5a (patch)
treea66b0e45bf7d69bfbeb71db9cf89cdb619b63875
parent9a0d941df4c3e1efb8b3017cd2c2de17e582fd5c (diff)
downloadcpython-bba8008f99d615a02984422a3825082bb5621f5a.zip
cpython-bba8008f99d615a02984422a3825082bb5621f5a.tar.gz
cpython-bba8008f99d615a02984422a3825082bb5621f5a.tar.bz2
bpo-20923 : [doc] Explain ConfigParser 'valid section name' and .SECTCRE (GH-31413)
-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]_