ValueSnak
- class ValueSnak(*args, **kwargs)[source]
Bases:
Snak
Value snak.
- Parameters:
property – Property.
value – Value.
- template_class
alias of
ValueSnakTemplate
- variable_class
alias of
ValueSnakVariable
- classmethod check(arg: Any, function: Callable[[...], Any] | str | None = None, name: str | None = None, position: int | None = None) Self [source]
Coerces arg into an instance of this class.
If arg cannot be coerced, raises an error.
- Parameters:
arg – Value.
function – Function or function name.
name – Argument name.
position – Argument position.
- Returns:
Object.
- class ValueSnakTemplate(*args, **kwargs)[source]
Bases:
SnakTemplate
Value snak template.
- Parameters:
property – Property, property template, or property variable.
value – Value, value template, or value variable.
- property value: ValueTemplate | ValueVariable | Value
The value of value snak template.
- get_value() ValueTemplate | ValueVariable | Value [source]
Gets the value of value snak template.
- Returns:
Value or value template or value variable.