mirror of
https://github.com/python/cpython
synced 2024-09-05 00:05:39 +00:00
bpo-23835: [docs] configparser converts defaults to strings (#3176)
Title says all.
This commit is contained in:
parent
44e6ad8734
commit
ea57923e89
|
@ -944,6 +944,11 @@ ConfigParser Objects
|
||||||
.. versionchanged:: 3.5
|
.. versionchanged:: 3.5
|
||||||
The *converters* argument was added.
|
The *converters* argument was added.
|
||||||
|
|
||||||
|
.. versionchanged:: 3.7
|
||||||
|
The *defaults* argument is read with :meth:`read_dict()`,
|
||||||
|
providing consistent behavior across the parser: non-string
|
||||||
|
keys and values are implicitly converted to strings.
|
||||||
|
|
||||||
|
|
||||||
.. method:: defaults()
|
.. method:: defaults()
|
||||||
|
|
||||||
|
@ -1325,4 +1330,3 @@ Exceptions
|
||||||
.. [1] Config parsers allow for heavy customization. If you are interested in
|
.. [1] Config parsers allow for heavy customization. If you are interested in
|
||||||
changing the behaviour outlined by the footnote reference, consult the
|
changing the behaviour outlined by the footnote reference, consult the
|
||||||
`Customizing Parser Behaviour`_ section.
|
`Customizing Parser Behaviour`_ section.
|
||||||
|
|
||||||
|
|
|
@ -1578,6 +1578,7 @@ Jason Tishler
|
||||||
Christian Tismer
|
Christian Tismer
|
||||||
Jim Tittsler
|
Jim Tittsler
|
||||||
Frank J. Tobin
|
Frank J. Tobin
|
||||||
|
James Tocknell
|
||||||
Bennett Todd
|
Bennett Todd
|
||||||
R Lindsay Todd
|
R Lindsay Todd
|
||||||
Eugene Toder
|
Eugene Toder
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
configparser: reading defaults in the ``ConfigParser()`` constructor is now
|
||||||
|
using ``read_dict()``, making its behavior consistent with the rest of the
|
||||||
|
parser. Non-string keys and values in the defaults dictionary are now being
|
||||||
|
implicitly converted to strings. Patch by James Tocknell.
|
Loading…
Reference in a new issue