diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Reference-manual.md | 3 | ||||
-rw-r--r-- | docs/markdown/snippets/dict_add.md | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index a7b8a2b..3ae740d 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -1859,6 +1859,9 @@ statement](Syntax.md#foreach-statements). Dictionaries are available since 0.47.0. +Since 0.48.0 dictionaries can be added (e.g. `d1 = d2 + d3` and `d1 += d2`). +Values from the second dictionary overrides values from the first. + ## Returned objects These are objects returned by the [functions listed above](#functions). diff --git a/docs/markdown/snippets/dict_add.md b/docs/markdown/snippets/dict_add.md new file mode 100644 index 0000000..cde5b57 --- /dev/null +++ b/docs/markdown/snippets/dict_add.md @@ -0,0 +1,10 @@ +## Dictionary addition + +Dictionaries can now be added, values from the second dictionary overrides values +from the first + +```meson +d1 = {'a' : 'b'} +d3 = d1 + {'a' : 'c'} +d3 += {'d' : 'e'} +``` |