[Python-checkins] r69521 - python/trunk/Lib/urllib2.py

benjamin.peterson python-checkins at python.org
Thu Feb 12 05:17:05 CET 2009


Author: benjamin.peterson
Date: Thu Feb 12 05:17:04 2009
New Revision: 69521

Log:
no need for this __bases__ trick anymore

Modified:
   python/trunk/Lib/urllib2.py

Modified: python/trunk/Lib/urllib2.py
==============================================================================
--- python/trunk/Lib/urllib2.py	(original)
+++ python/trunk/Lib/urllib2.py	Thu Feb 12 05:17:04 2009
@@ -441,7 +441,7 @@
     """
     import types
     def isclass(obj):
-        return isinstance(obj, types.ClassType) or hasattr(obj, "__bases__")
+        return isinstance(obj, (types.ClassType, type))
 
     opener = OpenerDirector()
     default_classes = [ProxyHandler, UnknownHandler, HTTPHandler,


More information about the Python-checkins mailing list