From ad2ad88fe72eb042c20f7402597dd04626c7b877 Mon Sep 17 00:00:00 2001 From: TheEthicalBoy <98978078+ndonkoHenri@users.noreply.github.com> Date: Thu, 16 Nov 2023 21:20:44 +0100 Subject: [PATCH] =?UTF-8?q?add=20=C2=B4=5F=5Frepr=5F=5F=C2=B4=20(#2091)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sdk/python/packages/flet-core/src/flet_core/control.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/python/packages/flet-core/src/flet_core/control.py b/sdk/python/packages/flet-core/src/flet_core/control.py index 2c228c3bd..b98b72efe 100644 --- a/sdk/python/packages/flet-core/src/flet_core/control.py +++ b/sdk/python/packages/flet-core/src/flet_core/control.py @@ -156,6 +156,9 @@ def __str__(self): attrs[k] = v[0] return f"{self._get_control_name()} {attrs}" + def __repr__(self): + return f"{self.__class__.__name__}(" + ", ".join(f"{k}={v[0]}" for k, v in self.__attrs.items()) + ")" + # event_handlers @property def event_handlers(self):