for / while else doesn't make sense
marko at pacujo.net
Fri Jun 10 08:31:11 EDT 2016
alister <alister.ware at ntlworld.com>:
> Or more simply a hard fixed RULE (MUST be less than X lines) is Bad.
It's not X lines, it's "you must see the whole function at once."
If your display can show 1,500 lines at once, that's your limit. Mine
> a flexible GUIDELINE on the other hand is reasonable.
There are rare exceptions to every rule.
> after all an efficient function could be be X=1 lines, abriatrily
> spliting this could make the final function less readable & possibly
> even longer in total.
Splitting functions requires taste and skill but, when done properly,
guarantees easier reading and higher quality. As you refactor your
function, you notice clumsy and questionable idioms and end up tidying
the logic up in the process.
More information about the Python-list