[Zope-Checkins] CVS: Releases/Zope/lib/python/ZTUtils - Iterator.py:1.11

Evan Simpson cvs-admin at zope.org
Tue Nov 4 14:27:17 EST 2003


Update of /cvs-repository/Releases/Zope/lib/python/ZTUtils
In directory cvs.zope.org:/tmp/cvs-serv6936/lib/python/ZTUtils

Modified Files:
	Iterator.py 
Log Message:
Add 'parity' method to ZTUtils Iterators.


=== Releases/Zope/lib/python/ZTUtils/Iterator.py 1.10 => 1.11 ===
--- Releases/Zope/lib/python/ZTUtils/Iterator.py:1.10	Tue Oct 21 08:21:52 2003
+++ Releases/Zope/lib/python/ZTUtils/Iterator.py	Tue Nov  4 14:27:16 2003
@@ -63,6 +63,11 @@
 
     def odd(self): return self.index % 2
 
+    def parity(self):
+        if self.index % 2:
+            return 'odd'
+        return 'even'
+
     def letter(self, base=ord('a'), radix=26):
         index = self.index
         s = ''




More information about the Zope-Checkins mailing list