def get_change_str(changes):
 res = [(u'%s %d' % (key, changes[key])) for key in changes if (changes[key] > 0)]
 if res:
  return ', '.join(res)
 return 'no changed'

def get_change_str ( changes ) : res = [ ( u'%s %d' % ( key , changes [ key ] ) ) for key in changes if ( changes [ key ] > 0 ) ] if res : return ', ' . join ( res ) return 'no changed'
returns a formatted string for the non-zero items of a changes dictionary .