Use list.extend instead of inserting one by one
This commit is contained in:
parent
665878fd72
commit
8102d3faaf
1 changed files with 1 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue