[Zope3-dev] RFC: Updated better interface declaration proposal

Jim Fulton jim@zope.com
Fri, 07 Mar 2003 10:01:05 -0500


Guido van Rossum wrote:
>>>I'm curious, what is Interface.__repr__ used for?
>>
>>It is used to make a cache key for the interface.
> 
> 
> A cache key doesn't have to be a string; adding a specialized function
> to make a cache key might be faster.

Yes. What's there now is only a crude start.  It was needed to overcome
totally unbearable performance.  Using repr was conventient because we need
to compute a cache key for an interface specification, not an interface.
Interface specifications are currently often tuples, so a custom
method wasn;t an option.

We'll redo this completely once we get other issues resolved.

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