goto

Terry Hancock hancock at anansispaceworks.com
Tue Jul 19 21:27:33 EDT 2005


On Monday 18 July 2005 06:48 am, Hayri ERDENER wrote:
> hi,
> what is the equivalent of C languages' goto  statement in python?
> best regards

For the only valid uses of C's "goto", you should use the "try-except"
or the "for/while-break-else" idioms.  See the "language reference" for
details on these statement blocks.

If you're using "goto" for anything these blocks aren't appropriate for,
then you should probably read the advice in the other replies. ;-)

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com




More information about the Python-list mailing list