[Python-checkins] [3.10] bpo-20923 : [doc] Explain ConfigParser 'valid section name' and .SECTCRE (GH-31413) (GH-31506)

miss-islington webhook-mailer at python.org
Tue Feb 22 13:28:56 EST 2022


https://github.com/python/cpython/commit/a7af34d407b344de7f138c002854a3e16ecb9db5
commit: a7af34d407b344de7f138c002854a3e16ecb9db5
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-02-22T10:28:34-08:00
summary:

[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 at users.noreply.github.com>

Automerge-Triggered-By: GH:iritkatriel

files:
M Doc/library/configparser.rst

diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst
index 1ebda53ecda0f..323dd2affc78f 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]_



More information about the Python-checkins mailing list