[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS - ContainerTraverser.py:1.1.2.5
Martijn Pieters
mj@zope.com
Wed, 13 Feb 2002 00:03:35 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS
In directory cvs.zope.org:/tmp/cvs-serv14206/App/OFS
Modified Files:
Tag: Zope-3x-branch
ContainerTraverser.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/App/OFS/ContainerTraverser.py 1.1.2.4 => 1.1.2.5 ===
def browser_traverse(self, request, name):
c = self._c
- if name[-5:] == ';view':
+ if name.endswith(';view'):
p = getRequestView(c, name[:-5], request)
if p is None:
raise NotFound(c, name, request)