[Zope3-dev] "common" or "basic" interface types?

Tim Peters tim@zope.com
Thu, 13 Mar 2003 22:42:35 -0500


[Mike C. Fletcher]
> ...
> I've got enough at the moment to cover the base operations of:
>     string, unicode, list, tuple, and dictionary
> still lots more to go.

Mike, take a peek at interfaces.py in src/zodb/btree.  In fact the
interfaces there appear to be implemented only by ZODB's BTree-based data
structures, but it looks like substantial effort went into trying to make
them applicable to sequences and mappings in general.  Then again, there's
sometimes *some* oddball method mandated that cuts off the possibility of
realistic reuse (like IDictionaryIsh specifies a byValue method that
probably won't be implemented by anything other than a BTree with integer
values used specifically for mapping documents to integer search-relevance
scores).  "Keep it simple" probably helps <wink>.