[Zope3-dev] Exceptions in interfaces hierarchy?
Guido van Rossum
guido@python.org
Sun, 15 Dec 2002 10:03:21 -0500
> I think that exceptions are a lot more like interfaces than
> they are like implementation. They form part of the API of a system.
>
> I suggest that we move exceptions to the interface hierarchy.
>
> For example, in Zope.App.Security we have a an Exceptions.py, that
> defines a single exception, and a bunch of interfaces files.
> These would be merged into a single interfaces file,
> zope/app/interfaces/security.py.
But what about exceptions that have additional attributes? Then
there's an interface (describing the new attributes) and an
implementation (an __init__ method implementing them, presumably).
--Guido van Rossum (home page: http://www.python.org/~guido/)