Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'syntax': 0.04; 'overflow': 0.09; 'stack.': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; 'bug': 0.12; 'exit()': 0.16; 'exception': 0.16; 'wrote:': 0.18; 'solution.': 0.20; '>>>': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; '2.x': 0.24; '31,': 0.24; 'either.': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 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; 'received:209.85': 0.35; 'but': 0.35; 'received:google.com': 0.35; "didn't": 0.36; "i'll": 0.36; 'received:209': 0.37; 'sometimes': 0.38; 'others.': 0.38; 'pm,': 0.38; 'does': 0.39; 'changed': 0.39; 'dave': 0.60; 'solve': 0.60; 'march': 0.61; 'first': 0.61; 'such': 0.63; '30,': 0.65; 'statement,': 0.68; 'angel': 0.91; '2013': 0.98 X-Received: by 10.50.6.135 with SMTP id b7mr381718iga.9.1364767427382; Sun, 31 Mar 2013 15:03:47 -0700 (PDT) Newsgroups: comp.lang.python Date: Sun, 31 Mar 2013 15:03:47 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=122.151.72.66; posting-account=JzVE4wkAAADCSo8EXJLK0dGqAu47aMvq References: <9dla2a-kql.ln1@satorlaser.homedns.org> <5ce10a13-be58-4548-85df-e1d865d3304e@googlegroups.com> <17da5afc-7a9b-40ea-a544-6012dfeef3ce@googlegroups.com> <95807259-513b-430a-80d1-2db853426159@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 122.151.72.66 MIME-Version: 1.0 Subject: Re: Sudoku From: Eric Parry To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 74 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364768032 news.xs4all.nl 6907 [2001:888:2000:d::a6]:54323 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42426 On Sunday, March 31, 2013 9:45:36 AM UTC+10:30, Dave Angel wrote: > 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: > > >> > > >>> > > >> > > >> 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 I think in the original it was exit(a). That did not work either. I'll try the others. Eric.