traveler.core.store.either_dict_or_kwargs#
- traveler.core.store.either_dict_or_kwargs(pos_kwargs, kw_kwargs, func_name)[source]#
Select either a positional mapping or keyword arguments.
- Parameters:
pos_kwargs (collections.abc.Mapping or None) – Mapping supplied as a positional argument.
kw_kwargs (collections.abc.Mapping) – Mapping assembled from keyword arguments.
func_name (str) – Function name used in validation error messages.
- Returns:
The positional mapping when supplied; otherwise, the keyword mapping.
- Return type:
collections.abc.Mapping
- Raises:
ValueError – If both forms are supplied or
pos_kwargsis not a mapping.