Re: "Goto" statement in Python

2017-04-16 Thread Chris Angelico
On Sun, Apr 16, 2017 at 5:21 PM, Mikhail V wrote: > I am in the category "I just want to express some > algorithm and don't want to learn every year new concepts". > I tend to think that extremely restricted syntax, in the sence > of having only few flow control instructions

Re: "Goto" statement in Python

2017-04-16 Thread Mikhail V
On 14 April 2017 at 03:44, Steve D'Aprano wrote: > On Fri, 14 Apr 2017 12:52 am, bartc wrote: > >> I know this isn't the Python need-for-speed thread, but this is a >> classic example where the lack of one simple feature leads to using >> slower, more cumbersome ones.

Re: "Goto" statement in Python

2017-04-14 Thread Rob Gaddi
On 04/14/2017 07:19 AM, Dennis Lee Bieber wrote: On Fri, 14 Apr 2017 11:44:59 +1000, Steve D'Aprano declaimed the following: Even that's not enough for some. Donald Knuth, who supports the use of GOTO under some circumstances, maintains that any program using

Re: "Goto" statement in Python

2017-04-14 Thread Chris Angelico
On Sat, Apr 15, 2017 at 12:13 AM, Dennis Lee Bieber wrote: > On Thu, 13 Apr 2017 18:36:57 -0600, Ian Kelly > declaimed the following: > >> >>Well, you can do it in Assembly. And BASIC, if you count the primitive >>GOSUB-type subroutines, though

Re: "Goto" statement in Python

2017-04-14 Thread Chris Green
Bernd Nawothnig wrote: > On 2017-04-13, Mikhail V wrote: > > On 13 April 2017 at 18:48, Ian Kelly wrote: > >> On Thu, Apr 13, 2017 at 10:23 AM, Mikhail V wrote: > >>> Now I wonder, have we already collected *all* bells

Re: "Goto" statement in Python

2017-04-14 Thread Bernd Nawothnig
On 2017-04-13, Grant Edwards wrote: > On 2017-04-13, Rob Gaddi wrote: > >> No, C doesn't support exception handling. As a result, handling error >> conditions in C is a huge pain for which (forward-only) goto is often, >> while not the only remedy, the least

Re: "Goto" statement in Python

2017-04-14 Thread Bernd Nawothnig
On 2017-04-13, Mikhail V wrote: > On 13 April 2017 at 18:48, Ian Kelly wrote: >> On Thu, Apr 13, 2017 at 10:23 AM, Mikhail V wrote: >>> Now I wonder, have we already collected *all* bells and whistles of Python >>> in these two examples, or is there

Re: "Goto" statement in Python

2017-04-14 Thread bartc
On 14/04/2017 02:44, Steve D'Aprano wrote: On Fri, 14 Apr 2017 12:52 am, bartc wrote: I know this isn't the Python need-for-speed thread, but this is a classic example where the lack of one simple feature leads to using slower, more cumbersome ones. Dear gods, have I fallen back in time to

Re: "Goto" statement in Python

2017-04-13 Thread Rustom Mody
On Friday, April 14, 2017 at 7:15:11 AM UTC+5:30, Steve D'Aprano wrote: > On Fri, 14 Apr 2017 12:52 am, bartc wrote: > > > I know this isn't the Python need-for-speed thread, but this is a > > classic example where the lack of one simple feature leads to using > > slower, more cumbersome ones. >

Re: "Goto" statement in Python

2017-04-13 Thread Steve D'Aprano
On Fri, 14 Apr 2017 12:52 am, bartc wrote: > I know this isn't the Python need-for-speed thread, but this is a > classic example where the lack of one simple feature leads to using > slower, more cumbersome ones. Dear gods, have I fallen back in time to 1975 again? The Goto Wars are over, and

Re: "Goto" statement in Python

2017-04-13 Thread Ian Kelly
On Thu, Apr 13, 2017 at 4:59 PM, bartc wrote: > On 13/04/2017 22:58, Ian Kelly wrote: >> >> On Thu, Apr 13, 2017 at 3:27 PM, Dennis Lee Bieber >> wrote: >>> >>> On Thu, 13 Apr 2017 15:52:24 +0100, bartc declaimed the >>> following: >>>

