News for hackers. Stuff that matters.
Re:Functools – The Power of Higher-Order Functions in Python by mrweasel on Friday July 09, 2021 @03:30AM (#27781290)
If you just have a short one or two lines of code in a callback, maybe it's not so important. Where I have an issue is when you have five nested anonymous functions. Why wouldn't you break those out into named functions?

Assuming you have five levels nested if, ignoring the fact that you might be doing something wrong, then you should name those, but that requires you to extract those code paths and put them into separate functions.

There are no comments on this comment yet.