From bba8008f99d615a02984422a3825082bb5621f5a Mon Sep 17 00:00:00 2001 From: vidhya <96202776+Vidhyavinu@users.noreply.github.com> Date: Tue, 22 Feb 2022 13:06:41 -0500 Subject: bpo-20923 : [doc] Explain ConfigParser 'valid section name' and .SECTCRE (GH-31413) --- Doc/library/configparser.rst | 3 +++ 1 file changed, 3 insertions(+) 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]_ -- cgit v0.12