def formatStatResponse(msgs):
 i = 0
 bytes = 0
 for size in msgs:
  i += 1
  bytes += size
  (yield None)
 (yield successResponse(('%d %d' % (i, bytes))))

def formatStatResponse ( msgs ) : i = 0 bytes = 0 for size in msgs : i += 1 bytes += size ( yield None ) ( yield successResponse ( ( '%d %d' % ( i , bytes ) ) ) )
format the list of message sizes appropriately for a stat response .