[Zope3-checkins] CVS: Packages/ZConfig - matcher.py:1.1.2.30

Chris McDonough chrism@zope.com
Wed, 1 Jan 2003 22:08:15 -0500


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

Modified Files:
      Tag: zconfig-schema-devel-branch
	matcher.py 
Log Message:
Provide SectionValue objects with a __str__ method suitable for pretty-printing to inspect values.


=== Packages/ZConfig/matcher.py 1.1.2.29 => 1.1.2.30 ===
--- Packages/ZConfig/matcher.py:1.1.2.29	Wed Jan  1 04:17:54 2003
+++ Packages/ZConfig/matcher.py	Wed Jan  1 22:08:11 2003
@@ -267,3 +267,11 @@
             self.__dict__[name] = value
         else:
             self._values[i] = value
+
+    def __str__(self):
+        l = []
+        for i in range(len(self._attrnames)):
+            k = self._attrnames[i]
+            v = self._values[i]
+            l.append('%-40s: %s' % (k, v))
+        return '\n'.join(l)