:right-sidebar: True ObjectExpression =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: ObjectExpression(*args, **kwargs) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Expression` A ``GObject`` value in a ``GtkExpression``. Constructors ------------ .. rst-class:: interim-class .. class:: ObjectExpression :no-index: .. classmethod:: new(object: ~gi.repository.GObject.Object) -> ~gi.repository.Gtk.ObjectExpression Creates an expression evaluating to the given ``object`` with a weak reference. Once the ``object`` is disposed, it will fail to evaluate. This expression is meant to break reference cycles. If you want to keep a reference to ``object``, use :obj:`~gi.repository.Gtk.ConstantExpression.new`. :param object: object to watch Methods ------- .. rst-class:: interim-class .. class:: ObjectExpression :no-index: .. method:: get_object() -> ~gi.repository.GObject.Object | None Gets the object that the expression evaluates to.