Re: "Goto" statement in Python

2017-04-13 Thread bartc
On 13/04/2017 22:58, Ian Kelly wrote: On Thu, Apr 13, 2017 at 3:27 PM, Dennis Lee Bieber wrote: On Thu, 13 Apr 2017 15:52:24 +0100, bartc declaimed the following: 'goto' would be one easy-to-execute byte-code; no variables, objects or types to worry

Re: "Goto" statement in Python

2017-04-13 Thread Ian Kelly
On Thu, Apr 13, 2017 at 3:27 PM, Dennis Lee Bieber wrote: > On Thu, 13 Apr 2017 15:52:24 +0100, bartc declaimed the > following: > >>'goto' would be one easy-to-execute byte-code; no variables, objects or >>types to worry about. If implemented properly

Re: "Goto" statement in Python

2017-04-13 Thread Marko Rauhamaa
Rob Gaddi : > On 04/13/2017 08:26 AM, Marko Rauhamaa wrote: >> I have occasionally felt the urge to try "goto" in my C code, but having >> written it, I have taken it out. It just doesn't make the code look more >> elegant or robust. Unlike "break" or "return,"

Re: "Goto" statement in Python

2017-04-13 Thread Grant Edwards
On 2017-04-13, Rob Gaddi wrote: > No, C doesn't support exception handling. As a result, handling error > conditions in C is a huge pain for which (forward-only) goto is often, > while not the only remedy, the least painful one. Indeed. That is almost the

Re: "Goto" statement in Python

2017-04-13 Thread Mikhail V
On 13 April 2017 at 19:38, Ian Kelly wrote: > On Thu, Apr 13, 2017 at 11:25 AM, Mikhail V wrote: >> On 13 April 2017 at 18:48, Ian Kelly wrote: >>> On Thu, Apr 13, 2017 at 10:23 AM, Mikhail V wrote:

Re: "Goto" statement in Python

2017-04-13 Thread Rustom Mody
On Thursday, April 13, 2017 at 11:19:38 PM UTC+5:30, Ian wrote: > On Thu, Apr 13, 2017 at 11:39 AM, Rustom Mody wrote: > > My broader point (vive la Trump) was that if we learn to actively tolerate > > people with views wildly far from ours, the world would be a better place. > > I fail to see

Re: "Goto" statement in Python

2017-04-13 Thread Ian Kelly
On Thu, Apr 13, 2017 at 11:39 AM, Rustom Mody wrote: > My broader point (vive la Trump) was that if we learn to actively tolerate > people with views wildly far from ours, the world would be a better place. I fail to see how my comment "Functions and exceptions are

Re: "Goto" statement in Python

2017-04-13 Thread Rob Gaddi
On 04/13/2017 08:26 AM, Marko Rauhamaa wrote: Chris Angelico : Personally, I can't remember the last time I yearned for "goto" in Python, and the only times I've ever wished for it or used it in other languages have been multi-loop breaks or "for...else" blocks. And neither

Re: "Goto" statement in Python

2017-04-13 Thread Rustom Mody
On Thursday, April 13, 2017 at 10:56:53 PM UTC+5:30, Rob Gaddi wrote: > On 04/13/2017 10:13 AM, Rustom Mody wrote: > > On Thursday, April 13, 2017 at 10:19:33 PM UTC+5:30, Ian wrote: > >> On Thu, Apr 13, 2017 at 10:23 AM, Mikhail V wrote: > >>> Now I wonder, have we already collected *all* bells

Re: "Goto" statement in Python

2017-04-13 Thread Ian Kelly
On Thu, Apr 13, 2017 at 11:25 AM, Mikhail V wrote: > On 13 April 2017 at 18:48, Ian Kelly wrote: >> On Thu, Apr 13, 2017 at 10:23 AM, Mikhail V wrote: >>> Now I wonder, have we already collected *all* bells and whistles of

Re: "Goto" statement in Python

2017-04-13 Thread Ian Kelly
On Thu, Apr 13, 2017 at 11:13 AM, Rustom Mody wrote: > What to do?? > Ask Trump? > [I guess we now need a Godwin 2.0 with :s/Hitler/Trump ] Not even close. Whatever one's opinion may be of Trump, he hasn't murdered millions of people. --

