[issue7005] ConfigParser does not handle options without values

Mats Kindahl report at bugs.python.org
Mon Sep 28 11:32:42 CEST 2009


Mats Kindahl <mats at sun.com> added the comment:

Fred L. Drake, Jr. wrote:
> Fred L. Drake, Jr. <fdrake at acm.org> added the comment:
> 
> The test "value is not None" in line 620 (of the new version) could be
> just "value" and get a little more value from less code.

OK.

> 
> I don't think I've ever run across a sample .ini-style file that used
> unspecified values, though it's frequently done in "flat" configuration
> files.
> 
> Have you come across an existing configuration format that uses the
> [section] markers and unspecified values, or is this really a new use-case?

It is very common in my.cnf files for MySQL, and has been so "for ever." For
example, the default my.cnf file that is installed on my Debian (Ubuntu) system
have several options without values (e.g., skip-external-locking, quick, and
quote-names).

Best wishes,
Mats Kindahl

> 
> ----------
> 
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue7005>
> _______________________________________

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7005>
_______________________________________


More information about the Python-bugs-list mailing list