dimod.variables.Variables._extend¶
- Variables._extend()[source]¶
Add new variables.
- Parameters
iterable (iterable[
Variable
]) – An iterable of hashable objects.permissive (bool, optional, default=False) – If
False
, appending a variable that already exists will raise aValueError
. IfTrue
, appending a variable that already exists will not change the container.
- Raises
ValueError – If the variable is present and
permissive
isFalse
.
Caution
This method is semi-public. It is intended to be used by classes that have
Variables
as an attribute, not by the the user.