[Persistence-sig] "Straw Baby" Persistence API

Phillip J. Eby pje@telecommunity.com
Tue, 23 Jul 2002 10:29:34 -0400


At 10:15 AM 7/23/02 -0400, Jim Fulton wrote:
>Phillip J. Eby wrote:
>>At 03:47 PM 7/22/02 -0400, Jim Fulton wrote:
>>>I think that there should, at least, be a standard cache interface.
>>>It should be possible to develop data managers and caches independently.
>>>Maybe we could include one or two standard implementations. These could
>>>provide useful examples for other implementations and, of course, be
>>>useful in themselves.
>>
>>Sure.  I personally don't think there's much that you can standardize on 
>>in a caching API besides which mapping methods one is required to 
>>support, without getting into policy and use cases.
>
>I expect that you can hide behind the interface.

Huh?


>>It's not that I care one way or the other.  Honestly, I'd rather see 
>>Interface end up in the standard library too - at least once the 
>>metaclass bug is fixed.  :)
>
>Whqat metaclass bug?

You know, the one in Interfaces.Implements, where it doesn't treat 
metaclass instances as classes.  The one you said you were okay with 
fixing, that I provided a patch for, and which Steve Alexander was checking 
to verify that it didn't break anything else in Zope 3...  The one that's 
completely off-topic for this list.  :)



>>>True. But maybe someone will think of a way to solve this without proxies
>>>or alchemy?
>>
>>Unless you're going to fundamentally alter the Python object model, it's 
>>not doable.  Python objects by definition get their behavior from their 
>>type.  To change the behavior, you must either change the type, the type 
>>pointer in the object, or replace the object with another one.
>
>There's been a proposal for adding an observer framework to Python.
>A suitable general observer framework just might allow the problem to be
>solved.

Yes, and any such observer framework is going to have to work via changing 
the type, type pointer, or replacing the object, unless it's going to be by 
altering the fundamental Python object model.  :)