Noam Raphael wrote:
even in the best solution that I know of,
there's now way to check if a subclass has implemented all the required methods without running it and testing if it works.

I think there are some solutions like PyProtocols, see section 2.2 on this page: http://www.python.org/cgi-bin/moinmoin/MetaClasses


But what you are wanting is used more in statically typed languages. If you want interfaces, abstract classes and virtual methods in a python-like language see boo: http://boo.codehaus.org/
It will catch errors like this at compile-time.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to