# HG changeset patch # User Gustavo Picon # Date 1270787976 18000 # Node ID b03f4b528ea19c5b2a174d45368e61f46eb14591 # Parent da261e3955c9c66b0b02eb696e6741cf7366399e minibenchmarks say this is actually faster diff -r da261e3955c9c66b0b02eb696e6741cf7366399e -r b03f4b528ea19c5b2a174d45368e61f46eb14591 tagtools.py --- a/tagtools.py Sun Apr 04 19:57:47 2010 -0500 +++ b/tagtools.py Thu Apr 08 23:39:36 2010 -0500 @@ -7,12 +7,11 @@ def str2tags(cls, tagstr): if not tagstr: return [] - results = [] - for tag in tagstr.split(cls.SEPARATOR): - tag = tag.strip() - if tag: - results.append(tag) - return results + return [ + tag.strip() + for tag in tagstr.split(cls.SEPARATOR) + if tag.strip() + ] @classmethod def tags2str(cls, tags):