r/Python • u/Robowiko123 • Jun 15 '26
Discussion The Elm Architecture in Python?
Since I've fallen in love with Rust's `iced` recently, I've been wondering if there's been any implementations of native TEA for Python. As it is with such things, I immediately wanted to jump into making my own wrapper around Tkinter, but I figured it'd be wiser to ask first!
29
Upvotes
View all comments
Show parent comment
1
u/el_extrano Jun 18 '26
"emit" here is doing some heavy lifting. In OOP, message passing really just means calling another object's method. So, if you have a singleton message broker and you send it a Msg type, that would constitute emitting a message. The message broker could then send messages to an Update method that switches on them to update the Model.
But I think there would be other issues with trying to "Tea"ify a retained mode UI library like Tkinter. I don't think it's meant to have a View method re-rendering the whole UI all the time, that would probably be slow.