Re: "Goto" statement in Python

2017-04-13 Thread Rob Gaddi
On 04/13/2017 10:13 AM, Rustom Mody wrote: On Thursday, April 13, 2017 at 10:19:33 PM UTC+5:30, Ian wrote: On Thu, Apr 13, 2017 at 10:23 AM, Mikhail V wrote: Now I wonder, have we already collected *all* bells and whistles of Python in these two examples, or is there something else for

Re: "Goto" statement in Python

2017-04-13 Thread Thomas Nyberg
On 04/12/2017 04:42 PM, Mikhail V wrote: > For me it looks clear and I'd say easy to comprehend, > Main critic would be obviously that it is not > a good, *scalable application*, but quite often I don't > even have this in mind, and just want to express a > step-by-step direct instructions. I

Re: "Goto" statement in Python

2017-04-13 Thread Mikhail V
On 13 April 2017 at 18:48, Ian Kelly wrote: > On Thu, Apr 13, 2017 at 10:23 AM, Mikhail V wrote: >> Now I wonder, have we already collected *all* bells and whistles of Python >> in these two examples, or is there something else for expressing trivial

Re: "Goto" statement in Python

2017-04-13 Thread bartc
On 13/04/2017 16:03, Ian Kelly wrote: On Thu, Apr 13, 2017 at 8:52 AM, bartc wrote: On 13/04/2017 15:35, Chris Angelico wrote: Personally, I can't remember the last time I yearned for "goto" in Python, and the only times I've ever wished for it or used it in other languages

Re: "Goto" statement in Python

2017-04-13 Thread Rustom Mody
On Thursday, April 13, 2017 at 10:19:33 PM UTC+5:30, Ian wrote: > On Thu, Apr 13, 2017 at 10:23 AM, Mikhail V wrote: > > Now I wonder, have we already collected *all* bells and whistles of Python > > in these two examples, or is there something else for expressing trivial > > thing. > >

Re: "Goto" statement in Python

2017-04-13 Thread Ian Kelly
On Thu, Apr 13, 2017 at 10:23 AM, Mikhail V wrote: > Now I wonder, have we already collected *all* bells and whistles of Python > in these two examples, or is there something else for expressing trivial > thing. Functions and exceptions are considered "bells and whistles"?

Re: "Goto" statement in Python

