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
What is self.v intended to produce?
Visco Shaun wrote:
> Hi all
>
> For an exception defined as below
>
> class OptionError(Exception):
> def __init__(self, args):
> self.args = args
This should read:
def __init__(self, *args):
self.args = args
(notice the * !)
self.args holds the constructor argument tu
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
Meanwhile for almost the same structured exception replacing th