3 ms·
Depends on what you mean by "technically". Computationally, python lambda is fully capable of whatever a regular python function can do, including side-effects
by powersnail 3y ago
Depends on what you mean by "technically".
Computationally, python lambda is fully capable of whatever a regular python function can do, including side-effects, (you can call foo.set_bar()).
The limit is syntactical: a lambda has to be one single expression. So, no assignment statement, no multiple lines, etc.