Jim Fulton wrote at 2006-10-5 08:46 -0400: > ... > I'll note that, as a guiding principle, any refactoring we do > should allow pure-python implementation. This means that APIs > need to be Python APIs, although we should consider efficient > C implementations when designing these APIs.
I would do it as I have done it for "IncrementalSearch2": The primary interface is a C-level interface (for efficiency reasons) but a special base class bridges between C-level and Python-level. In the concrete example, "persitent" would call C-functions and a C-implementation would just provide these C-functions. A special Cache base class, too, would implement the C-level API and redirect to Python level methods. Any Python Cache implementation would derive from this class and override methods as necessary. -- Dieter _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev