Loops Control with Python

2006-10-13 Thread Wijaya Edward
Can we make loops control in Python? What I mean is that whether we can control which loops to exit/skip at the given scope. For example in Perl we can do something like: OUT: foreach my $s1 ( 0 ...100) { IN: foreach my $s2 (@array) { if ($s1 == $s2

Re: Loops Control with Python

2006-10-13 Thread Jon Clements
Wijaya Edward wrote: Can we make loops control in Python? What I mean is that whether we can control which loops to exit/skip at the given scope. For example in Perl we can do something like: OUT: foreach my $s1 ( 0 ...100) { IN: foreach my $s2 (@array) { if ($s1

Re: Loops Control with Python

2006-10-13 Thread Scott David Daniels
Wijaya Edward wrote: Can we make loops control in Python? What I mean is that whether we can control which loops to exit/skip at the given scope. For example in Perl we can do something like: OUT: foreach my $s1 ( 0 ...100) { IN: foreach my $s2 (@array

Re: Loops Control with Python

2006-10-13 Thread Paddy
Wijaya Edward wrote: Can we make loops control in Python? What I mean is that whether we can control which loops to exit/skip at the given scope. For example in Perl we can do something like: OUT: foreach my $s1 ( 0 ...100) { IN: foreach my $s2 (@array) { if ($s1

Re: Loops Control with Python

2006-10-13 Thread hg
Paddy wrote: Wijaya Edward wrote: Can we make loops control in Python? What I mean is that whether we can control which loops to exit/skip at the given scope. For example in Perl we can do something like: OUT: foreach my $s1 ( 0 ...100) { IN: foreach my $s2 (@array

Re: Loops Control with Python

2006-10-13 Thread Paddy
hg wrote: Paddy wrote: P.S. Welcome to Python! How about a thread on GOTOs ? ;-) I'm trying to be nice on c.l.p. - Mind you, I do have that rant as part of my blog: http://paddy3118.blogspot.com/2006/03/whats-wrong-with-perl.html ;-) - Paddy. --

Re: Loops Control with Python

2006-10-13 Thread Steven Bethard
hg wrote: How about a thread on GOTOs ? ;-) A thread? No need! There's a module: http://entrian.com/goto/ ;-) STeVe -- http://mail.python.org/mailman/listinfo/python-list