On Mon, May 23, 2011 at 6:54 PM, Daniel Stutzbach
<stutzbach@google.com> wrote:
On Fri, May 20, 2011 at 5:03 PM, Eric Snow
<ericsnowcurrently@gmail.com> wrote:
The use case is that I want to be able to validate that a class implements all of the abstract methods of all the classes to which it has been registered.
Interesting. I was motivated in a similar situation to write a validater in the same vein [1]. In fact, working on that is where I got thinking about something like __implements__. The class I wrote would work with registered classes in addition to subclasses, if there were such a mechanism.
-eric
I don't have a programmatic way of discovering that set without asking every class out there.
I agree it would be nice to have a way to ask a class "which ABCs do you implement?" It would be handy for introspection and debugging purposes.
--
Daniel Stutzbach