Terry J. Reedy added the comment: We know that compile has undocumented size limits of various sorts that are usually more than sufficient for normal human written code but which can be overwhelmed by machine-generated code. We do not regard this as a bug. However, 20 levels of if-nesting should not be a problem unless, say, you are recursively calling such a function.
How are you running python, on what machine? What do you mean by 'crash'? Are you running python from a console/terminal, so that there is someplace for tracebacks and exceptions to be displayed? What does 'It did not crash' mean, versus the 'crash' label above? Have you tried increasing the recursion limit with sys.setrecursionlimit. The default for me is 1000. I have used 10000. On multi-gigabyte machines, 100000 might even work. Instead of directly running your code, have you tried a driver program that reads your code (one file at a time) into a string and then compiles it with compile()? You might somehow get a better error message, or in any case, find out which of the separate files fail. ---------- nosy: +terry.reedy _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31113> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com