@@ -120,26 +120,26 @@ The class can be used to simulate nested scopes and is useful in templating.
120
120
121
121
..seealso ::
122
122
123
- * The `MultiContext class
124
- <https://github.com/enthought/codetools/blob/4.0.0/codetools/contexts/multi_context.py> `_
125
- in the Enthought `CodeTools package
126
- <https://github.com/enthought/codetools> `_ has options to support
127
- writing to any mapping in the chain.
123
+ * The `MultiContext class
124
+ <https://github.com/enthought/codetools/blob/4.0.0/codetools/contexts/multi_context.py> `_
125
+ in the Enthought `CodeTools package
126
+ <https://github.com/enthought/codetools> `_ has options to support
127
+ writing to any mapping in the chain.
128
128
129
- * Django's `Context class
130
- <https://github.com/django/django/blob/main/django/template/context.py> `_
131
- for templating is a read-only chain of mappings. It also features
132
- pushing and popping of contexts similar to the
133
- :meth: `~collections.ChainMap.new_child ` method and the
134
- :attr: `~collections.ChainMap.parents ` property.
129
+ * Django's `Context class
130
+ <https://github.com/django/django/blob/main/django/template/context.py> `_
131
+ for templating is a read-only chain of mappings. It also features
132
+ pushing and popping of contexts similar to the
133
+ :meth: `~collections.ChainMap.new_child ` method and the
134
+ :attr: `~collections.ChainMap.parents ` property.
135
135
136
- * The `Nested Contexts recipe
137
- <https://code.activestate.com/recipes/577434/> `_ has options to control
138
- whether writes and other mutations apply only to the first mapping or to
139
- any mapping in the chain.
136
+ * The `Nested Contexts recipe
137
+ <https://code.activestate.com/recipes/577434/> `_ has options to control
138
+ whether writes and other mutations apply only to the first mapping or to
139
+ any mapping in the chain.
140
140
141
- * A `greatly simplified read-only version of Chainmap
142
- <https://code.activestate.com/recipes/305268/> `_.
141
+ * A `greatly simplified read-only version of Chainmap
142
+ <https://code.activestate.com/recipes/305268/> `_.
143
143
144
144
145
145
:class: `ChainMap ` Examples and Recipes
@@ -428,22 +428,22 @@ or subtracting from an empty counter.
428
428
429
429
..seealso ::
430
430
431
- * `Bag class <https://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html >`_
432
- in Smalltalk.
431
+ * `Bag class <https://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html >`_
432
+ in Smalltalk.
433
433
434
- * Wikipedia entry for `Multisets <https://en.wikipedia.org/wiki/Multiset >`_.
434
+ * Wikipedia entry for `Multisets <https://en.wikipedia.org/wiki/Multiset >`_.
435
435
436
- * `C++ multisets <http://www.java2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm >`_
437
- tutorial with examples.
436
+ * `C++ multisets <http://www.java2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm >`_
437
+ tutorial with examples.
438
438
439
- * For mathematical operations on multisets and their use cases, see
440
- *Knuth, Donald. The Art of Computer Programming Volume II,
441
- Section 4.6.3, Exercise 19 *.
439
+ * For mathematical operations on multisets and their use cases, see
440
+ *Knuth, Donald. The Art of Computer Programming Volume II,
441
+ Section 4.6.3, Exercise 19 *.
442
442
443
- * To enumerate all distinct multisets of a given size over a given set of
444
- elements, see:func: `itertools.combinations_with_replacement `::
443
+ * To enumerate all distinct multisets of a given size over a given set of
444
+ elements, see:func: `itertools.combinations_with_replacement `::
445
445
446
- map(Counter, combinations_with_replacement('ABC', 2)) # --> AA AB AC BB BC CC
446
+ map(Counter, combinations_with_replacement('ABC', 2)) # --> AA AB AC BB BC CC
447
447
448
448
449
449
:class: `deque ` objects
@@ -1058,20 +1058,20 @@ fields:
1058
1058
1059
1059
..seealso ::
1060
1060
1061
- * See:class: `typing.NamedTuple ` for a way to add type hints for named
1062
- tuples. It also provides an elegant notation using the:keyword: `class `
1063
- keyword::
1061
+ * See:class: `typing.NamedTuple ` for a way to add type hints for named
1062
+ tuples. It also provides an elegant notation using the:keyword: `class `
1063
+ keyword::
1064
1064
1065
- class Component(NamedTuple):
1066
- part_number: int
1067
- weight: float
1068
- description: Optional[str] = None
1065
+ class Component(NamedTuple):
1066
+ part_number: int
1067
+ weight: float
1068
+ description: Optional[str] = None
1069
1069
1070
- * See:meth: `types.SimpleNamespace ` for a mutable namespace based on an
1071
- underlying dictionary instead of a tuple.
1070
+ * See:meth: `types.SimpleNamespace ` for a mutable namespace based on an
1071
+ underlying dictionary instead of a tuple.
1072
1072
1073
- * The:mod: `dataclasses ` module provides a decorator and functions for
1074
- automatically adding generated special methods to user-defined classes.
1073
+ * The:mod: `dataclasses ` module provides a decorator and functions for
1074
+ automatically adding generated special methods to user-defined classes.
1075
1075
1076
1076
1077
1077
:class: `OrderedDict ` objects