Re: An endless loop

2017-10-16 Thread bartc
On 16/10/2017 18:53, Stefan Ram wrote: Ian Kelly writes: I honestly can't remember the last time I programmed an endless loop, and I also can't remember the last time I used a while loop. Those two things are probably related. My Python installation has a "Lib" directory. »^ +\bwhile\b

Re: An endless loop

2017-10-16 Thread Ian Kelly
On Sat, Oct 14, 2017 at 8:10 PM, Stefan Ram wrote: > I made an error I made a thousand times before. > > I had programmed an endless loop. > > But never did I see before so clear why it's called > an endless loop. (Tested in IDLE.) > > from turtle import * > > reset(); reset(); shape( 'tur

Re: An endless loop

2017-10-15 Thread Steve D'Aprano
On Mon, 16 Oct 2017 01:38 am, Ned Batchelder wrote: > We've covered this before.  A challenge for the group: let's not create > yet another 100-reply thread rehashing the design of Python looping... > Please? :) Certainly! So... who thinks that Python should implement tail recursion optimization

Re: An endless loop

2017-10-15 Thread Ned Batchelder
On 10/15/17 9:59 AM, bartc wrote: On 15/10/2017 12:20, Chris Angelico wrote: On Sun, Oct 15, 2017 at 9:15 PM, bartc wrote: I assume you're talking about the while-loop (because on my machine, it hangs just using 'from turtle...' or 'import turtle'). (Machine was screwed up I think, as I ha

Re: An endless loop

2017-10-15 Thread bartc
On 15/10/2017 12:20, Chris Angelico wrote: On Sun, Oct 15, 2017 at 9:15 PM, bartc wrote: I assume you're talking about the while-loop (because on my machine, it hangs just using 'from turtle...' or 'import turtle'). (Machine was screwed up I think, as I had to restart it shortly after for

Re: An endless loop

2017-10-15 Thread Chris Angelico
On Sun, Oct 15, 2017 at 9:15 PM, bartc wrote: > On 15/10/2017 03:10, Stefan Ram wrote: >> >>I made an error I made a thousand times before. >> >>I had programmed an endless loop. >> >>But never did I see before so clear why it's called >>an endless loop. (Tested in IDLE.) >> >> fro

Re: An endless loop

2017-10-15 Thread Peter J. Holzer
On 2017-10-15 10:15, bartc wrote: > On 15/10/2017 03:10, Stefan Ram wrote: >>I made an error I made a thousand times before. >> >>I had programmed an endless loop. >> >>But never did I see before so clear why it's called >>an endless loop. (Tested in IDLE.) >> >> from turtle imp

Re: An endless loop

2017-10-15 Thread bartc
On 15/10/2017 03:10, Stefan Ram wrote: I made an error I made a thousand times before. I had programmed an endless loop. But never did I see before so clear why it's called an endless loop. (Tested in IDLE.) from turtle import * reset(); reset(); shape( 'turtle' ); showturtle() d

Re: An endless loop

2017-10-14 Thread Steve D'Aprano
On Sun, 15 Oct 2017 01:43 pm, Dennis Lee Bieber wrote: > On 15 Oct 2017 02:10:15 GMT, r...@zedat.fu-berlin.de (Stefan Ram) declaimed > the following: [...] >>def poly( n, length ): >>i = 0 >>while i < n: >>forward( length ) >>left( 360/n ) >> > > A clear example of why a p