On 2022-10-10 16:48:04 +0000, Robert Latest via Python-list wrote: > Axy wrote: > >> Also not really a justification for "shortest block first". Wanting > >> some elaboration on that. What's the value in it? > > > > Well, the value is productivity. No need to save puzzles "what this > > hanging else belongs to?" > > If you find yourself asking that question, the if-block is probably too long > to > begin with.
ACK. > > Code small things first and return early, same ^^^^^^^^^^^^ > > as taking a test: do easy and quick things first and boring and > > difficult ones later. > > Yes, but in that case you have a very long indented "else" block, If you return you don't have to indent the rest. hp -- _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | h...@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!"
signature.asc
Description: PGP signature
-- https://mail.python.org/mailman/listinfo/python-list