Mar-01-2021, 08:06 AM
Skaperen Wrote:now you're having me wonder what i can put in place of pass in your example.For example
>>> class Exc(RuntimeError): ... def __init__(self, *args, **kwargs): ... super().__init__(*args) ... self.__dict__.update(kwargs) ... >>> e = Exc('foo happened', length=25) >>> >>> e Exc('foo happened',) >>> e.length 25