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.

__init__(property: VTProperty, value: VTValue) None[source]
property value: Value

The value of value snak.

get_value() Value[source]

Gets the value of value snak.

Returns:

Value.

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.

object_class

alias of ValueSnak

__init__(property: VTProperty, value: VTValue) None[source]
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.

class ValueSnakVariable(name: str, variable_class: type[Variable] | type[Term] | None = None)[source]

Bases: SnakVariable

Value snak variable.

Parameters:

name – Name.

object_class

alias of ValueSnak