Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5)

Side by Side Diff: Doc/library/configparser.rst

Issue 18758: Fix internal references in the documentation
Patch Set: Created 6 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/library/collections.rst ('k') | Doc/library/dbm.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 :mod:`configparser` --- Configuration file parser 1 :mod:`configparser` --- Configuration file parser
2 ================================================= 2 =================================================
3 3
4 .. module:: configparser 4 .. module:: configparser
5 :synopsis: Configuration file parser. 5 :synopsis: Configuration file parser.
6 6
7 .. moduleauthor:: Ken Manheimer <klm@zope.com> 7 .. moduleauthor:: Ken Manheimer <klm@zope.com>
8 .. moduleauthor:: Barry Warsaw <bwarsaw@python.org> 8 .. moduleauthor:: Barry Warsaw <bwarsaw@python.org>
9 .. moduleauthor:: Eric S. Raymond <esr@thyrsus.com> 9 .. moduleauthor:: Eric S. Raymond <esr@thyrsus.com>
10 .. moduleauthor:: Łukasz Langa <lukasz@langa.pl> 10 .. moduleauthor:: Łukasz Langa <lukasz@langa.pl>
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 the mapping interface implementation is using the 364 the mapping interface implementation is using the
365 ``parser['section']['option']`` notation. 365 ``parser['section']['option']`` notation.
366 366
367 ``parser['section']`` in particular returns a proxy for the section's data in 367 ``parser['section']`` in particular returns a proxy for the section's data in
368 the parser. This means that the values are not copied but they are taken from 368 the parser. This means that the values are not copied but they are taken from
369 the original parser on demand. What's even more important is that when values 369 the original parser on demand. What's even more important is that when values
370 are changed on a section proxy, they are actually mutated in the original 370 are changed on a section proxy, they are actually mutated in the original
371 parser. 371 parser.
372 372
373 :mod:`configparser` objects behave as close to actual dictionaries as possible. 373 :mod:`configparser` objects behave as close to actual dictionaries as possible.
374 The mapping interface is complete and adheres to the ``MutableMapping`` ABC. 374 The mapping interface is complete and adheres to the :class:`~collections.abc.Mu tableMapping` ABC.
375 However, there are a few differences that should be taken into account: 375 However, there are a few differences that should be taken into account:
376 376
377 * By default, all keys in sections are accessible in a case-insensitive manner 377 * By default, all keys in sections are accessible in a case-insensitive manner
378 [1]_. E.g. ``for option in parser["section"]`` yields only ``optionxform``'ed 378 [1]_. E.g. ``for option in parser["section"]`` yields only ``optionxform``'ed
379 option key names. This means lowercased keys by default. At the same time, 379 option key names. This means lowercased keys by default. At the same time,
380 for a section that holds the key ``'a'``, both expressions return ``True``:: 380 for a section that holds the key ``'a'``, both expressions return ``True``::
381 381
382 "a" in parser["section"] 382 "a" in parser["section"]
383 "A" in parser["section"] 383 "A" in parser["section"]
384 384
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 .. versionchanged:: 3.2 1274 .. versionchanged:: 3.2
1275 The ``filename`` attribute and :meth:`__init__` argument were renamed to 1275 The ``filename`` attribute and :meth:`__init__` argument were renamed to
1276 ``source`` for consistency. 1276 ``source`` for consistency.
1277 1277
1278 1278
1279 .. rubric:: Footnotes 1279 .. rubric:: Footnotes
1280 1280
1281 .. [1] Config parsers allow for heavy customization. If you are interested in 1281 .. [1] Config parsers allow for heavy customization. If you are interested in
1282 changing the behaviour outlined by the footnote reference, consult the 1282 changing the behaviour outlined by the footnote reference, consult the
1283 `Customizing Parser Behaviour`_ section. 1283 `Customizing Parser Behaviour`_ section.
OLDNEW
« no previous file with comments | « Doc/library/collections.rst ('k') | Doc/library/dbm.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+