[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/DateRangeIndex - DateRangeIndex.py:1.4
Martijn Pieters
mj@zope.com
Wed, 14 Aug 2002 18:19:59 -0400
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/DateRangeIndex
In directory cvs.zope.org:/tmp/cvs-serv24540/DateRangeIndex
Modified Files:
DateRangeIndex.py
Log Message:
Clean up indentation and trailing whitespace.
=== Zope/lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py 1.3 => 1.4 ===
--- Zope/lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py:1.3 Wed Jun 26 09:37:19 2002
+++ Zope/lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py Wed Aug 14 18:19:28 2002
@@ -1,14 +1,14 @@
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
-#
+#
##############################################################################
"""$Id$
@@ -39,7 +39,7 @@
start or the end date: for the start date, this should be
the logical equivalent of "since the beginning of time"; for the
end date, "until the end of time".
-
+
Therefore, divide the space of indexed objects into four containers:
- Objects which always match ( i.e., they returned None for both );
@@ -125,7 +125,7 @@
"""
Start over fresh.
"""
- self._always = IITreeSet()
+ self._always = IITreeSet()
self._since_only = IOBTree()
self._until_only = IOBTree()
self._since = IOBTree()
@@ -137,11 +137,11 @@
#
def getEntryForObject( self, documentId, default=None ):
"""
- Get all information contained for the specific object
+ Get all information contained for the specific object
identified by 'documentId'. Return 'default' if not found.
"""
return self._unindex.get( documentId, default )
-
+
def index_object( self, documentId, obj, threshold=None ):
"""
Index an object:
@@ -288,7 +288,7 @@
#map( since.update, self._since.values( None, term ) )
# XXX use multi-union
since = multiunion( self._since.values( None, term ) )
-
+
bounded = intersection( until, since )
# Merge from smallest to largest.
@@ -381,14 +381,14 @@
set = self._since.get( since, None )
if set is not None:
set.remove( documentId )
-
+
if not set:
del self._since[ since ]
set = self._until.get( until, None )
if set is not None:
set.remove( documentId )
-
+
if not set:
del self._until[ until ]