[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security - LocalSecurityMap.py:1.1.2.4
Anthony Baxter
anthony@interlink.com.au
Sat, 9 Feb 2002 16:22:32 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security
In directory cvs.zope.org:/tmp/cvs-serv26421
Modified Files:
Tag: Zope-3x-branch
LocalSecurityMap.py
Log Message:
added new 'getAllCells()' method.
=== Zope3/lib/python/Zope/App/Security/LocalSecurityMap.py 1.1.2.3 => 1.1.2.4 ===
row = self._byrow.get(rowentry)
if row: return row.get(colentry, default)
- else: return default
+ else: return default
def getRow(self, rowentry):
" return a list of (colentry, value) tuples from a row "
row = self._byrow.get(rowentry)
if row:
return row.items()
- else: return []
+ else: return []
def getCol(self, colentry):
" return a list of (rowentry, value) tuples from a col "
col = self._bycol.get(colentry)
if col:
return col.items()
- else: return []
+ else: return []
+ def getAllCells(self):
+ " return a list of (rowentry, colentry, value) "
+ res = []
+ for r in self._byrow.keys():
+ for c in self._byrow[r].items():
+ res.append((r,) + c)
+ return res