[Zope3-dev] Interface.Implements module still broken for 2.2 metaclasses

Jim Fulton jim@zope.com
Mon, 08 Jul 2002 12:10:12 -0400


Phillip J. Eby wrote:
> At 11:51 AM 7/8/02 -0400, Jim Fulton wrote:
> 
>>Steve Alexander wrote:
>>
>>>Phillip J. Eby wrote:
>>>
>>>
>>..
>>
>>
>>
>>>Ideally, they should, although that still doesn't deal with rolling your 
>>>own metaclass that doesn't derive from a standard class type. I don't 
>>>think there's a particularly elegant way to deal with that, though. yagni.
>>>
>>If you're going to write your own meta class, you could write one that
>>kept it's own dang __implements__ attribute separate from it's instances'.
>>Then you wouldn't even need this awful hack. :)
>>
>>
> 
> I did that, or something like it.  I wrote a metaclass that wraps
> __implements__ and __class_implements__ in a descriptor that returns a
> different value depending on whether it's retrieved from the class, or the
> instance.  Unfortunately, it doesn't help!

That seems odd. What did you do wrong? ;)

If the class check fails, it should just fall back yo getting the
__implements__ attribute.

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (888) 344-4332            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org