New submission from Nick Coghlan <ncogh...@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@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 <rep...@bugs.python.org> <https://bugs.python.org/issue37438> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com