[issue9421] configparser.ConfigParser's getint, getboolean and getfloat don't accept `vars`

Łukasz Langa report at bugs.python.org
Fri Sep 3 00:20:32 CEST 2010


Łukasz Langa <lukasz at langa.pl> added the comment:

Patch updated:
- _UNSET removed from docs in favor of a more natural syntax (square brackets around optional arguments)
- _COMPATIBLE left in the docs because I find less magical in that case (+ it's already covered in the docs what this special case means)
- fixed docs improperly specifying `comment_prefixes` for ConfigParser and SafeConfigParser
- docs include a remark on where to find explanation for 'vars' and 'default' in every coercing getter
- tortured code refactored
- _unify_boolean renamed to _convert_to_boolean
- _UNSET and _COMPATIBLE moved to module level (test updates)
- _boolean_states renamed to BOOLEAN_STATES (for consistency with regular expression constants)
- _convert_to_boolean and BOOLEAN_STATES left in RawConfigParser class to enable users customize them (e.g. by specifying locale-specific 'yes'/'no' pairs or things like 'enable'/'disable', etc. etc.). Customization should be instance-specific.

----------
Added file: http://bugs.python.org/file18716/issue9421.diff

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


More information about the Python-bugs-list mailing list