Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea57923

Browse files
authored
bpo-23835: [docs] configparser converts defaults to strings (#3176)
Title says all.
1 parent 44e6ad8 commit ea57923

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

Doc/library/configparser.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,11 @@ ConfigParser Objects
944944
.. versionchanged:: 3.5
945945
The *converters* argument was added.
946946

947+
.. versionchanged:: 3.7
948+
The *defaults* argument is read with :meth:`read_dict()`,
949+
providing consistent behavior across the parser: non-string
950+
keys and values are implicitly converted to strings.
951+
947952

948953
.. method:: defaults()
949954

@@ -1325,4 +1330,3 @@ Exceptions
13251330
.. [1] Config parsers allow for heavy customization. If you are interested in
13261331
changing the behaviour outlined by the footnote reference, consult the
13271332
`Customizing Parser Behaviour`_ section.
1328-

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,6 +1578,7 @@ Jason Tishler
15781578
Christian Tismer
15791579
Jim Tittsler
15801580
Frank J. Tobin
1581+
James Tocknell
15811582
Bennett Todd
15821583
R Lindsay Todd
15831584
Eugene Toder
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
configparser: reading defaults in the ``ConfigParser()`` constructor is now
2+
using ``read_dict()``, making its behavior consistent with the rest of the
3+
parser. Non-string keys and values in the defaults dictionary are now being
4+
implicitly converted to strings. Patch by James Tocknell.

0 commit comments

Comments
 (0)