Merge two kwarg lists. If a kwarg is present in both lists but with different values, an error is raised.
merge_kwargs(
kwargsA,
kwargsB,
labelA = "first kwarg(s)",
labelB = "second kwarg(s)",
extraMsg = "[DEFAULT]"
)
The first list of kwargs.
The second list of kwargs. If duplicates are present, the default
message recommends the user to remove the kwarg here in favor of placing the
correct one in kwargsA
.
(Optional) Descriptor of kwargsA
for error statement. Default "first kwarg(s)".
(Optional) Descriptor of kwargsB
for error statement. Default "second kwarg(s)".
(Optional) Extra text for error statement. "[DEFAULT]" (default) will use this message: "Note that a kwarg only has to be provided to one of these. Place the correct value in the first location and remove the kwarg from the second location".
A list with the union of kwargsA
and kwargsB