PEP 3107 and stronger typing (note: probably a newbie question)

Antoon Pardon apardon at
Fri Jul 13 10:30:24 CEST 2007

On 2007-07-13, Hendrik van Rooyen <mail at> wrote:
> "Donn Cave" <donn at> 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:

    line = fl.readline()
  while st not in line:

Antoon Pardon

More information about the Python-list mailing list