Sudoku

Dave Angel davea at davea.name
Sun Mar 31 00:15:36 CET 2013


On 03/30/2013 06:06 PM, Eric Parry wrote:
> On Saturday, March 30, 2013 8:41:08 AM UTC+10:30, Dave Angel wrote:
>> On 03/29/2013 05:47 PM, Eric Parry wrote:
>>
>>>  <SNIP>
>>
>> Sometimes a bug in such a function will cause it to run indefinitely,
>>
>> and/or to overflow the stack.  I don't see such a bug in this function.
>>
>>
>>
>>
>>
>> --
>>
>> DaveA
>
> The exit() did not work.

Would you like to elaborate?  exit() is supposed to take an int 
parameter, but the author apparently didn't notice that.  So perhaps you 
got an exception of some sort.  Change it to exit() or exit(0) and it 
might solve the problem, depending on what the problem was.

> I replaced it with return = 0, and that does work.

No it doesn't.  return = 0 is a syntax error in both Python 2.x and 3.x

But if you changed it to a valid return statement, then that's why it 
doesn't stop on the first solution.


-- 
DaveA



More information about the Python-list mailing list