[Zope3-checkins] CVS: Packages/ZConfig - cfgparser.py:1.6 datatypes.py:1.5 info.py:1.8 loader.py:1.9

Fred L. Drake, Jr. fred@zope.com
Thu, 9 Jan 2003 11:34:48 -0500


Update of /cvs-repository/Packages/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv7520

Modified Files:
	cfgparser.py datatypes.py info.py loader.py 
Log Message:
Avoid creating a __dict__ in several places, since we don't use them.

=== Packages/ZConfig/cfgparser.py 1.5 => 1.6 ===
--- Packages/ZConfig/cfgparser.py:1.5	Thu Jan  9 11:05:34 2003
+++ Packages/ZConfig/cfgparser.py	Thu Jan  9 11:34:43 2003
@@ -25,6 +25,10 @@
 
 
 class ZConfigParser:
+    __metaclass__ = type
+    __slots__ = ('resource', 'context', 'lineno',
+                 'stack', 'defs', 'file', 'url')
+
     def __init__(self, resource, context, defines=None):
         self.resource = resource
         self.context = context


=== Packages/ZConfig/datatypes.py 1.4 => 1.5 ===
--- Packages/ZConfig/datatypes.py:1.4	Tue Jan  7 18:15:11 2003
+++ Packages/ZConfig/datatypes.py	Thu Jan  9 11:34:43 2003
@@ -330,6 +330,9 @@
     }
 
 class Registry:
+    __metatype__ = type
+    __slots__ = '_stock', '_other'
+
     def __init__(self, stock=None):
         if stock is None:
             stock = stock_datatypes.copy()


=== Packages/ZConfig/info.py 1.7 => 1.8 ===
--- Packages/ZConfig/info.py:1.7	Thu Jan  9 00:42:28 2003
+++ Packages/ZConfig/info.py	Thu Jan  9 11:34:43 2003
@@ -24,6 +24,9 @@
 
 
 class UnboundedThing:
+    __metaclass__ = type
+    __slots__ = ()
+
     def __lt__(self, other):
         return False
 
@@ -49,6 +52,9 @@
 
 
 class ValueInfo:
+    __metaclass__ = type
+    __slots__ = 'value', 'position'
+
     def __init__(self, value, position):
         self.value = value
         # position is (lineno, colno, url)
@@ -198,6 +204,9 @@
 
 
 class AbstractType:
+    __metaclass__ = type
+    __slots__ = '_subtypes', 'name'
+
     def __init__(self, name):
         self._subtypes = {}
         self.name = name


=== Packages/ZConfig/loader.py 1.8 => 1.9 ===
--- Packages/ZConfig/loader.py:1.8	Thu Jan  9 11:05:34 2003
+++ Packages/ZConfig/loader.py	Thu Jan  9 11:34:43 2003
@@ -216,6 +216,9 @@
 
 
 class CompositeHandler:
+    __metatype__ = type
+    __slots__ = '_handlers', '_convert'
+
     def __init__(self, handlers, schema):
         self._handlers = handlers
         self._convert = schema.registry.get("basic-key")