[Zope-Checkins] CVS: Zope/lib/python/webdav - EtagSupport.py:1.5
Andreas Jung
andreas@zope.com
Thu, 29 Nov 2001 13:23:27 -0500
Update of /cvs-repository/Zope/lib/python/webdav
In directory cvs.zope.org:/tmp/cvs-serv25091
Modified Files:
EtagSupport.py
Log Message:
replaced string calls by string methods
=== Zope/lib/python/webdav/EtagSupport.py 1.4 => 1.5 ===
__version__ = "$Revision$"[11:-2]
-from string import capitalize, split, join, strip
+
import time, Interface, re
class EtagBaseInterface(Interface.Base):
@@ -85,12 +85,12 @@
matchlist = REQUEST.get_header(header)
if matchlist is None:
# capitalize the words of the header, splitting on '-'
- tmp = map(capitalize, split(header, '-'))
- tmp = join(tmp,'-')
+ tmp = [x.capitalize() for x in header.split('-')]
+ tmp = '-'.join(tmp)
matchlist = REQUEST.get_header(tmp)
if matchlist is None:
return None
- matchlist = map(strip, split(matchlist, ','))
+ matchlist = [ x.strip() for x in matchlist.split(',')]
r = []
for match in matchlist: