Visco Shaun wrote:
Hi all
For an exception defined as below
class OptionError(Exception):
def __init__(self, args):
self.args = args
def __str__(self):
return repr(self.v)
an iteration is happening when the exception is raised
<snip>
What is self.v intended to produce? Perhaps you meant self.args ??
That doesn't explain your error though. I suspect you didn't quote your
code accurately.
The other problem is that args is intended to be a tuple. So you want
to use *args for your formal parameter.
DaveA
--
http://mail.python.org/mailman/listinfo/python-list