News for hackers. Stuff that matters.
Re:"Real" anonymous functions for Python by powersnail on Sunday March 31, 2024 @02:44PM (#39886866)
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.

There are no comments on this comment yet.