Skip to content

Commit

Permalink
add ´__repr__´ (#2091)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndonkoHenri authored Nov 16, 2023
1 parent 9b5f55e commit ad2ad88
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sdk/python/packages/flet-core/src/flet_core/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit ad2ad88

Please sign in to comment.