[Zope-Checkins] CVS: Zope2 - Interfaces.py:1.5.30.1 __init__.py:1.2.36.1

Michel Pelletier michel@digicool.com
Thu, 17 May 2001 12:06:20 -0400 (EDT)


Update of /cvs-repository/Zope2/lib/python/BTrees
In directory korak.digicool.com:/tmp/cvs-serv10428

Modified Files:
      Tag: APIDocs-branch
	Interfaces.py __init__.py 
Log Message:
new btrees help stuff


--- Updated File Interfaces.py in package Zope2 --
--- Interfaces.py	2001/03/15 13:16:22	1.5
+++ Interfaces.py	2001/05/17 16:06:19	1.5.30.1
@@ -83,9 +83,9 @@
 # 
 ##############################################################################
 
-import OOBTree, Interface
+import Interface
 
-class ICollection(Interface.Base):
+class Collection(Interface.Base):
 
     def clear():
         """Remove all of the items from the collection"""
@@ -97,12 +97,12 @@
         false otherwise.
         """
 
-class ISized(ICollection):
+class Sized(Collection):
 
     def __len__():
         """Return the number of items in the set"""
 
-class IReadSequence(Interface.Base):
+class ReadSequence(Interface.Base):
 
     def __getitem__(index):
         """Return an item for a given index."""
@@ -114,15 +114,15 @@
         to, but not including, index2.
         """
 
-class IKeyed(ICollection):
+class Keyed(Collection):
 
     def has_key(key):
         """Check whether the object has an item with the given key"""
 
     def keys(min=None, max=None):
-        """Return an IReadSequence containing the keys in the collection
+        """Return an ReadSequence containing the keys in the collection
 
-        The type of the IReadSequence is not specified. It could be a
+        The type of the ReadSequence is not specified. It could be a
         list or a tuple or some other type.
 
         If a min is specified, then output is constrained to
@@ -148,7 +148,7 @@
         greater than or equal to the argument.
         """
 
-class ISetMutable(IKeyed):
+class SetMutable(Keyed):
     
     def insert(key):
         """Add the key (value) to the set.
@@ -162,7 +162,7 @@
     def update(seq):
         """Add the items from the given sequence to the set"""
 
-class IKeySequence(IKeyed, ISized):
+class KeySequence(Keyed, Sized):
 
     def __getitem__(index):
         """Return the key in the given index position
@@ -171,14 +171,14 @@
         like map and list, that read sequences.
         """
 
-class ISet(IKeySequence, ISetMutable):
+class Set(KeySequence, SetMutable):
     pass
 
-class ITreeSet(IKeyed, ISetMutable):
+class TreeSet(Keyed, SetMutable):
     pass
     
 
-class IDictionaryIsh(IKeyed, ISized):
+class DictionaryIsh(Keyed, Sized):
 
     def __getitem__(key):
         """Get the value for the given key
@@ -213,9 +213,9 @@
         """
 
     def values(min=None, max=None):
-        """Return a IReadSequence containing the values in the collection
+        """Return a ReadSequence containing the values in the collection
 
-        The type of the IReadSequence is not specified. It could be a
+        The type of the ReadSequence is not specified. It could be a
         list or a tuple or some other type.
 
         If a min is specified, then output is constrained to
@@ -228,11 +228,11 @@
         """
 
     def items(min=None, max=None):
-        """Return a IReadSequence containing the items in the collection
+        """Return a ReadSequence containing the items in the collection
 
         An item is a key-value tuple.
 
-        The type of the IReadSequence is not specified. It could be a
+        The type of the ReadSequence is not specified. It could be a
         list or a tuple or some other type.
 
         If a min is specified, then output is constrained to
@@ -252,7 +252,7 @@
         integer values, the normalization is division.
         """
     
-class IBTree(IDictionaryIsh):
+class BTree(DictionaryIsh):
 
     def insert(key, value):
         """Insert a key and value into the collection.
@@ -273,13 +273,13 @@
               key=generate_key()
         """
 
-class IMerge(Interfaces.Base):
+class Merge(Interface.Base):
     """Object with methods for merging sets, buckets, and trees.
 
     These methods are supplied in modules that define collection
     classes with particular key and value types. The operations apply
     only to collections from the same module.  For example, the
-    IIBTree.union can only be used with IIBTree.IIBTree,
+    IBTree.union can only be used with IIBTree.IIBTree,
     IIBTree.IIBucket, IIBTree.IISet, and IIBTree.IITreeSet.
 
     The implementing module has a value type. The IOBTree and OOBTree
@@ -319,7 +319,7 @@
         collections.
         """
 
-class IIMerge(IMerge):
+class Merge(Merge):
     """Merge collections with integer value type.
 
     A primary intent is to support operations with no or integer
@@ -397,11 +397,4 @@
 # Eventually, I need to express this through the interfaces.
 #
 ################################################################
-
-    
-Interface.assertTypeImplements(OOBTree.OOSet, ISet)
-Interface.assertTypeImplements(OOBTree.OOTreeSet, ITreeSet)
-Interface.assertTypeImplements(OOBTree.OOBucket, IDictionaryIsh)
-Interface.assertTypeImplements(OOBTree.OOBTree, IBTree)
-
 

--- Updated File __init__.py in package Zope2 --
--- __init__.py	2001/02/19 18:15:10	1.2
+++ __init__.py	2001/05/17 16:06:19	1.2.36.1
@@ -3,3 +3,10 @@
 try: import intSet
 except: pass
 else: del intSet
+
+try:
+    from HelpSys.HelpContext import HelpContext
+    HelpContext().registerHelp('BTrees/help')
+except:
+    ImportError
+