merge_kwargs

0th

Percentile

Merges two kwargs

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

Keywords
internal
Usage
merge_kwargs(
  kwargsA,
  kwargsB,
  labelA = "first kwarg(s)",
  labelB = "second kwarg(s)",
  extraMsg = "[DEFAULT]"
)
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".

Value

A list with the union of kwargsA and kwargsB

Aliases
  • merge_kwargs
Documentation reproduced from package ciftiTools, version 0.1.6.0, License: GPL-3

Community examples

Looks like there are no examples yet.