Use list.extend instead of inserting one by one

This commit is contained in:
Star Brilliant 2013-11-16 23:15:44 +08:00
parent 665878fd72
commit 8102d3faaf

View File

@ -489,8 +489,7 @@ def ReadComments(input_files, font_size=25.0, progress_callback=None):
CommentProcessor = GetCommentProcessor(f)
if not CommentProcessor:
raise ValueError(_('Unknown comment file format: %s') % i)
for comment in CommentProcessor(FilterBadChars(f), font_size):
comments.append(comment)
comments.extend(CommentProcessor(FilterBadChars(f), font_size))
if progress_callback:
progress_callback(len(input_files), len(input_files))
comments.sort()