[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Security/Grants - LocalSecurityMap.py:1.4 PersistentLocalSecurityMap.py:1.3
Jeremy Hylton
jeremy@zope.com
Mon, 5 Aug 2002 16:08:40 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security/Grants
In directory cvs.zope.org:/tmp/cvs-serv1296/lib/python/Zope/App/Security/Grants
Modified Files:
LocalSecurityMap.py PersistentLocalSecurityMap.py
Log Message:
PersistentMapping is now PersistentDict (by popular demand).
Note that this change will break any old pickles.
=== Zope3/lib/python/Zope/App/Security/Grants/LocalSecurityMap.py 1.3 => 1.4 ===
def addCell(self, rowentry, colentry, value):
# setdefault may get expensive if an empty mapping is
- # expensive to create, for PersistentMapping for instance.
+ # expensive to create, for PersistentDict for instance.
row = self._byrow.setdefault(rowentry, self._empty_mapping())
row[colentry] = value
=== Zope3/lib/python/Zope/App/Security/Grants/PersistentLocalSecurityMap.py 1.2 => 1.3 ===
""" Generic two-dimensional array type """
from Persistence import Persistent
-from Persistence.PersistentMapping import PersistentMapping
+from Persistence.PersistentDict import PersistentDict
from Zope.App.Security.Grants.ILocalSecurityMap import ILocalSecurityMap
from Zope.App.Security.Grants.LocalSecurityMap import LocalSecurityMap
@@ -23,9 +23,9 @@
__implements__ = ILocalSecurityMap
def _clear(self):
- self._byrow = PersistentMapping()
- self._bycol = PersistentMapping()
+ self._byrow = PersistentDict()
+ self._bycol = PersistentDict()
def _empty_mapping(self):
- return PersistentMapping()
+ return PersistentDict()