Interfaces and Exceptions
Two somewhat related questions:
1) Is there a standard Interface class or module? Is it included with the
python distribution or is it third party?
2) How can I raise an exception and catch it based on the interfaces it
Re: Interfaces and Exceptions
Calvin Spealman <firstname.lastname@example.org> wrote:
> 2) How can I raise an exception and catch it based on the interfaces it
By using Java? :)
Seriously, checked exceptions a la Java were such a bad idea that even
Java people came up with "patterns" to convert them to unchecked
exceptions. C# designers simply discarded checked exceptions from a
start and designed their exception handling based on the Python
exception handling model. (This is mentioned in a Microsoft's paper,
but I don't have the reference off hand.)
So, no need to mix exceptions with interfaces, unless you are a
|All times are GMT. The time now is 09:28 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.