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.

Author lukasz.langa
Recipients georg.brandl, lukasz.langa, michael.foord, pitrou
Date 2010-07-29.18:32:41
SpamBayes Score 0.009560062
Marked as misclassified No
Message-id <1280428369.21.0.84678458473.issue9421@psf.upfronthosting.co.za>
In-reply-to
Content
ConfigParser (and in effect SafeConfigParser) accept `vars` in the `get()` method so one can override values from the section, merge data from different sources or simply state some required keys for interpolation.

`getint()`, `getfloat()` and `getboolean()` don't accept this argument and this is the reason for this issue: for all getters to present a consistent interface.

There is a small design question here however. We have an inheritance model in configparser that goes like this:

  RawConfigParser -> ConfigParser -> SafeConfigParser

ConfigParser redefines `get()` for the purposes of interpolation but doesn't touch the other getters. It's good because in terms of implementation, they are just `type()` decoration over `get()` where type is `int`, `float` or `bool`.

The obvious solution would be to add **kwargs to these getters so that regardless of the implementation of the actual `get()`, all possible values are being passed to it. We can then comment in the docstring that for possible values of **kwargs, the user should check the interface of `get()`. Is that good enough?

Other ideas?

PS. I have a patch for the proposed design, will attach if there's consensus.
History
Date User Action Args
2010-07-29 18:32:49lukasz.langasetrecipients: + lukasz.langa, georg.brandl, pitrou, michael.foord
2010-07-29 18:32:49lukasz.langasetmessageid: <1280428369.21.0.84678458473.issue9421@psf.upfronthosting.co.za>
2010-07-29 18:32:42lukasz.langalinkissue9421 messages
2010-07-29 18:32:41lukasz.langacreate