aboutsummaryrefslogtreecommitdiff
path: root/docs/dicts_doc.md
blob: 2e95cf8e26bf384f25c770c8ea519b6bdd87b526 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
## dicts.add

<pre>
dicts.add(<a href="#dicts.add-dictionaries">dictionaries</a>, <a href="#dicts.add-kwargs">kwargs</a>)
</pre>

Returns a new `dict` that has all the entries of the given dictionaries.

If the same key is present in more than one of the input dictionaries, the
last of them in the argument list overrides any earlier ones.

This function is designed to take zero or one arguments as well as multiple
dictionaries, so that it follows arithmetic identities and callers can avoid
special cases for their inputs: the sum of zero dictionaries is the empty
dictionary, and the sum of a single dictionary is a copy of itself.


### Parameters

<table class="params-table">
  <colgroup>
    <col class="col-param" />
    <col class="col-description" />
  </colgroup>
  <tbody>
    <tr id="dicts.add-dictionaries">
      <td><code>dictionaries</code></td>
      <td>
        optional.
        <p>
          Zero or more dictionaries to be added.
        </p>
      </td>
    </tr>
    <tr id="dicts.add-kwargs">
      <td><code>kwargs</code></td>
      <td>
        optional.
        <p>
          Additional dictionary passed as keyword args.
        </p>
      </td>
    </tr>
  </tbody>
</table>