def formatUIDListLines(msgs, getUidl):
 for (i, m) in enumerate(msgs):
  if (m is not None):
   uid = getUidl(i)
   (yield ('%d %s\r\n' % ((i + 1), uid)))

def formatUIDListLines ( msgs , getUidl ) : for ( i , m ) in enumerate ( msgs ) : if ( m is not None ) : uid = getUidl ( i ) ( yield ( '%d %s\r\n' % ( ( i + 1 ) , uid ) ) )
format the list of message sizes appropriately for the lines of a uidl response .