New submission from Naris R <nariscat...@gmail.com>: if a generator passed to min/max throws an exception, the stack trace is normally shown on the line that caused the exception, but if the exception is a StopIteration, the trace only shows the line where the max/min function was called.
I was writing a minimax and alphabeta search with generator expression and list comprehension and accidentally passed an empty iterator to the next function while computing states for minimax and it took a very long time to find out where the error was actually caused. ---------- messages: 315561 nosy: Naris R priority: normal severity: normal status: open title: inconsistent stack trace for exceptions thrown in generators passed to min/max type: behavior versions: Python 2.7, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33323> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com