This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ConfigParser.set() docs should mention allow_no_value
Type: enhancement Stage: patch review
Components: Documentation Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, nanjekyejoannah, ncoghlan
Priority: normal Keywords: patch

Created on 2019-06-28 09:23 by ncoghlan, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 14455 closed Kriyszig, 2019-06-28 17:59
Messages (1)
msg346813 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2019-06-28 09:23
Reviewing some code today, I came across a ConfigParser.set() call that only specified the section and key, with the value argument missing.

If you look at the ConfigParser.set() docs, this seems like incorrect code, as those docs indicate that the value argument is a required parameter: https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.set

However, checking the code shows that:

1. "value" has a default value of None
2. if "allow_no_value" is passed to the constructor, passing "None" as the value will be interpreted as a request to add a key-only entry to the section with no equals sign
History
Date User Action Args
2022-04-11 14:59:17adminsetgithub: 81619
2019-08-07 12:56:36nanjekyejoannahsetnosy: + nanjekyejoannah
2019-06-28 17:59:26Kriyszigsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request14272
2019-06-28 09:23:20ncoghlancreate