Ben Finney wrote:
> Ben Finney <[EMAIL PROTECTED]> wrote:
>
>>I want my modules to (sometimes) define an abstract base exception
>>class, that all other exceptions in that module inherit from.
>
>
> [re-posting with the implementation properly foo-ified]
Isn't the proper Python idiom to use Mon
Ben Finney <[EMAIL PROTECTED]> wrote:
> I want my modules to (sometimes) define an abstract base exception
> class, that all other exceptions in that module inherit from.
[re-posting with the implementation properly foo-ified]
Not a whole lot of feedback on this, so here's the implementation I
de
Ben Finney <[EMAIL PROTECTED]> wrote:
> I want my modules to (sometimes) define an abstract base exception
> class, that all other exceptions in that module inherit from.
Not a whole lot of feedback on this, so here's the implementation I
decided upon.
class FooException(Exception):
"
Ben Finney wrote:
> Howdy all,
>
> Okay, so Guido doesn't like Abstract Base Classes[0], and interfaces
> are the way of the future[1]. But they're not here now, and I
> understand ABCs better.
This is a very interesting discussion - not all of it understandable to me.
Are interfaces really in ou
Mike Meyer <[EMAIL PROTECTED]> wrote:
> class FooException(Exception):
> def __init__(self):
> if self.__class__ == FooException:
> raise NotImplementedError,
>"FooException is an abstract class for exceptions"
Shall try this when I get the chance.
Ben Finney <[EMAIL PROTECTED]> writes:
> I've tried doing this in the __init__():
>
> class FooException(Exception):
> """ Base class for all FooModule exceptions """
> def __init__(self):
> raise NotImplementedError, \
> "%s is an abstract class for