| Store | Cart

Working around a lack of 'goto' in python

From: Donn Cave <d...@u.washington.edu>
Mon, 08 Mar 2004 14:46:49 -0800
In article <nf2vh1-juf.ln1 at home.rogerbinns.com>,
 "Roger Binns" <rogerb at rogerbinns.com> wrote:
...
> Just like multiple-inheritance, this may be of no use to you or> a construct you feel is too dangerous for your code.  That doesn't> mean it should be prevented from others using it.> > Several pieces of my code would greatly benefit from break/continue> of multiple depths.  They currently use extra variables and exceptions> and have had a tendency to be somewhat buggy due to the extra complexity> and the mismatch between my mental model and what the language allows.

I believe you'd be able to get the same benefit from goto -
nearly identical solution, really.  Of course it can be used
a lot of other ways, but you couldn't really argue that's a
bad thing, given your position stated above.  I mean, either
Python should incorporate all features that someone finds
useful, and leave taste and judgement to the user, or it
shouldn't.  So it seems like goto is the ticket, following
your line of reasoning.

   Donn Cave, donn at u.washington.edu

Recent Messages in this Thread
Brett Mar 06, 2004 06:18 pm
Andrew Koenig Mar 06, 2004 06:30 pm
Carmine Noviello Mar 06, 2004 06:41 pm
Jeff Schwaber Mar 06, 2004 06:41 pm
Peter Otten Mar 06, 2004 06:48 pm
Rene Pijlman Mar 06, 2004 06:49 pm
Christian Tismer Mar 06, 2004 08:50 pm
Roy Smith Mar 06, 2004 09:16 pm
Stephen Horne Mar 08, 2004 05:01 am
Dan Bishop Mar 06, 2004 11:23 pm
David M. Cooke Mar 07, 2004 08:49 am
Stephen Horne Mar 07, 2004 06:35 pm
Roy Smith Mar 07, 2004 06:54 pm
Stephen Horne Mar 07, 2004 07:57 pm
Roy Smith Mar 07, 2004 08:49 pm
Stephen Horne Mar 08, 2004 02:54 am
benjamin schollnick Mar 08, 2004 03:38 am
Stephen Horne Mar 08, 2004 05:10 am
Roger Binns Mar 07, 2004 10:33 pm
Roy Smith Mar 08, 2004 02:11 am
Roger Binns Mar 08, 2004 05:09 am
Georgy Mar 08, 2004 09:09 am
Jeff Epler Mar 08, 2004 02:50 pm
Mel Wilson Mar 08, 2004 03:43 pm
Roger Binns Mar 08, 2004 08:43 pm
Donn Cave Mar 08, 2004 10:46 pm
Roger Binns Mar 09, 2004 12:11 am
Stephen Horne Mar 08, 2004 03:30 am
Stephen Horne Mar 08, 2004 05:29 am
Y2KYZFR1 Mar 08, 2004 04:41 pm
Lou Pecora Mar 08, 2004 04:59 pm
Y2KYZFR1 Mar 09, 2004 04:36 pm
Joe Mason Mar 09, 2004 04:57 pm
Roy Smith Mar 09, 2004 05:25 pm
Joe Mason Mar 09, 2004 06:53 pm
Roy Smith Mar 09, 2004 09:05 pm
Roger Binns Mar 10, 2004 04:23 am
Roy Smith Mar 10, 2004 01:52 pm
Isaac To Mar 10, 2004 05:36 am
Jeff Epler Mar 10, 2004 01:05 pm
Isaac To Mar 10, 2004 03:58 pm
gabor Mar 10, 2004 04:34 pm
Donn Cave Mar 10, 2004 05:49 pm
Stephen Horne Mar 11, 2004 03:02 am
Jacek Generowicz Mar 11, 2004 11:40 am
Stephen Horne Mar 11, 2004 02:50 pm
Stephen Horne Mar 09, 2004 09:43 pm
Roy Smith Mar 09, 2004 09:55 pm
Stephen Horne Mar 10, 2004 12:41 am
Isaac To Mar 10, 2004 05:16 am
Christopher A. Craig Mar 08, 2004 07:54 pm
leeg Mar 09, 2004 01:34 am
Stephen Horne Mar 09, 2004 09:52 pm
leeg Mar 10, 2004 02:46 pm
Stephen Horne Mar 10, 2004 04:58 pm
Roger Binns Mar 10, 2004 06:14 pm
David MacQuigg Mar 09, 2004 11:26 pm
Anton Vredegoor Mar 10, 2004 10:11 am
Messages in this thread