|
|
|
|
|
by throwitaway1123
632 days ago
|
|
If a callback function gets really unwieldy then you should probably extract it from the call site and define it elsewhere, but that should happen because you decided to, not because the language's limitations coerced you into doing it. The lambda restrictions in Python are probably due to the complexities of parsing indentation based languages, and the clean code argument is just a helpful rationalization. I've never woken up in angst over the fact that I wrote a callback function with two statements in it. |
|
[0] https://www.artima.com/weblogs/viewpost.jsp?thread=147358