[chirp_devel] Is FLAKE8 line length 80 still appropriate?
Dan Smith
Wed May 17 15:56:27 PDT 2023
> Linus Torvalds used to recommend 80 characters and tab-indentation in
> the Linux kernel because he argued that if your code was getting
> constrained to the right-hand edge (in his words "more than 3 levels of
> indentation"), your functions were probably getting too complex and
> should be split up:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/CodingStyle?h=v3.19#n29
>
> Python isn't C, but I think the same logic holds true: if your
> functions/methods are so deeply nested that they're literally marching
> off the right-hand margin of your editor, a re-factoring might be a good
> idea.
Yep, this is how I feel about it. Python's forced indenting even helps to ensure you hit the right margin as complexity increases.
I'm not interested in changing this rule.
--Dan
More information about the chirp_devel
mailing list