Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #42353

Re: Sudoku

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <davea@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.077
X-Spam-Evidence '*H*': 0.85; '*S*': 0.00; 'syntax': 0.04; 'overflow': 0.09; 'stack.': 0.09; 'python': 0.11; 'bug': 0.12; 'exit()': 0.16; 'exception': 0.16; 'wrote:': 0.18; 'solution.': 0.20; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; '2.x': 0.24; 'header :In-Reply-To:1': 0.27; 'function': 0.29; "doesn't": 0.30; 'work.': 0.31; 'that.': 0.31; '3.x': 0.31; 'apparently': 0.31; 'supposed': 0.32; 'run': 0.32; 'problem': 0.35; 'but': 0.35; "didn't": 0.36; 'sometimes': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'changed': 0.39; 'dave': 0.60; 'solve': 0.60; 'march': 0.61; 'first': 0.61; 'such': 0.63; '30,': 0.65; 'received:74.208': 0.68; 'statement,': 0.68; 'received:74.208.4.194': 0.84; 'angel': 0.91; '2013': 0.98
Date Sat, 30 Mar 2013 19:15:36 -0400
From Dave Angel <davea@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4
MIME-Version 1.0
To python-list@python.org
Subject Re: Sudoku
References <e45b8b75-ff89-4ee1-9ada-bfda3d06d05d@googlegroups.com> <9dla2a-kql.ln1@satorlaser.homedns.org> <5ce10a13-be58-4548-85df-e1d865d3304e@googlegroups.com> <mailman.3857.1364445382.2939.python-list@python.org> <f160e316-e2f6-4314-827e-9d48007f7f70@googlegroups.com> <mailman.3946.1364556269.2939.python-list@python.org> <17da5afc-7a9b-40ea-a544-6012dfeef3ce@googlegroups.com> <mailman.3970.1364595086.2939.python-list@python.org> <95807259-513b-430a-80d1-2db853426159@googlegroups.com>
In-Reply-To <95807259-513b-430a-80d1-2db853426159@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:+7/pwzfzQPJw6Gs7C+rsqkRoZheuDMYMLf2qagF2Q/q OY4qgoUP+Fr1yxHZ7y5EJI6f3hKuVLg8I9wAJpJTqZtyLHYOYv ovVKqmhVl23ridl+7yXN4ww/NEFouixZ6Wwn/KXUpvNwgWDveT gOHU0WE7FFnLXXAIaItW6p1DbGXNfJ/nctoOFz5JoyepRs+ltr nzaYYA4QNd31zYdyG+NBZ0C0KqUVW6m5qD8pUPKysJBMr+sys+ 8Da/u3ZzDJdm2z5mTQBdbnoRz/6ZHMKnPmj/E8Makisiw2Eccl WMDlxkjEjsT589BjnXjsiR/e9UJ+LjinJzjOsiWruCXXXAseA= =
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4007.1364685357.2939.python-list@python.org> (permalink)
Lines 35
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1364685357 news.xs4all.nl 6922 [2001:888:2000:d::a6]:42711
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:42353

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-26 22:44 -0700
  Re: Sudoku Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2013-03-27 08:58 +0100
    Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-27 20:00 -0700
      Re: Sudoku Dave Angel <davea@davea.name> - 2013-03-28 00:36 -0400
        Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-28 15:11 -0700
          Re: Sudoku Dave Angel <davea@davea.name> - 2013-03-28 19:28 -0400
            Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-28 22:07 -0700
            Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-28 22:07 -0700
          Re: Sudoku Chris Angelico <rosuav@gmail.com> - 2013-03-29 09:45 +1100
            Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-29 14:47 -0700
              Re: Sudoku Dave Angel <davea@davea.name> - 2013-03-29 18:11 -0400
                Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-30 15:06 -0700
                Re: Sudoku Dave Angel <davea@davea.name> - 2013-03-30 19:15 -0400
                Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-31 15:03 -0700
                Re: Sudoku Dave Angel <davea@davea.name> - 2013-03-31 18:34 -0400
                Re: Sudoku Arnaud Delobelle <arnodel@gmail.com> - 2013-03-31 23:59 +0100
                Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-31 15:03 -0700
                Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-31 15:27 -0700
                Re: Sudoku Chris Angelico <rosuav@gmail.com> - 2013-04-01 09:35 +1100
                Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-31 20:58 -0700
                Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-31 15:27 -0700
                Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-30 15:06 -0700
            Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-29 14:47 -0700
        Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-28 15:11 -0700
  Re: Sudoku Damien Wyart <damien.wyart@free.fr> - 2013-03-27 09:49 +0100
  Re: Sudoku Dave Angel <davea@davea.name> - 2013-03-27 05:38 -0400
  Re: Sudoku Eric Parry <joan4eric@gmail.com> - 2013-03-27 19:49 -0700

csiph-web