@@ -71,23 +71,6 @@ MultiDict
71
71
72
72
Return a shallow copy of the dictionary.
73
73
74
- .. method :: extend([other])
75
-
76
- Extend the dictionary with the key/value pairs from *other *,
77
- appending the pairs to this dictionary. For existing keys,
78
- values are added.
79
- Returns ``None ``.
80
-
81
- :meth: `extend ` accepts either another dictionary object or an
82
- iterable of key/value pairs (as tuples or other iterables of
83
- length two). If keyword arguments are specified, the dictionary
84
- is then extended with those key/value pairs:
85
- ``d.extend(red=1, blue=2) ``.
86
-
87
- Effectively the same as calling :meth: `add ` for every
88
- ``(key, value) `` pair. Also see :meth: `update `, for a version
89
- that replaces existing keys.
90
-
91
74
.. method :: getone(key[, default])
92
75
93
76
Return the **first ** value for *key * if *key * is in the
@@ -179,9 +162,30 @@ MultiDict
179
162
If not, insert *key * with a value of *default * and return *default *.
180
163
*default * defaults to ``None ``.
181
164
182
- .. method :: update([other])
165
+ .. method :: extend([other], **kwargs)
166
+
167
+ Extend the dictionary with the key/value pairs from *other * and *kwargs *,
168
+ appending the pairs to this dictionary. For existing keys,
169
+ values are added.
183
170
184
- Update the dictionary with the key/value pairs from *other *,
171
+ Returns ``None ``.
172
+
173
+ :meth: `extend ` accepts either another dictionary object or an
174
+ iterable of key/value pairs (as tuples or other iterables of
175
+ length two). If keyword arguments are specified, the dictionary
176
+ is then extended with those key/value pairs:
177
+ ``d.extend(red=1, blue=2) ``.
178
+
179
+ Effectively the same as calling :meth: `add ` for every
180
+ ``(key, value) `` pair.
181
+
182
+ .. seealso ::
183
+
184
+ :meth: `update `
185
+
186
+ .. method :: update([other], **kwargs)
187
+
188
+ Update the dictionary with the key/value pairs from *other * and *kwargs *,
185
189
overwriting existing keys.
186
190
187
191
Returns ``None ``.
@@ -192,8 +196,9 @@ MultiDict
192
196
dictionary is then updated with those key/value pairs:
193
197
``d.update(red=1, blue=2) ``.
194
198
195
- Also see :meth: `extend ` for a method that adds to existing keys rather
196
- than update them.
199
+ .. seealso ::
200
+
201
+ :meth: `extend `
197
202
198
203
.. seealso ::
199
204
@@ -444,7 +449,7 @@ Environment variables
444
449
its C counterpart, depending on the way it's used.
445
450
446
451
.. envvar :: MULTIDICT_DEBUG_BUILD
447
-
452
+
448
453
An environment variable that instructs the packaging scripts to compile
449
454
the C-extension based variant of :mod: `multidict ` with debug symbols.
450
455
This is useful for debugging the C-extension code, but it will result in
0 commit comments