This is my code:
cache = dict()
try: return cache[x]
cache[x] = f(x)
n,m = 8,3
init = frozenset((x,y) for x in range(n) for y in range(m))
return [frozenset((x,y) for (x,y) in board if x < px or y < py) for px,py in board]
if not board: return True
return any(not wins(move) for move in moves(board))
When running this in Python 2.6 or 2.7 under PyTools I get a GeneratorExit exception. When running it with IronPython in PyTools or in Python from the console I do not get an exception. What am I doing wrong?
Jul 27, 2011 at 9:04 PM
Nothing; CPython is using GeneratorExit as a control flow exception; arguably we should not break on unhandled GeneratorExit by default.
You can stop PyTools from breaking on GeneratorExit by going to Debug->Exceptions->Python Exceptions and unchecking GeneratorExit in the list. In general, if the debugger is breaking on an exception which you would like to ignore, you can click "Break"
in the exception dialog box, then go to Debug->Exceptions->Python Exceptions and uncheck that exception. Then hit F5 to continue and you won't break on those exceptions any more.