Re:Refactoring a 300-line if
by evmar on Tuesday December 01, 2015 @02:44PM
(#10658171)
It bugged me too. Here's the equivalent logic without even using all (which is definitely the right approach):
That's the same number of lines of code, doesn't require two imports, and is way easier to follow. I love functional programming but Python (intentionally, see reduce in py3) is not a language for doing it.
[ Parent
| on HN ]