[Zope-Checkins] CVS: Zope3/lib/python/Zope/ZTUtils - Iterator.py:1.1.2.2
Martijn Pieters
mj@zope.com
Wed, 13 Feb 2002 00:03:12 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/ZTUtils
In directory cvs.zope.org:/tmp/cvs-serv14206/ZTUtils
Modified Files:
Tag: Zope-3x-branch
Iterator.py
Log Message:
Optimizations and code style updates:
- Use isinstance on type checks
- Test UnicodeType and StringType through StringTypes
- Remove use of the string module
- Use startswith and endswith instead of slices.
- Fix weird tests where isinstance suffices.
=== Zope3/lib/python/Zope/ZTUtils/Iterator.py 1.1.2.1 => 1.1.2.2 ===
__version__='$Revision$'[11:-2]
-import string
-
class Iterator:
'''Simple Iterator class'''
@@ -136,8 +134,8 @@
s = s + r * rct
return s
- def roman(self, lower=string.lower):
- return lower(self.Roman())
+ def roman(self):
+ return self.Roman.lower()
def start(self): return self.nextIndex == 1