MCPcopy Index your code
hub / github.com/webpy/webpy / dictadd

Function dictadd

web/utils.py:818–829  ·  view source on GitHub ↗

Returns a dictionary consisting of the keys in the argument dictionaries. If they share a key, the value from the last argument is used. >>> dictadd({1: 0, 2: 0}, {2: 1, 3: 1}) {1: 0, 2: 1, 3: 1}

(*dicts)

Source from the content-addressed store, hash-verified

816
817
818def dictadd(*dicts):
819 """
820 Returns a dictionary consisting of the keys in the argument dictionaries.
821 If they share a key, the value from the last argument is used.
822
823 >>> dictadd({1: 0, 2: 0}, {2: 1, 3: 1})
824 {1: 0, 2: 1, 3: 1}
825 """
826 result = {}
827 for dct in dicts:
828 result.update(dct)
829 return result
830
831
832def requeue(queue, index=-1):

Callers 2

__init__Method · 0.85
rawinputFunction · 0.85

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected