Georg Brandl wrote:
> Hm, I always found it useful to just do
> 
> class MyCustomError(Exception):
>      pass
> 
> and give it arbitrary arguments to it without writing __init__
> method stuff that I can access from outside.

Maybe

   class Exception(object):

     def __init__(self, msg = None, **kwds):
       self.msg = msg
       self.__dict__.update(kwds)

Then you'd have to pass your extra args as keyword args,
but you could still avoid having an __init__ if you wanted.

--
Greg
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to