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

Stephen J. Turnbull stephen at xemacs.org
Tue May 19 21:08:25 CEST 2009


Aaron Rubin writes:

 > class a(object):
 >     def method1(simulation=False):
 >         try:
 >             if simulation:
 >                 for x in range(10):
 >                     if x>5:
 >                         try:
 >                             # here might begin some actual math, with two or
 > three more levels of logic, interfacing with other libraries such as NumPy,
 > etc. where you might need specific error handling

Not in my code; it would almost surely be a function or method call.

 >         except CustomError:
 >             # customer error handling
 > 
 > i.e. the logic code *started* at the 7th indentation level.  But I'm sure
 > you can find plenty of examples where it might be more.




More information about the Python-ideas mailing list