diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst index 185b4a10ec990e..1667c81dc7de90 100644 --- a/Doc/library/configparser.rst +++ b/Doc/library/configparser.rst @@ -172,6 +172,20 @@ provide equivalent :meth:`~ConfigParser.getint` and :meth:`~ConfigParser.getfloat` methods. You can register your own converters and customize the provided ones. [1]_ +Section names are also stored as strings and need to be converted +manually when reading a section: + +.. doctest:: + + >>> config[123] = {} + >>> config[123] + Traceback (most recent call last): + ... + KeyError: 123 + >>> config['123'] + + + Fallback Values ---------------