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 actually helps with >

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. > > Dear gods, have I fallen

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 GOTOs should have the invariant t

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 modern BASICs have real subroutines >>that don't all

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 and whistles of Python > >>> in these two examples, or is there something els

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 painful one. > > Indeed. That is alm

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 something else for expressing trivial >>> thin

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 19

Re: "Goto" statement in Python

2017-04-13 Thread Rustom Mody
d or impossible. The most structured was Pascal which set out to be ornery by making one declare labels. With everything else — Fortran-IV, Basic, assembler — it was next to impossible. Cut to 2017 and take a random 20 year old brought up on python/java/ruby/javascript/haskell Where/how would he have

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 th

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: >>> 'goto' would be one easy-to-execute byte-code; no varia

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 about. If implemented properly (with the b

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 (with the byte-code >>compiler using a dedic

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," "goto" makes me uneasy >> about vari

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 only place I use 'goto' in C, and 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: Now I wonder, have we already collected *all* bells and whistles of Python in these tw

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 how

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 considered 'bells and whistles'

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 is very frequent.

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 a

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 Python >>> in these two examples, or is there something else for expressi

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. -- https://mail.python.org/mailman/listinfo/python-list

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 express

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 thin

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 >> thing. > > Functions and exceptions are co

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 have been multi-loo

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. > > Function

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"? -- https://mail.pytho

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; S=' + S) > > try: > message = fin

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 felt the urge to try "

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 "for...else" blocks

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): print i for j in range

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 (50): > print j

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 'break', 'continue' or '

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 'next' in languages like Py

"Goto" statement in Python

2017-04-12 Thread Mikhail V
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 'next' in languages like Python or > C/C++ are goto's with impli

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

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)

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

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

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

Re: goto statement

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

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

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, I

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 e

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 pr

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, an

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

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* -- http://mail.python.org/mailman/listinfo/python-list

Re: goto statement

2005-04-21 Thread Maxim Kasimov
dbye world" This means that you have only two locations to remove the blocked out code. This is identical to having to remove the goto statement and the marker. Hope that helps. how do use this here: print "hello world" ... ... ... sql = ''' some long query ''

Re: goto statement

2005-04-21 Thread pythonUser_07
s means that you have only two locations to remove the blocked out code. This is identical to having to remove the goto statement and the marker. Hope that helps. -- 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 (

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

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

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

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 ha

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

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

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

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

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 Michael Soulier
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 Mike -- Michael P. Soulier <[EMAIL PROTECTED]> h

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 handle

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 wh

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

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 a

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 -- http://mail.pytho

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 r

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 anot

Re: Troll? was: Re: goto statement

2005-04-20 Thread Steve Holden
Maxim Kasimov wrote: André Roberge wrote: Maxim Kasimov wrote: by the way, "goto" statement will be useful for writing more powerful obfuscators Let me get that clear: you want a goto to help with debugging. And you want to obfuscate your code even more? !? Perhaps you need to write i

Re: goto statement

2005-04-20 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Maxim Kasimov <[EMAIL PROTECTED]> wrote: . . . >>> if you need to comment a couple of code (and then uncomment ), what >>> are you doing then? >> >> >> Use comments? >> > >WOW, just greate!

Re: goto statement

2005-04-20 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Maxim Kasimov <[EMAIL PROTECTED]> 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 yo

Re: goto statement

2005-04-20 Thread Robert Kern
Matt Feinstein wrote: On Wed, 20 Apr 2005 10:23:58 +0100 (BST), praba kar <[EMAIL PROTECTED]> 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 [EMAI

Re: goto statement

2005-04-20 Thread Matt Feinstein
On Wed, 20 Apr 2005 10:23:58 +0100 (BST), praba kar <[EMAIL PROTECTED]> 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 beli

Re: Troll? was: Re: goto statement

2005-04-20 Thread Fredrik Lundh
Bill Mill wrote: I believe he meant obfuscating bytecode for a commercial product, to try and avoid decompilation, which is often a desirable function for commercial entities. there is no shortage of "jump" instructions on the bytecode level, so if he wants to obfuscate bytecode, all he has to do

Re: goto statement

2005-04-20 Thread Philippe C. Martin
I guess the point could be "where do you draw the line": you can break and continue in Python, but you cannot goto. Some people, so it seems ;-) , would like to see gotos in Python whereas other think breaks and continues should be excluded ...; Regards, Philippe Steve Holden wrote: > Philipp

Re: goto statement

2005-04-20 Thread Steve Holden
Philippe C. Martin wrote: I do not want to pollute the debate but: -) I remember a software QA managanager responsible for "C" coding rules also not allowing us to use 'break', 'continue', or 'return' (in the middle of a function). And I once worked (back in the 1970's) in a software shop where "

Re: Troll? was: Re: goto statement

2005-04-20 Thread Bill Mill
On 4/20/05, Robert Kern <[EMAIL PROTECTED]> wrote: > Maxim Kasimov wrote: > > André Roberge wrote: > > > >> Maxim Kasimov wrote: > >> > >>> > >>> by the way, "goto" statement will be useful for writing more powerful > &g

Re: Troll? was: Re: goto statement

2005-04-20 Thread Robert Kern
Maxim Kasimov wrote: André Roberge wrote: Maxim Kasimov wrote: by the way, "goto" statement will be useful for writing more powerful obfuscators Let me get that clear: you want a goto to help with debugging. And you want to obfuscate your code even more? !? Perhaps you need to write i

Re: Troll? was: Re: goto statement

2005-04-20 Thread Maxim Kasimov
André Roberge wrote: Maxim Kasimov wrote: by the way, "goto" statement will be useful for writing more powerful obfuscators Let me get that clear: you want a goto to help with debugging. And you want to obfuscate your code even more? !? Perhaps you need to write in Perl, or some oth

Re: goto statement

2005-04-20 Thread Philippe C. Martin
Loop bodies (for break) Grant Edwards wrote: > On 2005-04-20, Philippe C. Martin <[EMAIL PROTECTED]> wrote: > >> Although I find them 'cleaner' than goto, would not use goto, >> and certainly do use 'return' in the middle of functions, I >> also agree that some people might think the former do

Re: goto statement

2005-04-20 Thread Grant Edwards
On 2005-04-20, Philippe C. Martin <[EMAIL PROTECTED]> wrote: > Although I find them 'cleaner' than goto, would not use goto, > and certainly do use 'return' in the middle of functions, I > also agree that some people might think the former do reduce > code readibility - ex: I , somehow, do not fee

Re: goto statement

2005-04-20 Thread Philippe C. Martin
I do not want to pollute the debate but: -) I remember a software QA managanager responsible for "C" coding rules also not allowing us to use 'break', 'continue', or 'return' (in the middle of a function). Although I find them 'cleaner' than goto, would not use goto, and certainly do use 'return

