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):