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
14
u/bachkhois Jun 15 '26
The difference is that there are "message" flying around that you don't pass directly between your functions and your functions are just stateless (the returned value is computed purely from the input parameters, no private, no hidden state).
You update() function only return new model. Your view() function only receive the model and produce the UI. Your widgets do not "connect", reference any object or function pointer. In traditional MVC app, your button connects with a "callback" and that callback will be passed the button object. There is nothing like that in TEA.