

2·
2 days agoRegarding the “bad code”. It’s more readable though to keep the full limit for each elif case, which is most often way more important than performance, especially since than logic with the age can be easily optimized by any good compiler or runtime.
Good points! Keeping to the norm is very important for readability.
I do disagree with the performance bit though. Again, there will probably be no difference at all in the performance because the redundant code is removed before (or during [e.g. JIT optimizations]) execution.