On Mon, Jul 18, 2005 at 08:40:16AM -0700, Kay Schluehr wrote:
> Hayri ERDENER schrieb:
> > hi,
> > what is the equivalent of C languages' goto  statement in python?
> > best regards
> No, but some of goto's use cases can be covered by unconditional jumps
> provided by exceptions. [...]

I like the "named loops" concept of other HLL like Ada 95 or Java better
than either goto or exceptions. It allows you to use "break" and
"continue" for other than the innermost loops, too:

    break;              => break out of inner loop
    break loop_name;    => break out of named loop "loop_name"

OTOH it's not used *that* often, so I won't argue for including it in
Python ;)

-- Gerhard
Gerhard Häring - [EMAIL PROTECTED] - Python, web & database development

Attachment: signature.asc
Description: Digital signature


Reply via email to