Missing interfaces in Python...

I V wrongbad at gmail.com
Mon Apr 17 17:48:33 EDT 2006


Jonathan Daugherty wrote:
> Except when you need to handle exceptions when those methods don't
> exist.  I think interfaces can definitely be useful.

I think I see what you mean, but that's an odd way to put it.
Typically, you aren't going to handle the exceptions produced by type
errors. Of course, you want some way to test that your code doesn't
have type errors. Static type checking is one way of doing the
requisite testing, unit tests are another, but it's the tests that are
useful, not the interfaces per se. Adding interfaces to python, which
doesn't support static type checking, would be useless IMO.




More information about the Python-list mailing list