:right-sidebar: True TryExpression =================================================================== .. currentmodule:: gi.repository.Gtk .. versionadded:: 4.22 .. class:: TryExpression(*args, **kwargs) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Expression` A ``GtkExpression`` that tries to evaluate each of its expressions until it succeeds. If all expressions fail to evaluate, the ``GtkTryExpression``\'s evaluation fails as well. Constructors ------------ .. rst-class:: interim-class .. class:: TryExpression :no-index: .. classmethod:: new(expressions: list[~gi.repository.Gtk.Expression]) -> ~gi.repository.Gtk.TryExpression Creates a ``GtkExpression`` with an array of expressions. When evaluated, the ``GtkTryExpression`` tries to evaluate each of its expressions until it succeeds. If all expressions fail to evaluate, the ``GtkTryExpression``\'s evaluation fails as well. The value type of the expressions in the array must match. .. versionadded:: 4.22 :param expressions: The array of expressions