On 2007-07-13, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
> "Donn Cave" <[EMAIL PROTECTED]> wrote:
>
>>In its day, goto was of course very well loved.
>
> Does anybody know for sure if it is in fact possible to
> design a language completely free from conditional jumps?
I think you have to be more clear on what you mean. I would consider a
while loop as a conditional jump but I have the impression you don't.
Is that correct?
> At the lower level, I don't think you can get away with
> conditional calls - hence the "jumps with dark glasses",
> continue and break.
Would you consider raise as belonging in this collection?
> I don't think you can get that functionality in another way.
>
> Think of solving the problem of reading a text file to find
> the first occurrence of some given string - can it be done
> without either break or continue? (given that you have to
> stop when you have found it)
It depend on what the language offers. Should PEP 325 be implemented the
code would look something like:
do:
line = fl.readline()
while st not in line:
pass
--
Antoon Pardon
--
http://mail.python.org/mailman/listinfo/python-list