[Tutor] Use flag to exit?

Richard D. Moores rdmoores at gmail.com
Thu Jun 24 14:27:59 CEST 2010


On Thu, Jun 24, 2010 at 04:55, Eike Welk <eike.welk at gmx.net> wrote:
> On Thursday June 24 2010 12:51:26 Richard D. Moores wrote:
>> On Thu, Jun 24, 2010 at 03:36, Eike Welk <eike.welk at gmx.net> wrote:
>> > On Thursday June 24 2010 12:15:25 Richard D. Moores wrote:

>> Yes! Perfect! Now, Eike, if I only understand what you wrote. You
>> kindly included an appropriate link to the docs, but...
>>
>> How about using sys.exit() instead?
> >From looking at the documentation I think that sys.exit(0) should exit
> cleanly.
>
>
> Looking at my solution now, I think it is too complicated for your relatively
> simple use-case. I think a better solution would be to put the nested for
> loops into a function and use return to exit the computation.
>
> I wrote a new untested version here:
> http://tutoree7.pastebin.com/RL3b2bx6

Of course! Now, without looking at your code, I'll try to do it
myself, and then look.

Thanks very much, Eike.

Dick


More information about the Tutor mailing list