Re: replacing built-in exception types

2007-12-11 Thread Nishkar Grover
subclass of my subclass of EnvironmentError. The only thing left to do is find a way to replace the built-in exception types with my custom ones. - Nishkar Calvin Spealman wrote: > > Why would you do this? How to do it, if its even possible, is far less > important than if you should

replacing built-in exception types

2007-12-11 Thread Nishkar Grover
I'm trying to replace a built-in exception type and here's a simplified example of what I was hoping to do... >>> >>> import exceptions, __builtin__ >>> >>> zeroDivisionError = exceptions.ZeroDivisionError >>> >>> class Foo(zeroDivisionError): ... bar = 'bar' ... >>> >>> exceptions.Z