New submission from Nick Coghlan :
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.ConfigParse...
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
----------
assignee: docs@python
components: Documentation
messages: 346813
nosy: docs@python, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: ConfigParser.set() docs should mention allow_no_value
type: enhancement
versions: Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker
https://bugs.python.org/issue37438
_______________________________________