Skip to content

Commit bba8008

Browse files
authored
bpo-20923 : [doc] Explain ConfigParser 'valid section name' and .SECTCRE (GH-31413)
1 parent 9a0d941 commit bba8008

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Doc/library/configparser.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ out. Values can also span multiple lines, as long as they are indented deeper
267267
than the first line of the value. Depending on the parser's mode, blank lines
268268
may be treated as parts of multiline values or ignored.
269269

270+
By default, a valid section name can be any string that does not contain '\\n' or ']'.
271+
To change this, see :attr:`ConfigParser.SECTCRE`.
272+
270273
Configuration files may include comments, prefixed by specific
271274
characters (``#`` and ``;`` by default [1]_). Comments may appear on
272275
their own on an otherwise empty line, possibly indented. [1]_

0 commit comments

Comments
 (0)