On Fri, Apr 4, 2014 at 2:13 PM, Ethan Furman <et...@stoneleaf.us> wrote: > On 04/03/2014 08:09 PM, Chris Angelico wrote: >> >> On Fri, Apr 4, 2014 at 1:04 PM, MRAB <pyt...@mrabarnett.plus.com> wrote: >>> >>> I thought [continue] went to the end of the loop, but because it's a >>> loop, it >>> just wraps around back to the top... >> >> >> It goes to the bottom of the loop, and then the loop condition may or >> may not send it to the top of the loop. > > > *ahem* > > The loop condition is *at* the top of the loop; if it was at the bottom it > would be a do..until. ;)
Well, if you go by the disassembly, Python does put the condition at the top of the loop. But I've seen plenty of C compilers that invert that - before the top of the loop it jumps down to the bottom, the bottom has the condition, and the condition may or may not jump you up to the top of the loop. Semantics :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list