how about ``msg += u'\n'.join(failure_messages)`` ? That could replace 3 lines of code and a comment.