def __getattr__(self, q):
if q is None:<EOL><INDENT>return self<EOL><DEDENT>candidate = None<EOL>if _favorites.data.has_key(q):<EOL><INDENT>candidate = q<EOL><DEDENT>for name, (tags, colors) in _favorites.data.iteritems():<EOL><INDENT>if q in tags:<EOL><INDENT>candidate = name<EOL><DEDENT><DEDENT>if candidate:<EOL><INDENT>tags, colors = _favorites.data[candidate]<EOL>colors = ColorList([color(r, g, b, a) for r, g, b, a in colors], name=candidate)<EOL>colors.tags = tags.split("<STR_LIT:U+0020>")<EOL>return colors<EOL><DEDENT>return None<EOL>
Returns the favorite colors list which name/tags matches q.