def simpler_string(thrift_obj):
 L = []
 for (key, value) in thrift_obj.__dict__.iteritems():
  if (value is None):
   continue
  if hasattr(value, 'thrift_spec'):
   L.append(('%s=%s' % (key, simpler_string(value))))
  else:
   L.append(('%s=%r' % (key, value)))
 return ('%s(%s)' % (thrift_obj.__class__.__name__, ', '.join(L)))

def simpler_string ( thrift_obj ) : L = [ ] for ( key , value ) in thrift_obj . __dict__ . iteritems ( ) : if ( value is None ) : continue if hasattr ( value , 'thrift_spec' ) : L . append ( ( '%s=%s' % ( key , simpler_string ( value ) ) ) ) else : L . append ( ( '%s=%r' % ( key , value ) ) ) return ( '%s(%s)' % ( thrift_obj . __class__ . __name__ , ', ' . join ( L ) ) )
strips out nulls and empty arrays from the string representation .