def _compactRepr(obj, alwaysShow=None, flagNames=None, fieldNames=None, sectionNames=None):
 if (alwaysShow is None):
  alwaysShow = []
 if (flagNames is None):
  flagNames = []
 if (fieldNames is None):
  fieldNames = []
 if (sectionNames is None):
  sectionNames = []
 setFlags = []
 for name in flagNames:
  if ((name in alwaysShow) or (getattr(obj, name, False) == True)):
   setFlags.append(name)
 displayableArgs = _getDisplayableArguments(obj, alwaysShow, fieldNames)
 out = (['<', obj.__class__.__name__] + displayableArgs)
 if setFlags:
  out.append((' flags=%s' % (','.join(setFlags),)))
 for name in sectionNames:
  section = getattr(obj, name, [])
  if section:
   out.append((' %s=%r' % (name, section)))
 out.append('>')
 return ''.join(out)

def _compactRepr ( obj , alwaysShow = None , flagNames = None , fieldNames = None , sectionNames = None ) : if ( alwaysShow is None ) : alwaysShow = [ ] if ( flagNames is None ) : flagNames = [ ] if ( fieldNames is None ) : fieldNames = [ ] if ( sectionNames is None ) : sectionNames = [ ] setFlags = [ ] for name in flagNames : if ( ( name in alwaysShow ) or ( getattr ( obj , name , False ) == True ) ) : setFlags . append ( name ) displayableArgs = _getDisplayableArguments ( obj , alwaysShow , fieldNames ) out = ( [ '<' , obj . __class__ . __name__ ] + displayableArgs ) if setFlags : out . append ( ( ' flags=%s' % ( ',' . join ( setFlags ) , ) ) ) for name in sectionNames : section = getattr ( obj , name , [ ] ) if section : out . append ( ( ' %s=%r' % ( name , section ) ) ) out . append ( '>' ) return '' . join ( out )
return a l{str} representation of c{obj} which only shows fields with non-default values .