News for hackers. Stuff that matters.
Re:Tail Recursion by kd5bjo on Thursday December 12, 2019 @05:05AM (#21770675)
Python for loops aren’t actually bounded: if the iterator you’re looping over doesn’t terminate then neither will the loop. It also only calls the iterator’s next() method once per loop, so it’s possible for the body of a loop to affect future iterations by mutating the iterator.
Re:Tail Recursion by klmr on Thursday December 12, 2019 @05:10AM (#21770704)
You’re right, of course. I had completely forgotten that.