Does anyone know if there is a limit to how many indentations/levels of nested loops is viable in Python? I'm having an issue with problem 3 in that my nested loops work fine until I add another while loop outside of them, and I can't figure out why.
There's no limit. Maybe if you posted a code snippet, someone might be able to spot something that you're not seeing?
(edit: on further research, I'm seeing a couple of references to limits between 20 and several hundred layers of indentation -- I'm not sure if the varying numbers are different versions or implementations or what, but even if it's 20, it's *way* more than anything you'd find in these problem sets, and possibly any sane software design.)
no subject
Date: 2009-11-23 03:21 am (UTC)no subject
Date: 2009-11-23 04:14 am (UTC)(edit: on further research, I'm seeing a couple of references to limits between 20 and several hundred layers of indentation -- I'm not sure if the varying numbers are different versions or implementations or what, but even if it's 20, it's *way* more than anything you'd find in these problem sets, and possibly any sane software design.)