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 khyox
Recipients docs@python, khyox
Date 2016-01-13.00:39:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452645599.68.0.959713633048.issue26094@psf.upfronthosting.co.za>
In-reply-to
Content
For the sake of clarity, in https://docs.python.org/3.5/library/configparser.html#configparser.ConfigParser the ConfigParser.get() method doc could be properly updated with merging the information written in the header doc of the source file, as found in https://hg.python.org/cpython/file/3.5/Lib/configparser.py

Concretely, this sentence there, "Return a string value for the named option." could be considered quite relevant to be added to the doc of the method, as some packages are (incorrectly) expecting boolean values returned by the ConfigParser.get() method. The reality is that a "True" in the configuration file is returning the string "True" and not the boolean constant True.

To sum up, the suggested update would be:

    def get(self, section, option, *, raw=False, vars=None, fallback=_UNSET):
        """Returns a string value for the named option for a given section.

        If `vars' is provided, it must be a dictionary. The option is looked up
        in `vars' (if provided), `section', and in `DEFAULTSECT' in that order.
        If the key is not found and `fallback' is provided, it is used as
        a fallback value. `None' can be provided as a `fallback' value.

        If interpolation is enabled and the optional argument `raw' is False,
        all interpolations are expanded in the return values.

        Arguments `raw', `vars', and `fallback' are keyword only.

        The section DEFAULT is special.
        """
        (...)
History
Date User Action Args
2016-01-13 00:39:59khyoxsetrecipients: + khyox, docs@python
2016-01-13 00:39:59khyoxsetmessageid: <1452645599.68.0.959713633048.issue26094@psf.upfronthosting.co.za>
2016-01-13 00:39:59khyoxlinkissue26094 messages
2016-01-13 00:39:59khyoxcreate