halgari/clojure-py — pull request #167 by exupero (2012-12-10 01:20:46+00:00)
Title: ABCMeta for interfaces

Currently class interfaces are implemented with `AbstractMethodCall` exceptions and multiple inheritance. This strategy only catches classes that don't fully implement their interfaces when someone stumbles onto a method that hasn't been implemented. Python's abstract base classes support catching classes that don't fully implement an interface when the classes are defined.

These changes only modify a couple of interface classes to use `ABCMeta` and the `abstractmethod` decorator, but following the pattern for other interface classes should be relatively straight-forward. (In the process of implementing the interfaces, I found several definitions that didn't implement all their abstract methods and took a stab at rectifying it. Fixes and improvements are welcome.)