[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/Browser - AttributePublisher.py:1.1.2.7

Fred Drake Jr fdrake@acm.org
Wed, 12 Dec 2001 13:06:46 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/Browser
In directory cvs.zope.org:/tmp/cvs-serv2782

Modified Files:
      Tag: Zope-3x-branch
	AttributePublisher.py 
Log Message:
Use "".endswith() instead of slicing (no need to create a temporary string).

=== Zope3/lib/python/Zope/Publisher/Browser/AttributePublisher.py 1.1.2.6 => 1.1.2.7 ===
     def browser_traverse(self, request, name):
 
-        if name[-5:]=='.html':
+        if name.endswith('.html'):
             return getattr(self, name[:-5])
 
         return getattr(self, name)