[Zope-Checkins]
SVN: Zope/branches/2.10/lib/python/AccessControl/ImplPython.py
Use isinstance, like the C implementation.
Florent Guillaume
fg at nuxeo.com
Thu Jun 1 12:29:40 EDT 2006
Log message for revision 68448:
Use isinstance, like the C implementation.
Changed:
U Zope/branches/2.10/lib/python/AccessControl/ImplPython.py
-=-
Modified: Zope/branches/2.10/lib/python/AccessControl/ImplPython.py
===================================================================
--- Zope/branches/2.10/lib/python/AccessControl/ImplPython.py 2006-06-01 16:08:52 UTC (rev 68447)
+++ Zope/branches/2.10/lib/python/AccessControl/ImplPython.py 2006-06-01 16:29:40 UTC (rev 68448)
@@ -317,9 +317,8 @@
None)
if p is not None:
- tp = p.__class__
- if tp is not int and tp is not bool:
- if tp is dict:
+ if not isinstance(p, int): # catches bool too
+ if isinstance(p, dict):
if isinstance(name, basestring):
p = p.get(name)
else:
More information about the Zope-Checkins
mailing list