ciftiTools (version 0.14.0)

merge_kwargs: Merges two kwargs

Description

Merge two kwarg lists. If a kwarg is present in both lists but with different values, an error is raised.

Usage

merge_kwargs(
  kwargsA,
  kwargsB,
  labelA = "first kwarg(s)",
  labelB = "second kwarg(s)",
  extraMsg = "[DEFAULT]"
)

Value

A list with the union of kwargsA and kwargsB

Arguments

kwargsA

The first list of kwargs.

kwargsB

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.

labelA

(Optional) Descriptor of kwargsA for error statement. Default "first kwarg(s)".

labelB

(Optional) Descriptor of kwargsB for error statement. Default "second kwarg(s)".

extraMsg

(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".