VariantType#

class VariantType(**kwargs)#
Constructors:

new(type_string:str) -> GLib.VariantType
new_array(element:GLib.VariantType) -> GLib.VariantType
new_dict_entry(key:GLib.VariantType, value:GLib.VariantType) -> GLib.VariantType
new_maybe(element:GLib.VariantType) -> GLib.VariantType
new_tuple(items:list) -> GLib.VariantType

Constructors#

class VariantType
classmethod new(type_string: str) VariantType#
Parameters:

type_string

classmethod new_array(element: VariantType) VariantType#
Parameters:

element

classmethod new_dict_entry(key: VariantType, value: VariantType) VariantType#
Parameters:
  • key

  • value

classmethod new_maybe(element: VariantType) VariantType#
Parameters:

element

classmethod new_tuple(items: list[VariantType]) VariantType#
Parameters:

items

Methods#

class VariantType
classmethod checked_() VariantType#
dup_string() str#
element() VariantType#
equal(type2: VariantType) bool#
Parameters:

type2

first() VariantType#
free() None#
get_string_length() int#
hash() int#
is_array() bool#
is_basic() bool#
is_container() bool#
is_definite() bool#
is_dict_entry() bool#
is_maybe() bool#
is_subtype_of(supertype: VariantType) bool#
Parameters:

supertype

is_tuple() bool#
is_variant() bool#
key() VariantType#
n_items() int#
next() VariantType#
classmethod string_get_depth_() int#
classmethod string_is_valid() bool#
classmethod string_scan(limit: str | None = None) Tuple[bool, str]#
Parameters:

limit

value() VariantType#