2017-04-13 Thread Mikhail V
On 13 April 2017 at 02:17, Rob Gaddi wrote: > > def finder: > for s in S: > if s == 'i': > return 'found on stage 1' > > S = S + ' hello world' > for s in S: > if s == 'd': > return 'found on stage 2' > > raise ValueError('not found;

Re: "Goto" statement in Python

2017-04-13 Thread Marko Rauhamaa
Chris Angelico : > Personally, I can't remember the last time I yearned for "goto" in > Python, and the only times I've ever wished for it or used it in other > languages have been multi-loop breaks or "for...else" blocks. And > neither is very frequent. I have occasionally

Re: "Goto" statement in Python

2017-04-13 Thread Ian Kelly
On Thu, Apr 13, 2017 at 8:52 AM, bartc wrote: > On 13/04/2017 15:35, Chris Angelico wrote: >> Personally, I can't remember the last time I yearned for "goto" in >> Python, and the only times I've ever wished for it or used it in other >> languages have been multi-loop breaks or

Re: "Goto" statement in Python

2017-04-13 Thread bartc
On 13/04/2017 15:35, Chris Angelico wrote: On Thu, Apr 13, 2017 at 9:31 PM, alister wrote: I expect you could simulate most of these with a custom exception for example break from nested loop: class GoTo(Exception): pass try: for i in range(100):

Re: "Goto" statement in Python

2017-04-13 Thread Chris Angelico
On Thu, Apr 13, 2017 at 9:31 PM, alister wrote: > I expect you could simulate most of these with a custom exception > for example break from nested loop: > > class GoTo(Exception): > pass > > try: > for i in range(100): > print i > for j in range

Re: "Goto" statement in Python

2017-04-13 Thread alister
On Thu, 13 Apr 2017 01:42:01 +0200, Mikhail V wrote: > On 12 April 2017 at 02:44, Nathan Ernst wrote: >> goto is a misunderstood and much misaligned creature. It is a very >> useful feature, but like nearly any programming construct can be >> abused. >> >> Constructs like

Re: "Goto" statement in Python

2017-04-12 Thread Rob Gaddi
On 04/12/2017 04:42 PM, Mikhail V wrote: On 12 April 2017 at 02:44, Nathan Ernst wrote: goto is a misunderstood and much misaligned creature. It is a very useful feature, but like nearly any programming construct can be abused. Constructs like 'break', 'continue' or

Re: goto statement

2005-04-28 Thread Mikhail 'Xen' Kashkin
If you use ssh, then you must to learn 'scp'. Or buy books about programming ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: goto statement

2005-04-26 Thread jfouhy
Maxim Kasimov wrote: Maxim Kasimov [EMAIL PROTECTED] writes: WOW, just greate! ... but i'd like to relax at some more interesting way than to comment each of rows but what if i just can't to do this becouse i'm working thrue ssh, and have to use only installed editors (such as vi) A

Re: goto statement

2005-04-26 Thread jfouhy
Tim Daneliuk wrote: OK - Here's some reasoning that may illuminate it. We could, in theory, reduce any language to the minimal Boehm Jacopini control structures (iirc there were only four). In effect, anything beyond these is syntactic sugar. IOW, feel free to use a minimalist Turing

Re: goto statement

2005-04-22 Thread Mike Meyer
Grant Edwards [EMAIL PROTECTED] writes: On 2005-04-21, Roy Smith [EMAIL PROTECTED] wrote: Grant Edwards [EMAIL PROTECTED] wrote: Sure, but what about the case where his program is on paper tape and all he has for an editor is an ice pick? Can't you emulate that in emacs with M-X

Re: goto statement

2005-04-22 Thread Reinhold Birkenfeld
Grant Edwards wrote: On 2005-04-21, Sergei Organov [EMAIL PROTECTED] wrote: Well, I'm writing for embedded realtime systems in C/C++ and have never encountered a single need to use goto. I have encountered situations in C programs where the best thing to use was a goto. Those situations

Re: goto statement

2005-04-22 Thread Reinhold Birkenfeld
Grant Edwards wrote: On 2005-04-21, Sergei Organov [EMAIL PROTECTED] wrote: Grant Edwards [EMAIL PROTECTED] writes: On 2005-04-21, Peter Maas [EMAIL PROTECTED] wrote: Maxim Kasimov schrieb: but what if i just can't to do this becouse i'm working thrue ssh, and have to use only installed

Re: goto statement

2005-04-22 Thread Grant Edwards
On 2005-04-22, Reinhold Birkenfeld [EMAIL PROTECTED] wrote: Sure, but what about the case where his program is on paper tape and all he has for an editor is an ice pick? Then inserting goto doesn't seem to be an acceptable option either ;) Scissors, tape, and a box full of prepunched goto

Re: goto statement

2005-04-22 Thread Peter Hansen
Grant Edwards wrote: Sure, but what about the case where his program is on paper tape and all he has for an editor is an ice pick? Paper tape? Luxury -- http://mail.python.org/mailman/listinfo/python-list

Re: goto statement

2005-04-21 Thread 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

Re: goto statement

2005-04-21 Thread Tim Daneliuk
Reinhold Birkenfeld wrote: John Bokma wrote: Mage wrote: praba kar wrote: Dear All, In Python what is equivalent to goto statement You shouldn't use goto in high-level languages. Nonsense +1 Thank you! Above all your claim is well justified. These brilliant arguments you have put forth really

Re: goto statement

2005-04-21 Thread Reinhold Birkenfeld
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 --

Re: goto statement

2005-04-21 Thread Sergei Organov
Maxim Kasimov [EMAIL PROTECTED] 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

Re: goto statement

2005-04-21 Thread Sergei Organov
Tim Daneliuk [EMAIL PROTECTED] writes: [...] Some HLLs almost have to have it by definition. I cut my teeth as programmer writing for embedded realtime systems in a HLL (PL/M). While you could, in theory, completely avoid 'goto' in a realtime environment, it would make all manner of

Re: goto statement

2005-04-21 Thread Diez B. Roggisch
implement. BTW, all modern systems come complete with 'goto' implemented in *hardware* - they're called interrupts. That's not goto - that is a asynchronous function call - much closer related to multithreading. In an interrupt, you can always jump back to the main program using rte (return

Re: goto statement

2005-04-21 Thread Maxim Kasimov
Sergei Organov wrote: Maxim Kasimov [EMAIL PROTECTED] 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

Re: goto statement

2005-04-21 Thread Grant Edwards
On 2005-04-21, Sergei Organov [EMAIL PROTECTED] wrote: Well, I'm writing for embedded realtime systems in C/C++ and have never encountered a single need to use goto. I have encountered situations in C programs where the best thing to use was a goto. Those situations have always been handled

Re: goto statement

2005-04-21 Thread John Bokma
Do Re Mi chel La Si Do wrote: +1 I am modded up :-D -- John MexIT: http://johnbokma.com/mexit/ personal page: http://johnbokma.com/ Experienced programmer available: http://castleamber.com/ Happy Customers:

Re: goto statement

2005-04-21 Thread John Bokma
Reinhold Birkenfeld wrote: John Bokma wrote: Mage wrote: praba kar wrote: Dear All, In Python what is equivalent to goto statement You shouldn't use goto in high-level languages. Nonsense Thank you! Above all your claim is well justified. You are probably smart enough

Re: goto statement

2005-04-21 Thread Mage
Michael Soulier wrote: On 4/20/05, Maxim Kasimov [EMAIL PROTECTED] wrote: but what if i just can't to do this becouse i'm working thrue ssh, and have to use only installed editors (such as vi) Then learn to use vi. :.,+10s/^/# comment the next 10 lines Or if you don't like

Re: goto statement

2005-04-21 Thread Sergei Organov
Maxim Kasimov [EMAIL PROTECTED] writes: Sergei Organov wrote: Maxim Kasimov [EMAIL PROTECTED] 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

Re: goto statement

2005-04-21 Thread Sergei Organov
Grant Edwards [EMAIL PROTECTED] writes: On 2005-04-21, Sergei Organov [EMAIL PROTECTED] wrote: Well, I'm writing for embedded realtime systems in C/C++ and have never encountered a single need to use goto. I have encountered situations in C programs where the best thing to use was a

Re: goto statement

2005-04-21 Thread Grant Edwards
On 2005-04-21, Sergei Organov [EMAIL PROTECTED] wrote: Grant Edwards [EMAIL PROTECTED] writes: On 2005-04-21, Sergei Organov [EMAIL PROTECTED] wrote: Well, I'm writing for embedded realtime systems in C/C++ and have never encountered a single need to use goto. I have encountered

Re: goto statement

2005-04-21 Thread Sergei Organov
Grant Edwards [EMAIL PROTECTED] writes: On 2005-04-21, Sergei Organov [EMAIL PROTECTED] wrote: Grant Edwards [EMAIL PROTECTED] writes: On 2005-04-21, Sergei Organov [EMAIL PROTECTED] wrote: Well, I'm writing for embedded realtime systems in C/C++ and have never encountered a

Re: goto statement

2005-04-21 Thread Peter Maas
Maxim Kasimov schrieb: but what if i just can't to do this becouse i'm working thrue ssh, and have to use only installed editors (such as vi) - at first line of block enter: ma (mark line as 'a') - go to last line of block - enter :'a,.s/^/###/ (insert 3 comment chars at begin of line, starting

Re: goto statement

2005-04-21 Thread Grant Edwards
On 2005-04-21, Sergei Organov [EMAIL PROTECTED] wrote: Well, I'm writing for embedded realtime systems in C/C++ and have never encountered a single need to use goto. I have encountered situations in C programs where the best thing to use was a goto. Those situations have always been

Re: goto statement

2005-04-21 Thread Grant Edwards
On 2005-04-21, Peter Maas [EMAIL PROTECTED] wrote: Maxim Kasimov schrieb: but what if i just can't to do this becouse i'm working thrue ssh, and have to use only installed editors (such as vi) - at first line of block enter: ma (mark line as 'a') - go to last line of block - enter

Re: goto statement

2005-04-21 Thread Roy Smith
Grant Edwards [EMAIL PROTECTED] wrote: Sure, but what about the case where his program is on paper tape and all he has for an editor is an ice pick? Can't you emulate that in emacs with M-X inclusive-or-overwrite-mode? -- http://mail.python.org/mailman/listinfo/python-list

Re: goto statement

2005-04-21 Thread Sergei Organov
Grant Edwards [EMAIL PROTECTED] writes: On 2005-04-21, Peter Maas [EMAIL PROTECTED] wrote: Maxim Kasimov schrieb: but what if i just can't to do this becouse i'm working thrue ssh, and have to use only installed editors (such as vi) - at first line of block enter: ma (mark line as

Re: goto statement

2005-04-21 Thread pythonUser_07
Hi, Have you tried the triple quote comment technique? I am assuming you want to skip some code for the time being. Here is an example print hello world ''' COMMENT OUT FOR NOW someFunction() someOtherFunction() ''' print goodbye world This means that you have only two locations to remove the

Re: goto statement

2005-04-21 Thread Maxim Kasimov
pythonUser_07 wrote: Hi, Have you tried the triple quote comment technique? I am assuming you want to skip some code for the time being. Here is an example print hello world ''' COMMENT OUT FOR NOW someFunction() someOtherFunction() ''' print goodbye world This means that you have only two

Re: goto statement

2005-04-21 Thread Fredrik Lundh
Maxim Kasimov wrote: how do use this here: are you still claiming you're not a troll? *plonk* /F -- http://mail.python.org/mailman/listinfo/python-list

Re: goto statement

2005-04-21 Thread Mage
Maxim Kasimov wrote: how do use this here: print hello world There are cases when you can't do it in any language. php: /* this is a debug comment function1(); function2(); /* this is a normal multiline comment block it ends here */ function3(); */ end of debug comment / if

Re: goto statement

2005-04-21 Thread R. C. James Harlow
On Thursday 21 April 2005 17:42, Maxim Kasimov wrote: Have you tried the triple quote comment technique? how do use this here: Simple. sql = ''' some long query ''' Change this to: sql = some long query since you shouldn't be using multiple quoting styles in one module, any more

Re: goto statement

2005-04-21 Thread Grant Edwards
On 2005-04-21, Roy Smith [EMAIL PROTECTED] wrote: Grant Edwards [EMAIL PROTECTED] wrote: Sure, but what about the case where his program is on paper tape and all he has for an editor is an ice pick? Can't you emulate that in emacs with M-X inclusive-or-overwrite-mode? Heck, emacs probably has

Re: goto statement

2005-04-21 Thread Grant Edwards
On 2005-04-21, Sergei Organov [EMAIL PROTECTED] wrote: Grant Edwards [EMAIL PROTECTED] writes: On 2005-04-21, Peter Maas [EMAIL PROTECTED] wrote: Maxim Kasimov schrieb: but what if i just can't to do this becouse i'm working thrue ssh, and have to use only installed editors (such as vi)

Re: goto statement

2005-04-21 Thread Ivan Van Laningham
Hi All-- Fredrik Lundh wrote: Maxim Kasimov wrote: how do use this here: are you still claiming you're not a troll? *plonk* Oh, I don't think he's a troll, but his license to use Python should be revoked. I think RPG would be a good language for him, don't you? Metta, Ivan

Re: goto statement

2005-04-21 Thread Ron
Grant Edwards wrote: On 2005-04-21, Sergei Organov [EMAIL PROTECTED] wrote: Well, I'm writing for embedded realtime systems in C/C++ and have never encountered a single need to use goto. I have encountered situations in C programs where the best thing to use was a goto. Those situations have

Re: goto statement

2005-04-21 Thread John Roth
praba kar [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 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 -- http://mail.python.org/mailman/listinfo/python-list

Re: goto statement

2005-04-20 Thread Mage
praba kar wrote: Dear All, In Python what is equivalent to goto statement You shouldn't use goto in high-level languages. Mage -- http://mail.python.org/mailman/listinfo/python-list

Re: goto statement

2005-04-20 Thread Simon Brunning
On 4/20/05, praba kar [EMAIL PROTECTED] wrote: In Python what is equivalent to goto statement http://docs.python.org/tut/node6.html See, it's those dratted node numbers again. ;-) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: goto statement

2005-04-20 Thread Maurice Caret
Simon Brunning a écrit : On 4/20/05, praba kar [EMAIL PROTECTED] wrote: In Python what is equivalent to goto statement http://docs.python.org/tut/node6.html See, it's those dratted node numbers again. ;-) other equivalents are in http://docs.python.org/tut/node10.html --

Re: goto statement

2005-04-20 Thread Simon Brunning
On 4/20/05, Maurice Caret [EMAIL PROTECTED] wrote: other equivalents are in http://docs.python.org/tut/node10.html I also missed http://docs.python.org/tut/node5.html#SECTION00520, for the while statement. Those URLs just keeg getting better... -- Cheers, Simon B, [EMAIL

Re: goto statement

2005-04-20 Thread Maxim Kasimov
Mage wrote: praba kar wrote: Dear All, In Python what is equivalent to goto statement You shouldn't use goto in high-level languages. it would be quite useful for debuging porposes -- Best regards, Maxim Kasimov mailto: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: goto statement

2005-04-20 Thread Simon Brunning
On 4/20/05, Maxim Kasimov [EMAIL PROTECTED] wrote: it would be quite useful for debuging porposes How does goto help you to remove bugs? I can certainly see how it helps you put them in in the first place... -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: goto statement

2005-04-20 Thread John Bokma
Mage wrote: praba kar wrote: Dear All, In Python what is equivalent to goto statement You shouldn't use goto in high-level languages. Nonsense -- John MexIT: http://johnbokma.com/mexit/ personal page:

Re: goto statement

2005-04-20 Thread Reinhold Birkenfeld
John Bokma wrote: Mage wrote: praba kar wrote: Dear All, In Python what is equivalent to goto statement You shouldn't use goto in high-level languages. Nonsense Thank you! Above all your claim is well justified. These brilliant arguments you have put forth really explain in a

Re: goto statement

2005-04-20 Thread Maxim Kasimov
Simon Brunning wrote: On 4/20/05, Maxim Kasimov [EMAIL PROTECTED] wrote: it would be quite useful for debuging porposes How does goto help you to remove bugs? I can certainly see how it helps you put them in in the first place... if you need to comment a couple of code (and then uncomment ), what

Re: goto statement

2005-04-20 Thread Robert Kern
Maxim Kasimov wrote: Simon Brunning wrote: On 4/20/05, Maxim Kasimov [EMAIL PROTECTED] wrote: it would be quite useful for debuging porposes How does goto help you to remove bugs? I can certainly see how it helps you put them in in the first place... if you need to comment a couple of code (and

Re: goto statement

2005-04-20 Thread Maxim Kasimov
Robert Kern wrote: Maxim Kasimov wrote: Simon Brunning wrote: On 4/20/05, Maxim Kasimov [EMAIL PROTECTED] wrote: it would be quite useful for debuging porposes How does goto help you to remove bugs? I can certainly see how it helps you put them in in the first place... if you need to comment a

Re: goto statement

2005-04-20 Thread Reinhold Birkenfeld
Maxim Kasimov wrote: Robert Kern wrote: Maxim Kasimov wrote: Simon Brunning wrote: On 4/20/05, Maxim Kasimov [EMAIL PROTECTED] wrote: it would be quite useful for debuging porposes How does goto help you to remove bugs? I can certainly see how it helps you put them in in the first

Re: goto statement

2005-04-20 Thread Mage
Maxim Kasimov wrote: WOW, just greate! ... but i'd like to relax at some more interesting way than to comment each of rows There are editors that can comment and uncomment blocks. In worst case you can use to comment blocks (not elegant but works). Mage --

RE: goto statement

2005-04-20 Thread Sander Steffann
On 4/20/05, praba kar [EMAIL PROTECTED] wrote: In Python what is equivalent to goto statement An old user-friendly cartoon that might be relevant: http://ars.userfriendly.org/cartoons/?id=2506 Have fun :-) Sander -- http://mail.python.org/mailman/listinfo/python-list

Re: goto statement

2005-04-20 Thread Simon Brunning
On 4/20/05, Maxim Kasimov [EMAIL PROTECTED] wrote: WOW, just greate! ... but i'd like to relax at some more interesting way than to comment each of rows Get a decent text editor. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: goto statement

2005-04-20 Thread Do Re Mi chel La Si Do
+1 Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: goto statement

2005-04-20 Thread Torsten Bronger
Hallchen! Maxim Kasimov [EMAIL PROTECTED] writes: [...] WOW, just greate! ... but i'd like to relax at some more interesting way than to comment each of rows Then just use a good editor. Tsch, Torsten. -- Torsten Bronger, aquisgrana, europa vetus --

Re: goto statement

2005-04-20 Thread Michael Hoffman
praba kar wrote: In Python what is equivalent to goto statement http://groups-beta.google.com/group/comp.lang.python/msg/98264a0daa007c46 -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: goto statement

2005-04-20 Thread Maxim Kasimov
Use multi-line string literals. ''' it will not help if there is another ''' or/and inside of code block This whole 'code' is commented out, and you can use every type of quote except three singles. ''' Or, if you really like the spirit of goto, use if 0:. ... and add tabs to each string Reinhold

Re: goto statement

2005-04-20 Thread Maxim Kasimov
Torsten Bronger wrote: Hallchen! Maxim Kasimov [EMAIL PROTECTED] writes: [...] WOW, just greate! ... but i'd like to relax at some more interesting way than to comment each of rows but what if i just can't to do this becouse i'm working thrue ssh, and have to use only installed editors (such as

Re: goto statement

2005-04-20 Thread Simon Brunning
On 4/20/05, Maxim Kasimov [EMAIL PROTECTED] wrote: Or, if you really like the spirit of goto, use if 0:. ... and add tabs to each string Get a decent text editor. What are you using? Notepad? -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: goto statement

2005-04-20 Thread Peter Hansen
Maxim Kasimov wrote: Torsten Bronger wrote: Hallchen! Maxim Kasimov [EMAIL PROTECTED] writes: WOW, just greate! ... but i'd like to relax at some more interesting way than to comment each of rows but what if i just can't to do this becouse i'm working thrue ssh, and have to use only installed

Re: goto statement

2005-04-20 Thread Maxim Kasimov
Peter Hansen wrote: Maxim Kasimov wrote: Torsten Bronger wrote: Hallchen! Maxim Kasimov [EMAIL PROTECTED] writes: WOW, just greate! ... but i'd like to relax at some more interesting way than to comment each of rows but what if i just can't to do this becouse i'm working thrue ssh, and have to

Re: goto statement

2005-04-20 Thread Reinhold Birkenfeld
Maxim Kasimov wrote: Use multi-line string literals. ''' it will not help if there is another ''' or/and inside of code block Yes, but how often do you use them? And aren't you consistent in the choice of your quotes? This whole 'code' is commented out, and you can use every type of

Re: goto statement

2005-04-20 Thread Reinhold Birkenfeld
Maxim Kasimov wrote: f..., i don't requesting that goto was available in next versions of python, but i'm saying if it will be so, it will be easy and quickly _debug_ some skripts, _not only_ for commenting If you want, you can always use the goto module. Reinhold, no, I will

Re: goto statement

2005-04-20 Thread TZOTZIOY
On Wed, 20 Apr 2005 14:58:35 +0300, rumours say that Maxim Kasimov [EMAIL PROTECTED] might have written: if you need to comment a couple of code (and then uncomment ), what are you doing then? Use comments? WOW, just greate! ... but i'd like to relax at some more interesting way than to

Re: goto statement

2005-04-20 Thread TZOTZIOY
On Wed, 20 Apr 2005 16:13:32 +0300, rumours say that Maxim Kasimov [EMAIL PROTECTED] might have written: but what if i just can't to do this becouse i'm working thrue ssh, and have to use only installed editors (such as vi) If you use plain vi (not vim) and you want to comment e.g. 5 lines of

  1   2   >