fix inspect.isclass() on instances with a custom __getattr__ #1225107
diff --git a/Lib/inspect.py b/Lib/inspect.py
index a89d62e..1453f3b 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -62,7 +62,7 @@
     Class objects provide these attributes:
         __doc__         documentation string
         __module__      name of module in which this class was defined"""
-    return isinstance(object, types.ClassType) or hasattr(object, '__bases__')
+    return isinstance(object, (type, types.ClassType))
 
 def ismethod(object):
     """Return true if the object is an instance method.