Grant Edwards <[EMAIL PROTECTED]> wrote:
> I forgot to mention try/except. When I do use goto in C
> programming it's almost always to impliment what would have
> been a try/except block in Python.
Yes I'd agree with that. No more 'goto out'.
There is this also
for (i = 0; ...)
{
if (something)
goto found;
}
/* do stuff when not found */
found:;
(yes I hate setting flags in loops ;-)
This translates exactly to the for: else: construct
for i in xrange(...):
if something:
break
else:
# do stuff when not found
The last language I saw with this very useful feature was FORTH in
about 1984!
--
Nick Craig-Wood <[EMAIL PROTECTED]> -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list