Re: goto statement

2005-04-20 Thread TZOTZIOY
U Unix. I can also send you the output of `man vim' from a >> GNU system. [Simon] >It'll probably be easier to convince Guido to introduce a 'goto' >statement than it would be to learn vi. I just happened to learn vi first before emacs, and this precedence set m

Troll? was: Re: goto statement

2005-04-20 Thread André Roberge
Maxim Kasimov wrote: by the way, "goto" statement will be useful for writing more powerful obfuscators Let me get that clear: you want a goto to help with debugging. And you want to obfuscate your code even more? !? Perhaps you need to write in Perl, or some other similar language.

Re: goto statement

2005-04-20 Thread TZOTZIOY
On Wed, 20 Apr 2005 18:47:37 +0300, rumours say that Maxim Kasimov <[EMAIL PROTECTED]> might have written: >by the way, "goto" statement will be useful for writing more powerful >obfuscators At this point in time you might want to reconsider what are the true reasons y

Re: goto statement

2005-04-20 Thread TZOTZIOY
On Wed, 20 Apr 2005 18:38:40 +0300, rumours say that Maxim Kasimov <[EMAIL PROTECTED]> might have written: >> If you need more help, I would gladly send you the output of `man vi' >> from a non-GNU Unix. I can also send you the output of `man vim' from a >> GNU system. >is it wrong to debug pyth

Re: goto statement

2005-04-20 Thread Peter Hansen
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 tryi

Re: goto statement

2005-04-20 Thread Peter Hansen
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 Then we go right back to Simon Brunning's question for you: "How does goto help y

Re: goto statement

2005-04-20 Thread Maxim Kasimov
by the way, "goto" statement will be useful for writing more powerful obfuscators -- Best regards, Maxim Kasimov mailto: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: goto statement

2005-04-20 Thread Maxim Kasimov
Christos TZOTZIOY Georgiou wrote: 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

Re: goto statement

2005-04-20 Thread Simon Brunning
On 4/20/05, Christos TZOTZIOY Georgiou <[EMAIL PROTECTED]> wrote: > If you need more help, I would gladly send you the output of `man vi' > from a non-GNU Unix. I can also send you the output of `man vim' from a > GNU system. It'll probably be easier to convi

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 o

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

  1   2   >