3 ms·
Don't forget this part of PEP 8: > For flowing long blocks of text with fewer structural restrictions (docstrings or comments), the line length should be limit
by eesmith 7y ago
Don't forget this part of PEP 8:
> For flowing long blocks of text with fewer structural restrictions (docstrings or comments), the line length should be limited to 72 characters.
Older IBM machines could only read 72 columns of the 80 columns of data. The remaining 8 columns were used to store sorting information, eg, a line number so if the card deck was dropped it could be re-sorted using a mechanical sorter.
- solidsnack9000 7y agoThere are actually deeper reasons for these limits. Text typically gets broken into multiple columns when it would be over about 70 characters long, because reading long lines is uncomfortable. Many people talk about the 80 column rule as reflecting some technical limitation due to the antiquated punch cards — but they could certainly have made wider punchcards if they wanted to.
- eesmith 7y agoThose who refer to it as a technical limitation are almost certainly wrong. Remington-Rand released a 90-column punched cards, for example, two years after the famous 80-column IBM card. But IBM equipment dominated the market, and their cards became "standard." https://historyofpunchcards.wordpress.com/2014/03/24/rivalry-remington-rand-vs-ibm/ https://historyofpunchcards.wordpress.com/2014/03/24/rivalry... Eg, Univac used the 90-column format. https://en.wikipedia.org/wiki/Punched_card#Powers/Remington_Rand_UNIVAC_90-column_punched_card_format https://en.wikipedia.org/wiki/Punched_card#Powers/Remington_... FWIW, the recommendation of 72 characters seems much more a programming standard than a general readability standard. For example, quoting from https://www.viget.com/articles/the-line-length-misconception/ https://www.viget.com/articles/the-line-length-misconception... quoting from "Bringhurst's authoritative The Elements of Typographic Style". > Anything from 45 to 75 characters is widely-regarded as a satisfactory length of line for a single-column page set in a serifed text face in a text size. The 66-character line (counting both letters and spaces) is widely regarded as ideal
- oblio 7y agoCode is - text wise - not as dense as prose. There's usually a lot more special characters and white space. I don't think rules for prose apply here.
- kps 7y ago> Older IBM machines could only read 72 columns of the 80 columns of data. That applied to the early scientific line, the 70x series, as a side effect of their 36-bit word size — they read each card row into two words. Fortran gave them lasting influence. (Their earliest commercial computer, the IBM 650, could read 50 columns — any 50, determined by wiring a plugboard, as on pre-computer card processing equipment.)
- eesmith 7y agoAhh, I see. Yes, my experience is with some data format defined in the early 1970s using FORTRAN format statements, almost certainly because of IBM's scientific line.