def AumSortedConcatenate():
 def step(ctxt, ndx, author, sort, link):
  if (author is not None):
   ctxt[ndx] = u':::'.join((author, sort, link))
 def finalize(ctxt):
  keys = list(ctxt.iterkeys())
  l = len(keys)
  if (l == 0):
   return None
  if (l == 1):
   return ctxt[keys[0]]
  return u':#:'.join([ctxt[v] for v in sorted(keys)])
 return ({}, step, finalize)

def AumSortedConcatenate ( ) : def step ( ctxt , ndx , author , sort , link ) : if ( author is not None ) : ctxt [ ndx ] = u':::' . join ( ( author , sort , link ) ) def finalize ( ctxt ) : keys = list ( ctxt . iterkeys ( ) ) l = len ( keys ) if ( l == 0 ) : return None if ( l == 1 ) : return ctxt [ keys [ 0 ] ] return u':#:' . join ( [ ctxt [ v ] for v in sorted ( keys ) ] ) return ( { } , step , finalize )
string concatenation aggregator for the author sort map .