From 8102d3faaf0a099ae3479de06f5c5591311257d2 Mon Sep 17 00:00:00 2001 From: Star Brilliant Date: Sat, 16 Nov 2013 23:15:44 +0800 Subject: [PATCH] Use list.extend instead of inserting one by one --- danmaku2ass.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/danmaku2ass.py b/danmaku2ass.py index 7cfff7d..3f832a4 100755 --- a/danmaku2ass.py +++ b/danmaku2ass.py @@ -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()