@@ -208,7 +208,7 @@ converters and customize the provided ones. [1]_
208
208
Fallback Values
209
209
---------------
210
210
211
- As with a dictionary, you can use a section's :meth: `get ` method to
211
+ As with a dictionary, you can use a section's :meth: `~ConfigParser. get ` method to
212
212
provide fallback values:
213
213
214
214
.. doctest ::
@@ -232,7 +232,7 @@ even if we specify a fallback:
232
232
>>> topsecret.get(' CompressionLevel' , ' 3' )
233
233
'9'
234
234
235
- One more thing to be aware of is that the parser-level :meth: `get ` method
235
+ One more thing to be aware of is that the parser-level :meth: `~ConfigParser. get ` method
236
236
provides a custom, more complex interface, maintained for backwards
237
237
compatibility. When using this method, a fallback value can be provided via
238
238
the ``fallback `` keyword-only argument:
@@ -481,7 +481,7 @@ historical background and it's very likely that you will want to customize some
481
481
of the features.
482
482
483
483
The most common way to change the way a specific config parser works is to use
484
- the :meth: `__init__ ` options:
484
+ the :meth: `! __init__ ` options:
485
485
486
486
* *defaults *, default value: ``None ``
487
487
@@ -491,7 +491,7 @@ the :meth:`__init__` options:
491
491
the documented default.
492
492
493
493
Hint: if you want to specify default values for a specific section, use
494
- :meth: `read_dict ` before you read the actual file.
494
+ :meth: `~ConfigParser. read_dict ` before you read the actual file.
495
495
496
496
* *dict_type *, default value: :class: `dict `
497
497
@@ -635,8 +635,8 @@ the :meth:`__init__` options:
635
635
* *strict *, default value: ``True ``
636
636
637
637
When set to ``True ``, the parser will not allow for any section or option
638
- duplicates while reading from a single source (using :meth: `read_file `,
639
- :meth: `read_string ` or :meth: `read_dict `). It is recommended to use strict
638
+ duplicates while reading from a single source (using :meth: `~ConfigParser. read_file `,
639
+ :meth: `~ConfigParser. read_string ` or :meth: `~ConfigParser. read_dict `). It is recommended to use strict
640
640
parsers in new applications.
641
641
642
642
.. versionchanged :: 3.2
@@ -697,7 +697,7 @@ the :meth:`__init__` options:
697
697
desirable, users may define them in a subclass or pass a dictionary where each
698
698
key is a name of the converter and each value is a callable implementing said
699
699
conversion. For instance, passing ``{'decimal': decimal.Decimal} `` would add
700
- :meth: `getdecimal ` on both the parser object and all section proxies. In
700
+ :meth: `! getdecimal ` on both the parser object and all section proxies. In
701
701
other words, it will be possible to write both
702
702
``parser_instance.getdecimal('section', 'key', fallback=0) `` and
703
703
``parser_instance['section'].getdecimal('key', 0) ``.
@@ -1062,11 +1062,11 @@ ConfigParser Objects
1062
1062
yielding Unicode strings (for example files opened in text mode).
1063
1063
1064
1064
Optional argument *source * specifies the name of the file being read. If
1065
- not given and *f * has a :attr: `name ` attribute, that is used for
1065
+ not given and *f * has a :attr: `! name ` attribute, that is used for
1066
1066
*source *; the default is ``'<???>' ``.
1067
1067
1068
1068
.. versionadded :: 3.2
1069
- Replaces :meth: `readfp `.
1069
+ Replaces :meth: `! readfp `.
1070
1070
1071
1071
.. method :: read_string(string, source='<string>')
1072
1072
@@ -1214,7 +1214,7 @@ ConfigParser Objects
1214
1214
1215
1215
.. data :: MAX_INTERPOLATION_DEPTH
1216
1216
1217
- The maximum depth for recursive interpolation for :meth: `get ` when the *raw *
1217
+ The maximum depth for recursive interpolation for :meth: `~configparser.ConfigParser. get ` when the *raw *
1218
1218
parameter is false. This is relevant only when the default *interpolation *
1219
1219
is used.
1220
1220
@@ -1287,13 +1287,13 @@ Exceptions
1287
1287
1288
1288
.. exception :: DuplicateSectionError
1289
1289
1290
- Exception raised if :meth: `add_section ` is called with the name of a section
1290
+ Exception raised if :meth: `~ConfigParser. add_section ` is called with the name of a section
1291
1291
that is already present or in strict parsers when a section if found more
1292
1292
than once in a single input file, string or dictionary.
1293
1293
1294
1294
.. versionadded :: 3.2
1295
1295
Optional ``source `` and ``lineno `` attributes and arguments to
1296
- :meth: `__init__ ` were added.
1296
+ :meth: `! __init__ ` were added.
1297
1297
1298
1298
1299
1299
.. exception :: DuplicateOptionError
@@ -1345,9 +1345,9 @@ Exceptions
1345
1345
1346
1346
Exception raised when errors occur attempting to parse a file.
1347
1347
1348
- .. versionchanged :: 3.12
1349
- The ``filename `` attribute and :meth: `__init__ ` constructor argument were
1350
- removed. They have been available using the name ``source `` since 3.2.
1348
+ .. versionchanged :: 3.12
1349
+ The ``filename `` attribute and :meth: `! __init__ ` constructor argument were
1350
+ removed. They have been available using the name ``source `` since 3.2.
1351
1351
1352
1352
.. rubric :: Footnotes
1353
1353
0 commit comments