List Question
Bjoern Schliessmann
usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Wed Oct 3 07:51:49 EDT 2007
Pablo Ziliani wrote:
> <joke>
>
> I always use this full-featured, all-inclusive, rock-solid version
> (see the try/except block):
>
> count = i = 0
> x = 1
> y = [1,2,3,4,5,1,2,3,4,1,2,1]
> try:
> while count < 3:
> if y[i] == x:
> count += 1
> i += 1
> except RuntimeError:
> pass
> except IndexError:
> pass
> else:
> print x
>
> </joke>
Wrong, this must be just
except:
pass
Regards&CNRE,
Björn
--
BOFH excuse #141:
disks spinning backwards - toggle the hemisphere jumper.
More information about the Python-list
mailing list