summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorŁukasz Langa <lukasz@langa.pl>2021-05-18 17:03:09 (GMT)
committerGitHub <noreply@github.com>2021-05-18 17:03:09 (GMT)
commit4d17c93dfe760478509bcf709345b0522fd3a7e8 (patch)
tree9a0c2ba5cd21ef740d4d42fb63190254ec34ef97 /Doc/library
parent373741a97c9f6ffee427c2b4eaccb74347af228a (diff)
downloadcpython-4d17c93dfe760478509bcf709345b0522fd3a7e8.zip
cpython-4d17c93dfe760478509bcf709345b0522fd3a7e8.tar.gz
cpython-4d17c93dfe760478509bcf709345b0522fd3a7e8.tar.bz2
[3.10] bpo-41963: document that ConfigParser strips off comments (GH-26197) (GH-26214)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Laura Gutierrez Funderburk <58710704+lgfunderburk@users.noreply.github.com> Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com> (cherry picked from commit 02ee8191263848f8c8999f72286148946b83e5c9)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/configparser.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst
index 646e8a3..b0c2a2c 100644
--- a/Doc/library/configparser.rst
+++ b/Doc/library/configparser.rst
@@ -1153,6 +1153,13 @@ ConfigParser Objects
*space_around_delimiters* is true, delimiters between
keys and values are surrounded by spaces.
+ .. note::
+
+ Comments in the original configuration file are not preserved when
+ writing the configuration back.
+ What is considered a comment, depends on the given values for
+ *comment_prefix* and *inline_comment_prefix*.
+
.. method:: remove_option(section, option)