problem with change to exceptions
Paul Rubin
http
Fri Jul 27 19:58:51 EDT 2007
Neal Becker <ndbecker2 at gmail.com> writes:
> should set self.args to None. Nothing wrong there, and what has this got to
> do with NoneType being iterable?
Probably the traceback constructor tried to iterate through the args.
You should initialize the args to an empty tuple, not None. Also
note that there's an arbitrary number of them. So you should probably
write:
class nothing (exceptions.Exception):
def __init__ (self, *args):
self.args = args
You might also want to call Exception.__init__(*args) in the
init func.
More information about the Python-list
mailing list