[Python-ideas] 80 character line width vs. something wider

Raymond Hettinger python at rcn.com
Thu May 21 19:44:12 CEST 2009


> I consider that a critical clue that I should consider refaceoring.   
> Not just the one long line, but the entire structure that resulted in  
> that deep nesting.  After you get the class and method def in, each  
> level should indicate a possible  control flow branch. So deeply  
> nested implies lots of branches implies a complicated structure.   
> Which means it's time to consider refactoring to simplify it.

Okay, I'm convinced.  80 is EXACTLY the right number.  79 is
too few and 81 is WAY over the top.  It doesn't matter what 
language your coding in, which century you're living in, or your
preference for tab sizes.

Looking back, I'm amazed that there was every any commercial
success for line printers that had more than 80 characters.  Those
guys who made green bar paper were seriously misguided.  How
could they ignore the one true universal programming constant.

Raymond



More information about the Python-ideas mailing list