def isinstance(obj, bases):
 try:
  cls = obj.__getattr__('__class__')
 except AttributeError:
  try:
   cls = obj.__class__
  except AttributeError:
   cls = orig_type(obj)
 return issubclass(cls, bases)

def isinstance ( obj , bases ) : try : cls = obj . __getattr__ ( '__class__' ) except AttributeError : try : cls = obj . __class__ except AttributeError : cls = orig_type ( obj ) return issubclass ( cls , bases )
a version of isinstance that supports netproxies .