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.