[Zope3-checkins] SVN: Zope3/trunk/src/ More minor nitpicks. This
should be the last one.
Gintautas Miliauskas
gintas at pov.lt
Tue Feb 22 06:40:26 EST 2005
Log message for revision 29247:
More minor nitpicks. This should be the last one.
Changed:
U Zope3/trunk/src/BTrees/Interfaces.py
U Zope3/trunk/src/zodbcode/module.py
-=-
Modified: Zope3/trunk/src/BTrees/Interfaces.py
===================================================================
--- Zope3/trunk/src/BTrees/Interfaces.py 2005-02-22 11:28:03 UTC (rev 29246)
+++ Zope3/trunk/src/BTrees/Interfaces.py 2005-02-22 11:40:26 UTC (rev 29247)
@@ -14,6 +14,7 @@
from zope.interface import Interface
+
class ICollection(Interface):
def clear():
@@ -42,6 +43,7 @@
to, but not including, index2.
"""
+
class IKeyed(ICollection):
def has_key(key):
@@ -76,6 +78,7 @@
greater than or equal to the argument.
"""
+
class ISetMutable(IKeyed):
def insert(key):
@@ -88,29 +91,34 @@
"""Remove the key from the set."""
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):
- "anything supporting __len"
+ """An object that supports __len__."""
def __len__():
- """Return the number of items in the container"""
+ """Return the number of items in the container."""
+
class IKeySequence(IKeyed, ISized):
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,
like map and list, that read sequences.
"""
+
class ISet(IKeySequence, ISetMutable):
pass
+
class ITreeSet(IKeyed, ISetMutable):
pass
+
class IMinimalDictionary(ISized):
def has_key(key):
@@ -205,6 +213,7 @@
integer values, the normalization is division.
"""
+
class IBTree(IDictionaryIsh):
def insert(key, value):
@@ -226,6 +235,7 @@
key=generate_key()
"""
+
class IMerge(Interface):
"""Object with methods for merging sets, buckets, and trees.
@@ -275,6 +285,7 @@
collections.
"""
+
class IIMerge(IMerge):
"""Merge collections with integer value type.
@@ -347,6 +358,7 @@
Note that c1 and c2 must be collections.
"""
+
class IMergeIntegerKey(IMerge):
"""IMerge-able objects with integer keys.
Modified: Zope3/trunk/src/zodbcode/module.py
===================================================================
--- Zope3/trunk/src/zodbcode/module.py 2005-02-22 11:28:03 UTC (rev 29246)
+++ Zope3/trunk/src/zodbcode/module.py 2005-02-22 11:40:26 UTC (rev 29247)
@@ -103,8 +103,7 @@
def compileModule(module, registry, source):
- # Try to prevent compilation errors from files without trailing
- # newlines.
+ # Try to prevent compilation errors from files without trailing newlines.
if source and source[-1] != "\n":
source += "\n"
module._p_changed = True
More information about the Zope3-Checkins
mailing list