Vikram wrote:
I can't use 'break' or 'continue' in a class method, nor can I return a
boolean value from __init__() to check for errors within the for-loop.
How would I be able to stop the current iteration and continue with the
next after reporting an error?
maybe i don't fully understand your qn but why don't you let __init__ of
your class raise an exception and then catch it in the outer for loop and
continue. something like:
for i in ...
try:
foo()
except:
except (ValueError, TypeError), error:
continue
Use something like the above, (always expect certain kinds of errors)
lest you accidentally capture an real attempt to stop the program
such as the exception a Control-C causes.
-Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list