Message 315561 - Python tracker

Message315561

Author Naris R
Recipients Naris R
Date 2018-04-21.10:53:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1524308000.84.0.682650639539.issue33323@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-04-21 10:53:20Naris Rsetrecipients: + Naris R
2018-04-21 10:53:20Naris Rsetmessageid: <1524308000.84.0.682650639539.issue33323@psf.upfronthosting.co.za>
2018-04-21 10:53:20Naris Rlinkissue33323 messages
2018-04-21 10:53:20Naris Rcreate