goto statement

P

praba kar

Dear All,

In Python what is equivalent to goto statement

regards,
praba

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 
P

Peter Hansen

praba said:
In Python what is equivalent to goto statement

The group has been remiss, starting mainly with Mage's
unfortunately dogmatic response.

What we meant to ask was this: why do you want it?

There are better, simpler, cleaner, more readable
ways to accomplish what you are trying to do, if you'll
only tell us what that is so we can show you.

-Peter
 
M

Matt Feinstein

Dear All,

In Python what is equivalent to goto statement

I'd like to that implemented in an interpreted language. Requires some
time travel.

Matt Feinstein
 
R

Robert Kern

Matt said:
I'd like to that implemented in an interpreted language. Requires some
time travel.

Yes, to 2004-04-01.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
M

Maxim Kasimov

1. comment for debug

It can be used in the same way, as the comments for debugging are used, but it will be easier than to use """ or ''', or using features of text-editors,
when it is necessary to comment piece of code which already contains ''' or/and """ strings already, or there is another #-comments.
Using goto, you do not need to edit a code, which is unfamiliar to you.

2. obfuscators

goto can be used in the same way, as many of java-obfuscators do


Speaking in other words:
1) goto exempts from necessity to install new software (it is critical for remote working, for example, installing X11 may be impossible at all)
2) enables to make new, better software (better obfuscators)
 
R

Reinhold Birkenfeld

Maxim said:
1) goto exempts from necessity to install new software
(it is critical for remote working, for example, installing X11 may be
impossible at all)

Attributing the need for a language feature to restrictions of your ambience
is hilarious.

Reinhold
 
S

Sergei Organov

Maxim Kasimov said:
1. comment for debug

It can be used in the same way, as the comments for debugging are
used, but it will be easier than to use """ or ''', or using
features of text-editors, when it is necessary to comment piece of
code which already contains ''' or/and """ strings already, or
there is another #-comments. Using goto, you do not need to edit a
code, which is unfamiliar to you.

.... and then you end up with situation when another goto jumps directly
into the body of the code you've just "commented" with your goto. Happy
debugging!

BTW, don't you want "comefrom" statement to be added to the language
to make debugging even more fun?
 
M

Maxim Kasimov

Sergei said:
.... and then you end up with situation when another goto jumps directly
into the body of the code you've just "commented" with your goto. Happy
debugging!

BTW, don't you want "comefrom" statement to be added to the language
to make debugging even more fun?

if you can't control what you do - it is you private problem, not mine. Is't it?
 
S

Sergei Organov

Maxim Kasimov said:
if you can't control what you do - it is you private problem, not mine. Is't
it?

Hopefully I do control what I do. However, wasn't it you who spoke about
"code, which is unfamiliar"? Obviously you advocate using goto to
comment out a code that has been written by somebody else. I don't see
any way for you or me to control what those "somebody" did with goto
provided that goto is there in the language, sorry.

Overall, using goto for commenting something out is not any better than
""" or ''', as the code to be commented out could contain labels and you
will need to find and comment out all the goto that jump to these labels
as well. Happy debugging!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top