summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-02-22 18:43:55 (GMT)
committerGitHub <noreply@github.com>2022-02-22 18:43:55 (GMT)
commit2387aeacc78bfd9d314428b79590b2b47511bf33 (patch)
tree8bf6c9f1516933cc07e9265d8f744c87fa7fb591 /Doc/library
parentaa9a5c4d72e083f8b4c635d79f7450dbe8319469 (diff)
downloadcpython-2387aeacc78bfd9d314428b79590b2b47511bf33.zip
cpython-2387aeacc78bfd9d314428b79590b2b47511bf33.tar.gz
cpython-2387aeacc78bfd9d314428b79590b2b47511bf33.tar.bz2
[3.9] bpo-20923 : [doc] Explain ConfigParser 'valid section name' and .SECTCRE (GH-31413) (GH-31507)
(cherry picked from commit bba8008f99d615a02984422a3825082bb5621f5a) Co-authored-by: vidhya <96202776+Vidhyavinu@users.noreply.github.com> Automerge-Triggered-By: GH:iritkatriel
Diffstat (limited to 'Doc/library')
-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 60d33f5..e5c7824 100644
--- a/Doc/library/configparser.rst
+++ b/Doc/library/configparser.rst
@@ -243,6 +243,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]_