Commit 7c665d9a authored by Tim Peters's avatar Tim Peters

Merge ZODB trunk changes checked in from a wrong project.

r29290 | frerich | 2005-02-24 17:36:00 -0500 (Thu, 24 Feb 2005)
Changed paths:
   M /Zope3/trunk/src/ZODB/tests/dbopen.txt
   ...
   minor editing

r29247 | gintautasm | 2005-02-22 06:40:26 -0500 (Tue, 22 Feb 2005)
Changed paths:
   M /Zope3/trunk/src/BTrees/Interfaces.py
   ...
   More minor nitpicks.  This should be the last one.
parent 98da6a92
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
from zope.interface import Interface from zope.interface import Interface
class ICollection(Interface): class ICollection(Interface):
def clear(): def clear():
...@@ -42,6 +43,7 @@ class IReadSequence(Interface): ...@@ -42,6 +43,7 @@ class IReadSequence(Interface):
to, but not including, index2. to, but not including, index2.
""" """
class IKeyed(ICollection): class IKeyed(ICollection):
def has_key(key): def has_key(key):
...@@ -76,6 +78,7 @@ class IKeyed(ICollection): ...@@ -76,6 +78,7 @@ class IKeyed(ICollection):
greater than or equal to the argument. greater than or equal to the argument.
""" """
class ISetMutable(IKeyed): class ISetMutable(IKeyed):
def insert(key): def insert(key):
...@@ -88,29 +91,34 @@ class ISetMutable(IKeyed): ...@@ -88,29 +91,34 @@ class ISetMutable(IKeyed):
"""Remove the key from the set.""" """Remove the key from the set."""
def update(seq): def update(seq):
"""Add the items from the given sequence to the set""" """Add the items from the given sequence to the set."""
class ISized(Interface): class ISized(Interface):
"anything supporting __len" """An object that supports __len__."""
def __len__(): def __len__():
"""Return the number of items in the container""" """Return the number of items in the container."""
class IKeySequence(IKeyed, ISized): class IKeySequence(IKeyed, ISized):
def __getitem__(index): def __getitem__(index):
"""Return the key in the given index position """Return the key in the given index position.
This allows iteration with for loops and use in functions, This allows iteration with for loops and use in functions,
like map and list, that read sequences. like map and list, that read sequences.
""" """
class ISet(IKeySequence, ISetMutable): class ISet(IKeySequence, ISetMutable):
pass pass
class ITreeSet(IKeyed, ISetMutable): class ITreeSet(IKeyed, ISetMutable):
pass pass
class IMinimalDictionary(ISized): class IMinimalDictionary(ISized):
def has_key(key): def has_key(key):
...@@ -205,6 +213,7 @@ class IDictionaryIsh(IKeyed, IMinimalDictionary): ...@@ -205,6 +213,7 @@ class IDictionaryIsh(IKeyed, IMinimalDictionary):
integer values, the normalization is division. integer values, the normalization is division.
""" """
class IBTree(IDictionaryIsh): class IBTree(IDictionaryIsh):
def insert(key, value): def insert(key, value):
...@@ -226,6 +235,7 @@ class IBTree(IDictionaryIsh): ...@@ -226,6 +235,7 @@ class IBTree(IDictionaryIsh):
key=generate_key() key=generate_key()
""" """
class IMerge(Interface): class IMerge(Interface):
"""Object with methods for merging sets, buckets, and trees. """Object with methods for merging sets, buckets, and trees.
...@@ -275,6 +285,7 @@ class IMerge(Interface): ...@@ -275,6 +285,7 @@ class IMerge(Interface):
collections. collections.
""" """
class IIMerge(IMerge): class IIMerge(IMerge):
"""Merge collections with integer value type. """Merge collections with integer value type.
...@@ -347,6 +358,7 @@ class IIMerge(IMerge): ...@@ -347,6 +358,7 @@ class IIMerge(IMerge):
Note that c1 and c2 must be collections. Note that c1 and c2 must be collections.
""" """
class IMergeIntegerKey(IMerge): class IMergeIntegerKey(IMerge):
"""IMerge-able objects with integer keys. """IMerge-able objects with integer keys.
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment