Terry Reedy wrote:
Cameron Simpson wrote:

Back at uni we had to implement a small language in our compilers class
and the lecturer had specified a proper generic while loop, thus:

  loop:
    suite
  while invariant
    suite
  endloop

In Python, that is spelled

while True:
  suite
  if not invariant: break
  suite

Indeed. This is the well known "loop and a half" problem.

Eric.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to