[Zope3-checkins] CVS: Zope3/src/zope/app/browser/container - contents.py:1.3

Steve Alexander steve@cat-box.net
Fri, 27 Dec 2002 08:40:26 -0500


Update of /cvs-repository/Zope3/src/zope/app/browser/container
In directory cvs.zope.org:/tmp/cvs-serv2616/src/zope/app/browser/container

Modified Files:
	contents.py 
Log Message:
Got rid of multiple references to items[0] and items[1], and used
id,obj instead, for source-reading-pleasure.


=== Zope3/src/zope/app/browser/container/contents.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/container/contents.py:1.2	Wed Dec 25 09:12:29 2002
+++ Zope3/src/zope/app/browser/container/contents.py	Fri Dec 27 08:40:25 2002
@@ -29,26 +29,27 @@
 
     __used_for__ = IContainer
 
-    def _extractContentInfo( self, item ):
-        info = { }
-        info['id'] = item[0]
-        info['object'] = item[1]
+    def _extractContentInfo(self, item):
+        id, obj = item
+        info = {}
+        info['id'] = id
+        info['object'] = obj
 
-        info[ 'url' ] = item[0]
+        info['url'] = id
 
-        zmi_icon = queryView(item[1], 'zmi_icon', self.request)
+        zmi_icon = queryView(obj, 'zmi_icon', self.request)
         if zmi_icon is None:
             info['icon'] = None
         else:
             info['icon'] = zmi_icon()
 
-        dc = queryAdapter(item[1], IZopeDublinCore)
+        dc = queryAdapter(obj, IZopeDublinCore)
         if dc is not None:
             title = dc.title
             if title:
                 info['title'] = title
 
-            magnitude, label = getSize(item[1])
+            magnitude, label = getSize(obj)
             info['size'] = {'size':magnitude, 'label':label}
             created = dc.created
             if created is not None: