goto statement

Sergei Organov osv at javad.ru
Thu Apr 21 10:50:15 EDT 2005


Maxim Kasimov <kasimov at i.com.ua> writes:
> Sergei Organov wrote:
> > Maxim Kasimov <kasimov at i.com.ua> 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.



More information about the Python-list mailing list