[Commits] (twl) Bug 2516 - minor cleanup, r=john

commits at osafoundation.org commits at osafoundation.org
Fri Mar 4 11:16:15 PST 2005


Commit by: twl
Modified files:
chandler/parcels/osaf/contentmodel/ItemCollection.py 1.37 1.38
chandler/repository/query/Query.py 1.35 1.36

Log message:
Bug 2516 - minor cleanup, r=john


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/contentmodel/ItemCollection.py.diff?r1=text&tr1=1.37&r2=text&tr2=1.38
http://cvs.osafoundation.org/index.cgi/chandler/repository/query/Query.py.diff?r1=text&tr1=1.35&r2=text&tr2=1.36

Index: chandler/parcels/osaf/contentmodel/ItemCollection.py
diff -u chandler/parcels/osaf/contentmodel/ItemCollection.py:1.37 chandler/parcels/osaf/contentmodel/ItemCollection.py:1.38
--- chandler/parcels/osaf/contentmodel/ItemCollection.py:1.37	Fri Mar  4 10:43:41 2005
+++ chandler/parcels/osaf/contentmodel/ItemCollection.py	Fri Mar  4 11:16:13 2005
@@ -1,4 +1,4 @@
-__date__ = "$Date: 2005/03/04 18:43:41 $"
+__date__ = "$Date: 2005/03/04 19:16:13 $"
 __copyright__ = "Copyright (c) 2003-2004 Open Source Applications Foundation"
 __license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -98,12 +98,6 @@
         # message the mainView to do the bulk of the work, showing progress
         Globals.views[0].postEventByName ('ShareItem', {'item': self})
 
-    def __len__ (self):
-        return len (self.resultSet)
-
-    def __contains__ (self, item):
-        return item in self.resultSet
-
     def __getitem__ (self, index):
         try:
             return self.resultSet.getByIndex (self.indexName, index)

Index: chandler/repository/query/Query.py
diff -u chandler/repository/query/Query.py:1.35 chandler/repository/query/Query.py:1.36
--- chandler/repository/query/Query.py:1.35	Thu Mar  3 16:58:21 2005
+++ chandler/repository/query/Query.py	Fri Mar  4 11:16:14 2005
@@ -1,6 +1,6 @@
 
-__revision__  = "$Revision: 1.35 $"
-__date__      = "$Date: 2005/03/04 00:58:21 $"
+__revision__  = "$Revision: 1.36 $"
+__date__      = "$Date: 2005/03/04 19:16:14 $"
 __copyright__ = "Copyright (c) 2004, 2005 Open Source Applications Foundation"
 __license__   = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -243,6 +243,12 @@
                 method (item, (added,removed))
         log.debug(u"queryCallback: %s:%f" % (self.queryString, time.time()-start))
 
+    def __len__ (self):
+        return len (self.resultSet)
+
+    def __contains__ (self, item):
+        return item in self.resultSet
+
     def __iter__(self):
         """
         Return a generator of the query results



More information about the Commits mailing list