goto statement

Discussion in 'Python' started by praba kar, Apr 20, 2005.

  1. praba kar

    praba kar Guest

    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
     
    praba kar, Apr 20, 2005
    #1
    1. Advertising

  2. Michael Hoffman, Apr 20, 2005
    #2
    1. Advertising

  3. praba kar

    Peter Hansen Guest

    praba kar wrote:
    > 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
     
    Peter Hansen, Apr 20, 2005
    #3
  4. On Wed, 20 Apr 2005 10:23:58 +0100 (BST), praba kar
    <> wrote:

    >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

    --
    There is no virtue in believing something that can be proved to be true.
     
    Matt Feinstein, Apr 20, 2005
    #4
  5. praba kar

    Robert Kern Guest

    Matt Feinstein wrote:
    > On Wed, 20 Apr 2005 10:23:58 +0100 (BST), praba kar
    > <> wrote:
    >
    >
    >>Dear All,
    >>
    >> In Python what is equivalent to goto statement

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


    Yes, to 2004-04-01.

    --
    Robert Kern


    "In the fields of hell where the grass grows high
    Are the graves of dreams allowed to die."
    -- Richard Harter
     
    Robert Kern, Apr 20, 2005
    #5
  6. 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)

    --
    Best regards,
    Maxim Kasimov
    mailto:
     
    Maxim Kasimov, Apr 21, 2005
    #6
  7. Maxim Kasimov wrote:

    > 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
     
    Reinhold Birkenfeld, Apr 21, 2005
    #7
  8. Maxim Kasimov <> writes:

    > 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?

    --
    Sergei.
     
    Sergei Organov, Apr 21, 2005
    #8
  9. Sergei Organov wrote:
    > Maxim Kasimov <> writes:
    >
    >
    >>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?
    >


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

    --
    Best regards,
    Maxim Kasimov
    mailto:
     
    Maxim Kasimov, Apr 21, 2005
    #9
  10. Maxim Kasimov <> writes:
    > Sergei Organov wrote:
    > > Maxim Kasimov <> writes:
    > >

    >
    > >>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!

    >
    > 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!

    --
    Sergei.
     
    Sergei Organov, Apr 21, 2005
    #10
  11. praba kar

    John Roth Guest

    "praba kar" <> wrote in message
    news:...
    > Dear All,
    >
    > In Python what is equivalent to goto statement


    Sheesh! It took 20 days for this to get to my mail server!

    John Roth

    >
    > regards,
    > praba
     
    John Roth, Apr 21, 2005
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. youngsun park
    Replies:
    2
    Views:
    633
    David Pursley
    Nov 18, 2003
  2. Skybuck Flying

    VHDL Goto statement ?

    Skybuck Flying, Aug 8, 2005, in forum: VHDL
    Replies:
    9
    Views:
    6,171
    ajahn
    Aug 26, 2005
  3. Skybuck Flying

    Re: VHDL Goto statement ?

    Skybuck Flying, Aug 8, 2005, in forum: VHDL
    Replies:
    0
    Views:
    744
    Skybuck Flying
    Aug 8, 2005
  4. Martin

    the goto statement

    Martin, Apr 20, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    3,314
    Martin
    Apr 21, 2005
  5. Mike42
    Replies:
    21
    Views:
    17,357
    Chris Uppal
    Nov 14, 2005
Loading...

Share This Page