3 ms·
"Limits all the lines to a maximum of 79 characters" - what am I, a farmer with an 800x600 VGA CRT?
by opinali 13y ago
"Limits all the lines to a maximum of 79 characters" - what am I, a farmer with an 800x600 VGA CRT?
- dbaupp 13y agoNo, but you might be someone who has two windows of code open at once, or code & a spec sheet (or algorithm description, or help/man page) open side-by-side. (That said, I prefer 100 columns: two 100 column files fit perfectly next to each other on my screen.)
- wffurr 13y agoI had a professor set the line limit at 109 for our assignments, specifically because that's what would fit side-by-side on his monitor.
- wffurr 13y ago* Reading a side-by-side diff * Split-screen editor with multiple columns * Editor side-by-side with documentation Long lines are also bad for readability – too much happening in a single line. If you have a very long line, either your names are too verbose, you need to break up your logic into easier to follow steps, or you need to write a function definition and give the logic a name. 79 character lines are arbitrary, but a short line length limit follows directly from the Zen of Python.
- richardjs 13y agoPEP 8 goes on to give the rational: "Limiting the required editor window width makes it possible to have several files open side-by-side, and works well when using code review tools that present the two versions in adjacent columns." It also says that if your team can agree on a longer length, it's okay to increase it.
- tingletech 13y agoWhy would a farmer be coding his python on an old 800x600 VGA CRT?