[Zodb-checkins] CVS: Zope3/lib/python/Persistence - Module.py:1.21

Jeremy Hylton jeremy@zope.com
Wed, 2 Oct 2002 15:01:59 -0400


Update of /cvs-repository/Zope3/lib/python/Persistence
In directory cvs.zope.org:/tmp/cvs-serv4649/Persistence

Modified Files:
	Module.py 
Log Message:
Use private variable for dict.

This makes the registry a suitable base class.


=== Zope3/lib/python/Persistence/Module.py 1.20 => 1.21 ===
--- Zope3/lib/python/Persistence/Module.py:1.20	Fri Sep 20 16:04:02 2002
+++ Zope3/lib/python/Persistence/Module.py	Wed Oct  2 15:01:59 2002
@@ -229,17 +229,17 @@
                       IPersistentModuleUpdateRegistry)
 
     def __init__(self):
-        self._dict = {}
+        self.__modules = {}
 
     def findModule(self, name):
-        return self._dict.get(name)
+        return self.__modules.get(name)
 
     def setModule(self, name, module):
-        if name in self._dict:
+        if name in self.__modules:
             raise ValueError, name
         self._p_changed = True
-        self._dict[name] = module
+        self.__modules[name] = module
 
     def delModule(self, name):
         self._p_changed = True
-        del self._dict[name]
+        del self.__modules[name]