if condition1:
  ...
  if condition2:
    ...
  else:
    ...
else:
  ...
  that is pretty straight forward, but in my case I have:
if condition1: ... if condition2: ... if conditio3: ... if condition4: ... else if condition5: ... if condition6: ... else if condition7: ... if condition8: .......
you see where this is going.... even with proper indenting, this can be hard to read, and without, no hope. Comments help, but should code ever be that complicated? So when is nesting to much? what are other options? But then again is the efficiency of the checks more important? Many questions that we all must deal with when writing code.
No comments:
Post a Comment