[docs] [issue37438] ConfigParser.set() docs should mention allow_no_value

Nick Coghlan report at bugs.python.org
Fri Jun 28 05:23:20 EDT 2019


New submission from Nick Coghlan <ncoghlan at gmail.com>:

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

----------
assignee: docs at python
components: Documentation
messages: 346813
nosy: docs at 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 <report at bugs.python.org>
<https://bugs.python.org/issue37438>
_______________________________________


More information about the docs mailing list