def _slotnames(cls):
 names = cls.__dict__.get('__slotnames__')
 if (names is not None):
  return names
 names = []
 if (not hasattr(cls, '__slots__')):
  pass
 else:
  for c in cls.__mro__:
   if ('__slots__' in c.__dict__):
    slots = c.__dict__['__slots__']
    if isinstance(slots, str):
     slots = (slots,)
    for name in slots:
     if (name in ('__dict__', '__weakref__')):
      continue
     elif (name.startswith('__') and (not name.endswith('__'))):
      names.append(('_%s%s' % (c.__name__, name)))
     else:
      names.append(name)
 try:
  cls.__slotnames__ = names
 except:
  pass
 return names

def _slotnames ( cls ) : names = cls . __dict__ . get ( '__slotnames__' ) if ( names is not None ) : return names names = [ ] if ( not hasattr ( cls , '__slots__' ) ) : pass else : for c in cls . __mro__ : if ( '__slots__' in c . __dict__ ) : slots = c . __dict__ [ '__slots__' ] if isinstance ( slots , str ) : slots = ( slots , ) for name in slots : if ( name in ( '__dict__' , '__weakref__' ) ) : continue elif ( name . startswith ( '__' ) and ( not name . endswith ( '__' ) ) ) : names . append ( ( '_%s%s' % ( c . __name__ , name ) ) ) else : names . append ( name ) try : cls . __slotnames__ = names except : pass return names
return a list of slot names for a given class .