From b6d7cb992fe2d9ceee2b1277d7b07cd76b481308 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 3 Oct 2009 09:38:13 +0200 Subject: [PATCH] remove some useless len() call --- src/conversation_textview.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conversation_textview.py b/src/conversation_textview.py index 6253947eb..6e44f1ddc 100644 --- a/src/conversation_textview.py +++ b/src/conversation_textview.py @@ -959,7 +959,7 @@ class ConversationTextview(gobject.GObject): # detect_and_print_special_text() is also used by # HtmlHandler.handle_specials() and there tags is gtk.TextTag objects, # not strings - if len(other_tags) and isinstance(other_tags[0], gtk.TextTag): + if other_tags and isinstance(other_tags[0], gtk.TextTag): insert_tags_func = buffer_.insert_with_tags index = 0 @@ -1120,12 +1120,12 @@ class ConversationTextview(gobject.GObject): if use_other_tags: end_iter = buffer_.get_end_iter() insert_tags_func = buffer_.insert_with_tags_by_name - if len(other_tags) and isinstance(other_tags[0], gtk.TextTag): + if other_tags and isinstance(other_tags[0], gtk.TextTag): insert_tags_func = buffer_.insert_with_tags insert_tags_func(end_iter, special_text, *other_tags) - if len(tags): + if tags: end_iter = buffer_.get_end_iter() all_tags = tags[:] if use_other_tags: