def _base_class_object_build(node, member, basenames, name=None, localname=None):
 klass = build_class((name or getattr(member, '__name__', None) or localname), basenames, member.__doc__)
 klass._newstyle = isinstance(member, type)
 node.add_local_node(klass, localname)
 try:
  if issubclass(member, Exception):
   instdict = member().__dict__
  else:
   raise TypeError
 except:
  pass
 else:
  for (name, obj) in instdict.items():
   valnode = EmptyNode()
   valnode.object = obj
   valnode.parent = klass
   valnode.lineno = 1
   klass.instance_attrs[name] = [valnode]
 return klass

def _base_class_object_build ( node , member , basenames , name = None , localname = None ) : klass = build_class ( ( name or getattr ( member , '__name__' , None ) or localname ) , basenames , member . __doc__ ) klass . _newstyle = isinstance ( member , type ) node . add_local_node ( klass , localname ) try : if issubclass ( member , Exception ) : instdict = member ( ) . __dict__ else : raise TypeError except : pass else : for ( name , obj ) in instdict . items ( ) : valnode = EmptyNode ( ) valnode . object = obj valnode . parent = klass valnode . lineno = 1 klass . instance_attrs [ name ] = [ valnode ] return klass
create astroid for a living class object .