2
0
Fork 0
mirror of https://github.com/bazelbuild/bazel-skylib synced 2024-11-27 05:43:25 +00:00
bazel-skylib/docs/dicts_doc.md
Alex Eagle eabe5f7fe9
Run regenerate_docs.sh (#297)
Co-authored-by: Alexandre Rostovtsev <arostovtsev@google.com> (merge conflict fixes)
2021-09-24 11:24:43 -04:00

980 B
Executable file

dicts.add

dicts.add(dictionaries, kwargs)

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

Name Description Default Value
dictionaries Zero or more dictionaries to be added. none
kwargs Additional dictionary passed as keyword args. none